Executing tests
For executing test cases, required resources ( actions , data , expected ) are copied from test cases and test suite directories to a work area, when calling appropriate test run commands:
For running a single test case, RunTest has to be called:
RunTest "API/Local/Application" "%cd%/test_runs/ TestRun001 " "%cd%/main_suite" "%cd%" ""
Instead of TestRun001 any other test run name may be used. The test run directory will be created when not yet existing.
In order to execute the complete hierarchy, RunMany has to be called:
RunMany "%cd%/test_runs/ TestRun001 " "%cd%/main_suite"
from the test root directory (ODABATest/TestRun). For executing a specific test suite (e.g. Utilities)
RunMany "%cd%/test_runs/ TestRun001 " "%cd%/main_suite/Utilities"
may be called, which will execute all test cases below Utilities . All the commands will finally call testRun , which executes following actions:
- settings - set environment variables
- prepare - copy test data (recursively) to work_area directory
- preprocessing - perform test specific test preparation (has to be provided in test case or test suite actions )
- run - execute test (has to be provided in test case or test suite actions )
- postprocessing - typically, the procedure removes variable data, e.g. timestamps, from test data before being compared (has to be provided in test case or test suite actions ). Finally, the procedure has to create a compare.out file (e.g. by comparing expected and test result files).
- report - writes success or failed state in a test protocol file