cucumber/cucumber-jvm — pull request #626 by sirchia (2013-11-09 01:52:39+00:00)
Title: Restructured JUnit class/method name reporting

I propose the following slight tweaks to the way the scenarios/steps are mentioned in the name and classname attributes of the JUnit XML report:
“Scenario( Outline): ” map to the ‘package’ of the JUnit reported classname
“||” or “Scenario” map to the class name of the JUnit reported classname
“ step description” map to the name of the JUnit reported test case

The main reason for this change is to have a more structured view in a JUnit based test overview page like that of Jenkins, where on the 1st page a list of packages (=scenario names) is shown. Clicking on a package shows all test classes (=examples, or just 'Scenario' if it isn't an outline scenario) in that package. Clicking on a class shows all test methods (=steps of that scenario).

Also, failing tests are shown on the overview page with their complete package.classname.testmethod description and with this mapping, it is instantly clear which step of which scenario (example) has failed.

In order to make sure the parsing of packages (substring of 0 - in classname) and JUnit internal distinction of class and method in its description goes alright, the following character replacements are done in the scenario and descriptions and example rows:
. translates to ,
( translates to {
) translates to }