arquillian / arquillian-recorder

Record & report your tests - takes screenshots, records videos & makes neat reports
Apache License 2.0
12 stars 14 forks source link

Report message and test result missing from test report #67

Open fheerdegen opened 7 years ago

fheerdegen commented 7 years ago
Issue Overview

In the arquillian xml report that is created from our integration tests, the report message and test result are missing for every test method.

Expected Behaviour

The arquillian xml report contains report messages and test results for every test method.

Current Behaviour

Report messages and test results are missing.

Steps To Reproduce
  1. Configure arquillian to create a report in XML format
  2. Start an arquillian test
  3. Inspect the created report file
Additional Information

We are using arquillian-recorder-reporter-impl 1.1.6.Final in our project. To be precise, the following dependencies can be found in our pom.xml:

<dependency>
    <groupId>org.arquillian.universe</groupId>
    <artifactId>arquillian-graphene</artifactId>
    <version>1.1.13.3</version>
    <type>pom</type>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.arquillian.universe</groupId>
    <artifactId>arquillian-junit</artifactId>
    <version>1.1.13.3</version>
    <type>pom</type>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.arquillian.universe</groupId>
    <artifactId>arquillian-graphene-recorder</artifactId>
    <version>1.1.13.3</version>
    <scope>test</scope>
    <type>pom</type>
</dependency>

Looking deeper into the code, it seems like the org.arquillian.recorder.reporter.impl.ReporterLifecycleObserver is expecting more AfterTestLifecycleEvents than are actually fired, thus, the test result is never set.

lgaida commented 7 years ago

I can confirm this. Any chance that this will be fixed ?

One could possibly create a new instance of ReporterLifeCycleObserver (e.g in the test-method) and call the observeAfterTest-method, which decreases the counter. In this way the result will be set. This only works because the observer uses a static hashmap to count the Before/AfterTestEvents and is a very dirty work around imo.

smiklosovic commented 7 years ago

If you prepare PR with the fix I will merge it for sure, I dont have any capacity do to this on my own anymore

medalpadev commented 6 years ago

Same issue for me. The report is empty. Only Title and Test suite are present