Execute Python test case
Execute test case with command line
Basic execution command line
To run test cases with xTR, use the following command-line:
xtr
# The path to Results directory.
--output_path Results
core
# The path to the Framework configuration file (MTF configuration file).
--config config/Test_bench_config/Test_bench_name/Test_bench_config.yaml
# The path to the Database file.
--database config/Databases/database_name.db
run
# The path to to the XML test series file.
--test_series config/Test_series/Test_series1_name.xml
# The path to Tests directory.
--search_paths Tests
xtr The command to run XTR.
output_path: The target directory where the reports will be saved.
core: The command for framework configuration.
config: The path to the Framework configuration file, which is in the case the MTF the test bench configuration file, also known as the channel mapping YAML file.
database: The path to the database file.
run: The command to start the test execution.
test_series: The path to the XML test series file.
search_paths: The directories that the Python interpreter should check when searching for modules.
Extra execution commands
ecus
The list of ECUs under test.
ecus
# The list of ECUs.
--ecu
# The path to the ECUs configuration file.
--config
testbench
The test bench.
testbench
# The name of the test bench.
--name
# The path to the test bench config folder.
--config
pytest
The extension of the default pytest command.
pytest
# The list of extra arguments to be forwarded to pytest as key=value or single values.
--arg
# The list of additional plugins to be forwarded to pytest.
--plugins
project_options
The project’s options.
project_options
# The list of extra arguments for project.
--arg
# A dictionary of extra arguments for project.
--kwarg