Wiki

Clone wiki

scenariotools-sml / JUnit Tests

JUnit Plug-in Tests

JUnit Plug-in test for execute synthesis.
JUnit_00.png

Setup

Workspace

You need the following Plug-in in your base workspace:
\org.scenariotools.synthesis\plugins\org.scenariotools.synthesis.otfb.tests

Execute JUnit Test

Create a debug/run configuration:
(Run -> Debug Configurations... -> create new 'JUnit Plug-in Test')
Set the values like in the screenshots below.
IMPORTANT: Uncheck clear workspace! (In Main tab)
Apply -> Debug/Run
JUnitConfig_01.png

IMPORTANT: Uncheck clear workspace!
The workspce for the JUnit configuration must include all SDL example projects. JUnitConfig_02.png

Add specification to the test run

To add a specification to the test setup edit OTFSynthesisTest.java in the Test Plug-in.
Create a new Method like in the example:

#!java

/**
* 10/doublecascading
*/
//@Ignore("Because it is to big!")
@Test(timeout=10000)
public void test_10__doublecascading() {
    String configurationPath = "/org.scenariotools.sdl.examples.doublecascading/doublecascading/10/doublecascading.runconfig";
    // 2047 States 23.06.2015
    boolean expectedSynthesisResult = true;
    int expectedExploredStatesLowerBound = 2040;
    int expectedExploredStatesUpperBound = 2060; 
    executeSynthesis(configurationPath, expectedSynthesisResult, expectedExploredStatesLowerBound, expectedExploredStatesUpperBound);
}

Updated