-2

I am trying to use the Serenity JAR's while doing the Selenium BDD Automation.

Can anyone suggest me that which annotations i am suppose to use so that execiution report is generated after complete execution.

I am using below combination for Automation

Selenium+WebDriver+Maven+JBehave+Serenity.

Waiting for the response.Thanks.

Mandar Joshi
  • 29
  • 1
  • 8

1 Answers1

0

you need to add this plugin to your POM

            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>1.1.2</version>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
Mrunal Gosar
  • 4,595
  • 13
  • 48
  • 71
  • I have already added this plugin into my POM File but reports are not generated.Do i need to add any annotations above the class for serenity so that when that particular step class is executed then it will generate the reports.I am new to the serenity so correct me if am wrong. – Mandar Joshi Jan 14 '16 at 14:19
  • I believe you are already using "@Steps" for step injection and "@Step" for notifying serenity of the individual steps methods – Mrunal Gosar Jan 14 '16 at 14:52
  • I have already added the above plug-in into my POM file but not getting the final results somehow.Not getting what went wrong. – Mandar Joshi Jan 18 '16 at 08:16
  • are u using "@step" and "@steps" annotation properly – Mrunal Gosar Jan 18 '16 at 09:01
  • Ohh shitt !! I think syntax might be wrong for step and steps.Can u please type here the correct syntax so that i can cross verify once.Thanks. – Mandar Joshi Jan 18 '16 at 10:04
  • Well you annotate your step methods with '@Step' annotation and then while injecting steps into your main steps definitions use '@Steps' annotation over an instance of the class containing steps. IDE Intellisense to the rescue!!! – Mrunal Gosar Jan 18 '16 at 10:50