A preset test case is a special set of test cases that can be run before or after test tasks and test cases are run.
AutoTest Studio provides four preset test case types.
BeforeTask-run every time the task starts, that is, before all test cases are run.
BeforeCase- runs before each test case runs.
AfterCase- runs after each test case runs.
AferTask- which runs after each task ends, that is, runs after all test cases are run.
After creating a new project, there will be four default folders in the "Presets" interface by default, corresponding to the four preset test case types, as shown in the following figure.
Users only need to write the corresponding use cases in the corresponding folders, and select the test cases that need to be run in each folder before running.
Use a set of test cases to demonstrate the use of preset use cases.
You can tick the preset test cases that need to be run according to your needs, and test cases that are not checked will not be executed.
Select the test case that you want to run.
Run the test cases in the "Demo" directory
After the test cases are run, check the test report to see the order in which the preset test cases are run.
At some point, we may and may need to count the preset test cases, in which you can select the type of test cases to count, and by default, all types of test cases are counted.