tftest-to-junitxml

0.2.0 • Public • Published

Terraform Test to JUnit XML

A handy command line tool to translate terraform test json logs into compatible JUnit XML

This tool is particularly handy when wanting to report on test results in Azure DevOps pipelines using the PublishTestResults@2 task.

Currently this functionality exists only in the experimental terraform CLI tool and at time of writing seemingly has been abandoned.

Quick Start

  1. Generate the terraform test log
  terraform test -json | tee test-output.log
  1. Parse the log file
npx tftest-to-junitxml ./test-output.log

Note: By default the output file name is TEST-terraform.xml, this will be picked up by default when using the PublishTestResults@2 tas in Azure DevOps pipelines. It can be modified by using the --output [OutputFileLocation] flag

TODO

  • [ ] Automate npm publishing
  • [ ] Include test suite

Package Sidebar

Install

npm i tftest-to-junitxml

Weekly Downloads

45

Version

0.2.0

License

ISC

Unpacked Size

23.2 kB

Total Files

26

Last publish

Collaborators

  • liam-johnston