pytest-testinfra icon indicating copy to clipboard operation
pytest-testinfra copied to clipboard

How to use the junit ouput for testinfra if called by molecule

Open avcercel opened this issue 4 years ago • 1 comments

Hello folks,

I'm looking for a way to use junit output for the testinfra tests called by molecule. I know pytest can use --junit xml, I know that you can set options for testinfra under molecule.yml. Pytest with --junit xml is outputting what I want but I'm wondering if I can get testinfra to do the same if being called by molecule.

I've set the following:

# This template expects to run with moleculew providing baseline config; add non-default settings and overrides here.
verifier:
  name: testinfra
  options:
    junit-xml: alex.xml

and for the options I've used multiple approaches. I used --junitxml, I tried various other dictionary approaches but nothing seems to work.

Was wondering if you have any info about this.

Cheers,

Alex

avcercel avatar Sep 03 '21 10:09 avcercel

The following is working for me:

verifier:
  name: testinfra
  options:
    junitxml: ./report.xml

matclab avatar Jul 29 '22 15:07 matclab