= Serenity BDD and Maven

== Generating the full Serenity reports

Since the Serenity reports contain aggregate information about all of the tests, they are not generated after each individual test (as this would be extremely inefficient). Rather, The Full Serenity reports are generated by the `serenity-maven-plugin`. You can trigger this by running `mvn serenity:aggregate` from the command line or from your IDE.

They reports are also integrated into the Maven build process: the following code in the `pom.xml` file causes the reports to be generated automatically once all the tests have completed when you run `mvn verify`:

[source,xml]
----
   <plugin>
      <groupId>net.serenity-bdd.maven.plugins</groupId>
      <artifactId>serenity-maven-plugin</artifactId>
      <version>${serenity.maven.version}</version>
      <configuration>
          <tags>${tags}</tags>
      </configuration>
      <executions>
          <execution>
              <id>serenity-reports</id>
              <phase>post-integration-test</phase>
              <goals>
                  <goal>aggregate</goal>
              </goals>
          </execution>
      </executions>
  </plugin>
----

== Checking test results

Sometimes (for example during a CI build process) you may need to check the status of a test run after running it. You can do this using the

----
$mvn serenity:check
----
