Base State

An application’s base state is the known, stable state that you expect the application to be in before each test case begins execution, and the state the application can be returned to after each test case has ended execution. This state may be the state of an application when it is first started.

When you create a class for an application, Silk4J automatically creates a base state.

Base states are important because they ensure the integrity of your tests. By guaranteeing that each test case can start from a stable base state, you can be assured that an error in one test case does not cause subsequent test cases to fail.

Silk4J automatically ensures that your application is at its base state during the following stages:
  • Before a test runs
  • During the execution of a test
  • After a test completes successfully
Note: Do not add more than one browser application configuration when testing a web application with a defined base state.
You can edit the base state in the following ways:
  • Through the user interface, for example if you want to specify how to start the AUT during both recording and replay.
  • In a script, for example if you only want to start the AUT in the specified way when replaying the tests in the script.