Open ckeiner opened 6 years ago
I ran into the same issue. To me it seems that specs having the same description in suites with the same description causes this incorrect reporting. I worked around it by using a delegation base class and appending a random number to the spec descriptions.
Spectrum only offers Data-Driven-Tests with the
scenarioOutline
-method defined in the gherkinDSL. However, while they can be nested like SpecificationDSL'sdescribe
, the JUnit report isn't correct when more than one example is used. The report shows all examples but cannot assign a status to it, i.e show that it passed or failed.Here's a minimal example:
And the corresponding report in Eclipse:
The first example, Chrome, does not have any status, neither do the children of it.
In addition, if an error occurs, the test suite fails but no test shows any failure. Here's an example, which fails when the outer scenarioOutline receives "Chrome" as example:
The JUnit report as shown in Eclipse:
The report further shows, that the
when
andthen
step of thescenario
in thescenarioOutline
were ignored, which isn't true for the Firefox example.Since a scenarioOutline can already contain other scenario(Outline)s, it would be nice if the report were correct. This would also add the ability to supply test data to Spectrum's fixtures (beforeEach, beforeAll, etc.) , which is often very helpful.