Skip to main content

A tool for generating junit output from a shell

Project description

sh_junit_xml

This a simple wrapper around the junit_xml python library to allow for generating junit xml files from a shell. The main use case for this is generating test results for jenkins from shell scripts.

Installation

Install via pip:

pip install sh_junit_xml

Install from source:

./setup.py install

Usage

The script wraps all arguments passed to junit_xml.TestCase.__init__() so that you can construct any arbitrary test case that is available through this class. The each argument is simply prepended with -- and remains otherwise identical. Most arguments are treated as strings but a few special cases are converted after they are read in from the command line, such as --elapsed_sec which is converted to a number since it is expected in that format. Additionally arguments that start with @ will be treated as filename, which are opened and the contents are passed as the argument.

In addition to the automatic arguments generated from the TestCase constructor the following arguments are available: --suite: Specify the suite name --failure: Mark the test as failed and pass the failure message. --error: Mark the test as an error and pass the error message. --skipped: Mark the test as skipped and pass the skipped message

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sh_junit_xml-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

sh_junit_xml-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file sh_junit_xml-1.0.0.tar.gz.

File metadata

  • Download URL: sh_junit_xml-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for sh_junit_xml-1.0.0.tar.gz
Algorithm Hash digest
SHA256 93a016ba81df92686751b55964ac6e1802e210b304a181cc952d205e4a9ab99e
MD5 7d9213794a70405a3e5f7b24afcbda77
BLAKE2b-256 bf1634268e2fc4093204fc8ed30b0e1d0a38e30b73107cf7a33ae56438d9d658

See more details on using hashes here.

File details

Details for the file sh_junit_xml-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sh_junit_xml-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.4

File hashes

Hashes for sh_junit_xml-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2781213eeda400c7550c44120fa53b4551ce44004ec29324d874f0aa9303546f
MD5 75fe69ecc8d98137063e7f94f7c8e6dd
BLAKE2b-256 c8d7c264067a04daffc80ebf849921a6629fdef6f00e3d51ce97d4a0efbd4dca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page