junit - write playbook output to a JUnit file.

Synopsis

  • This callback writes playbook output to a JUnit formatted XML file.
  • Tasks show up in the report as follows: ‘ok’: pass ‘failed’ with ‘EXPECTED FAILURE’ in the task name: pass ‘failed’ with ‘TOGGLE RESULT’ in the task name: pass ‘ok’ with ‘TOGGLE RESULT’ in the task name: failure ‘failed’ due to an exception: error ‘failed’ for other reasons: failure ‘skipped’: skipped

Requirements

The below requirements are needed on the local master node that executes this callback.

  • whitelist in configuration
  • junit_xml (python lib)

Parameters

Parameter Choices/Defaults Configuration Comments
fail_on_change Default:
no
env:JUNIT_FAIL_ON_CHANGE
Consider any tasks reporting "changed" as a junit test failure
fail_on_ignore Default:
no
env:JUNIT_FAIL_ON_IGNORE
Consider failed tasks as a junit test failure even if ignore_on_error is set
output_dir Default:
~/.ansible.log
env:JUNIT_OUTPUT_DIR
Directory to write XML files to.
task_class Default:
no
env:JUNIT_TASK_CLASS
Configure the output to be one class per yaml file

Status

Author

  • UNKNOWN

Hint

If you notice any issues in this documentation you can edit this document to improve it.

© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.5/plugins/callback/junit.html