Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serenity bdd junit test results #1132

Closed
tfarrar opened this issue Feb 12, 2018 · 6 comments
Closed

serenity bdd junit test results #1132

tfarrar opened this issue Feb 12, 2018 · 6 comments

Comments

@tfarrar
Copy link

tfarrar commented Feb 12, 2018

Our QA team has a remote webserive we use to collect test results. After running each test I would like to upload test results to the to this web server using the Issues annotation. What is my best way to implement this use Serenity bdd junit screenplay framework? I thought you might have some special hooks into the framework were I can easily get pass/fail results.

@wakaleo
Copy link
Member

wakaleo commented Feb 12, 2018

The easiest way would be to write a custom reporter class, which, rather than writing a report, uploads the test outcome to the server.

@tfarrar
Copy link
Author

tfarrar commented Feb 13, 2018

Thanks for the idea, that does sound like a better solution to upload the results after the tests are complete. I was looking for an example of how to create custom reporting in serenity. Do you have link handy with the info or GitHub location I and refer to.

Thanks
Tim

@wakaleo
Copy link
Member

wakaleo commented Feb 16, 2018

It's not hard (implementing an interface and adding some metadata to your source path), but I need to write it up properly.

@tfarrar
Copy link
Author

tfarrar commented Feb 22, 2018

I was able to implement a solution using your GitHub example. https://github.com/serenity-bdd/serenity-cli
using - CLIOutcomeReportGenerator class.

Now I am trying to figure out the best way to start the post test report generator. Currently I am using maven pom.xml to start my build with the goal "clean verify" Do you have an suggestions?

@tfarrar
Copy link
Author

tfarrar commented Feb 22, 2018

I am use this maven plugin to run post report generator... mvn exec:java

   <plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>1.2.1</version>
  <executions>
    <execution>
      <goals>
        <goal>java</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <mainClass>com.classpath</mainClass>
  </configuration>
</plugin>

@wakaleo
Copy link
Member

wakaleo commented Feb 23, 2018

You can also register a reporter class to be executed at the same time at the other aggregate reports; unfotunately I haven’t written much about this feature as yet, but if you look at the ReportServices class (from memory) you should be able to see how it works.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants