Search code examples
jenkinslettuce

How can I display Lettuce test results in Jenkins


I have a suite of Lettuce tests, which I run under Jenkins. I would like to have Jenkins parse and display the test results.

Currently I am doing:

lettuce --with-xunit --xunit-file=lettucetests.xml

and I use the Jenkins JUnit plugin to "publish" the test report.

Jenkins does generate a correct summary of the test results, but any attempts to drill down into test failures gives a 404 - see the screenshot below, for example.

The problem may be related to punctuation in the feature, scenario, and step names - but I don't want to have to forbid punctuation.

I have also tried the following, but it didn't seem much better.

lettuce --with-subunit
subunit2junitxml < subunit.bin > lettucetests.xml

Does anybody have a reliable way of handling Lettuce test results in Jenkins?

screenshot


Solution

  • --with-xunit (and the Junit plugin) remains the best solution I've found so far.

    The problem I highlighted above appears to happen in one of two situations:

    • There is a sequence of two or more dots anywhere in the 'Feature' or 'Scenario' name.
    • The 'Scenario' name ends with a dot (which is more-or-less a special case of the above, since the lettuce framework appends a dot to the name of the Scenario when writing the test results).

    It's therefore possible to work around the problem by being careful how you name scenarios and features.