Ghost Client and Testing Tools / Testing with Ghost Client |
The SessionManager is a program written in Java that manages the whole test session life cycle.
To instantiate the Scenario or the sequence of scenarios required to run your tests, include a getScenario() function in your SessionManager.
The Scenario instance created is given to the main application (i.e. the first one launched), which it needs to get to run the tests.
import com.fourjs.ggc.Scenario; import com.fourjs.ggc.SessionManager; public class mySessionManager implements SessionManager { boolean mStarted = false; public Scenario getScenario() { if (!mStarted) { mStarted = true; return new FirstScenario(); << will be given to the first 4gl application, the mother } else { return new SecondScenario(); << will be given to the second 4gl application, the child launched via run or run without waiting by the mother } } }