pytest
pytest is a testing framework for Python.
Enabling XML Output
pytest can produce JUnit XML output by running with the --junit-xml=
option.
Test Suite Naming
pytest will automatically fill in values for the and name
and classname
attributes.
would produce output that looks like this:
The suite name can be configured in the pytest.ini
or similar config file.
Configuring other XML output values is not currently supported, but experimental options are available. To include the test filenames in the XML output, use the -o junit_family=xunit1
option.
By default, pytest will include the file
attribute in the output XML.
Further Information
See an example of running pytest in a GitHub action here.
Last updated