System tests of IBEX and genie_python
If you want to run these tests on a developer machine, clone this repo into C:\Instrument\Dev
. Some files will need to be copied from the settings directory of a build machine.
-
Copy these files from
system_tests/configs/tables
into yourC:/Instrument/settings/<machine name>/tables/
directory:- RCPTT_detector128.dat
- RCPTT_spectra128.dat
- RCPTT_wiring128.dat
-
Copy these files from
system_tests/configs/tcb
into yourC:/Instrument/settings/<machine name>/tcb/
directory:- RCPTT_TCB_1.dat
- RCPTT_TCB_2.dat
-
Copy these folders from
system_tests/configs/configurations
into yourC:/Instrument/settings/<machine name>/configurations/
directory:- block_in_title
- memory_usage
- rcptt_simple
Once these files are in place, run the tests with run_tests.bat
You may have to start the IBEX server if it complains - C:/Instrument/Apps/Epics/start_ibex_server.bat
To run all the tests in the test framework, cd
to wherever you have the system_tests repository checked out and use:
run_tests.bat
You can run tests in specific modules using the -t
argument as follows:
run_tests.bat -t example_module # Will run the stress rig tests and then the tests in the module example_module.
The argument is the name of the module containing the tests. This is the same as the name of the file in the tests
directory, with the .py
extension removed.
You can run classes of tests in modules using the -t
argument as follows:
run_tests.bat -t module.RunCommandTests # This will run all the tests in the RunCommandTests class in the module module.
The argument is the "dotted name" of the class containing the tests. The dotted name takes the form module.class
.
You can run tests by name using -t
argument as follows:
run_tests.bat -t module.RunCommandTests.test_that_GIVEN_an_initialized_pump_THEN_it_is_stopped # This will run the test_that_GIVEN_an_initialized_pump_THEN_it_is_stopped test in the RunCommandTests class in the module module.
The argument is the "dotted name" of the test containing the tests. The dotted name takes the form module.class.test
.
You can run multiple tests from multiple classes in different modules.
You can run multiple individual tests using the -t
argument as follows:
run_tests.bat -t example_module.ExampleClass.test_if_num_is_correct example_module2.AnotherExampleClass.test_if_bool_is_true
That will test the test_if_num_is_correct
and test_if_bool_is_true
from their respective classes. You can also run all tests from multiple specific modules or classes that you want.