cucumberbuild.gradlecucumber-junit

Cucumber junit-xml-formatter: How to set testsuite name (with Gradle)?


I'm producing JUnit XMLs executing Cucumber tests with Gradle. The result XML looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<testsuite name="Cucumber" time="109.736" tests="2" skipped="0" failures="0" errors="0">
<testcase classname="My Feature name" name="Scenario 1's name" time="46.108">
<system-out><![CDATA[
...
]]></system-out>
</testcase>
<testcase classname="My Feature name" name="Scenario 2's name" time="49.965">
<system-out><![CDATA[
...
]]></system-out>
</testcase>
</testsuite>

My question: Is there any way to change the testsuite's name? It's "Cucumber" for all XMLs, but I need it to contain the file name.


Solution

  • As M.P. Korstanje pointed out in his comment, junit-xml-formatter hard-coded "Cucumber" as the suite's name (see here). So the answer to my qquestion would be: No (besides forking said repo or processing the XML after creation, of course).