serenity-bdd / serenity-maven-plugin

19 stars 21 forks source link

Serenity-bdd report is empty with the maven plugin; but the test case is passing #50

Closed javvajiamani closed 7 years ago

javvajiamani commented 8 years ago

I am facing a issue in generating serenity reports, my test cases are passing and I'm getting proper response but the report are empty

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                             http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>activation.test</groupId>
  <artifactId>web-automation-suite</artifactId>
  <version>1.1.8</version>
  <packaging>jar</packaging>

  <name> Test Automation</name>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>1.1.26-rc.3</serenity.version>
    <serenity.cucumber.version>1.1.1</serenity.cucumber.version>
    <webdriver.driver>phantomjs</webdriver.driver>
  </properties>

  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>bintray</name>
      <url>http://jcenter.bintray.com</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>bintray-plugins</name>
      <url>http://jcenter.bintray.com</url>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>net.serenity-bdd</groupId>
      <artifactId>serenity-core</artifactId>
      <version>${serenity.version}</version>
    </dependency>
    <dependency>
      <groupId>net.serenity-bdd</groupId>
      <artifactId>serenity-cucumber</artifactId>
      <version>${serenity.cucumber.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.7</version>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>1.7.0</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.3.1</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18.1</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.18.1</version>
        <configuration>
          <includes>
            <include>**/*.java</include>
          </includes>
          <argLine>-Xmx512m</argLine>
          <systemPropertyVariables>
            <webdriver.driver>${webdriver.driver}</webdriver.driver>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.serenity-bdd.maven.plugins</groupId>
        <artifactId>serenity-maven-plugin</artifactId>
        <version>${serenity.version}</version>
        <executions>
          <execution>
            <id>serenity-reports</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Maven Assembly Plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <!-- get all project dependencies -->
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <!-- MainClass in mainfest make a executable jar -->
          <archive>
            <manifest>
              <mainClass>mytestsuite</mainClass>
            </manifest>
          </archive>

        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <!-- bind to the packaging phase -->
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>
wakaleo commented 8 years ago

Can you add the console output?

Sent from my iPhone

On 2 Sep 2016, at 19:53, javvajiamani notifications@github.com wrote:

I am facing a issue in generating serenity reports, my test cases are passing and I'm getting proper response but the report are empty

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0 activation.test web-automation-suite 1.1.8 jar Test Automation UTF-8 1.1.26-rc.3 1.1.1 phantomjs false central bintray http://jcenter.bintray.com false central bintray-plugins http://jcenter.bintray.com net.serenity-bdd serenity-core ${serenity.version} net.serenity-bdd serenity-cucumber ${serenity.cucumber.version} org.slf4j slf4j-simple 1.7.7 org.assertj assertj-core 1.7.0 commons-logging commons-logging 1.2 commons-cli commons-cli 1.3.1 org.apache.maven.plugins maven-surefire-plugin 2.18.1 true maven-failsafe-plugin 2.18.1 *_/_.java -Xmx512m ${webdriver.driver} integration-test verify org.apache.maven.plugins maven-compiler-plugin 3.2 1.8 1.8 net.serenity-bdd.maven.plugins serenity-maven-plugin ${serenity.version} serenity-reports post-integration-test aggregate ``` org.apache.maven.plugins maven-assembly-plugin 2.4.1 jar-with-dependencies mytestsuite make-assembly package single ```

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.