Run tests
Run tests
The mtracer run command allows you to execute the tests passed as arguments or, if none are provided, all the tests present in the working directory.
The tests are executed sequentially to prevent the configurations of one from interfering with those of the others.
Command execution
mtracer run [test1.mt.yaml] [test2] ... [flags]You can specify tests with or without the .mt.yaml extension; in both cases, Mtracer will correctly recognize the file.
Furthermore, if no test is specified, all tests present in the current working directory and its subdirectories will be executed.
Flags
The mtracer run command supports the following flags:
--countor-c: allows you to specify the number of times to run the tests. If not specified, the tests will be executed only once.--export-toor-e: allows the export of test results in different formats simultaneously by repeating the same flag with a different value. Supported formats are:json,markdownormdandjunit.
Example:mtracer run test1.mt.yaml -e json -e mdwill export the results in JSON and Markdown formats.--analyticsor-a: allows the export of trace and span statistics generated by the executed tests. Multiple export formats can be specified simultaneously by repeating the same flag with a different value. Supported formats are:jsonandhtml. You can learn more about this feature on the Exporting statistics page.--diror-d: allows you to specify the working directory. If not specified, the working directory will be the one from which the command is executed.--verboseor-V: enables detailed output to provide more in-depth information about the test execution.--quietor-q: disables the output of the executed tests’ results, showing only any errors or warnings.
It is important to know that the paths defined within the tests must be relative to the location of the test file itself, and not to the working directory specified with the
--dir flag or where the command is executed.