Skip to content

Simple and lightweight XML unittest runner for Python with test-suite support.

License

Notifications You must be signed in to change notification settings

fh1ch/XMLTestExecutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

XMLTestExecutor

Simple and lightweight XML unittest runner for Python with test-suite support.

Goal

The intention of XMLTestExecutor is to support the jUnit XML format including the property tags, but also be lightweight and easy to use at the same time. The second goal is to provide full compatibility of the reports with build systems likes Jenkins. The project was designed and also tested to fit these needs. Another important feature is the execution of multiple unittests which are combined in one test-suite.

License

This project is licensed under the MIT license. Please check out the LICENSE.md file for more information.

Usage

The usage is quiet simple. Just include XMLTestExecutor.py into your own project:

import XMLTestExecutor

And replace the default Python unittest runner with the XMLTestExecutor like this:

fpointer = file("testReport.xml", "wb")
runner = XMLTestExecutor.XMLTestExecutor(stream=fpointer, name="XMLTestExecutor example report")
runner.run(testSuit)

XMLTestExecutor does also support the property tags provided by the jUnit XML format. You can set the property tags by using:

props = [("Target", "TestVM01"), ("Version", "01.33.215"), ("Branch", "NIGHTLY")]
runner = XMLTestExecutor.XMLTestExecutor(stream=fpointer, properties=props, name='XMLTestExecutor example report')

Beneath the report provided by the stream parameter, XMLTestExecutor will also print metadata like the properties, test name and the statistical results to the console. If no stream is provided, XMLTestExecutor will print the report to the console as well.

About

Simple and lightweight XML unittest runner for Python with test-suite support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages