0

allure serve command resulttemp folder index.html

pom.xml `http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

    <groupId>cucumber</groupId>
    <artifactId>cucumberjvm-selenium-pageobject</artifactId>
    <version>0.0.1</version>
    <packaging>jar</packaging>
    <name>Cucumber-JVM Selenium page object</name>

    <properties>
        <aspectj.version>1.8.10</aspectj.version>
        <cucumber.version>1.2.0</cucumber.version>
        <picocontainer.version>2.15</picocontainer.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>

        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-testng</artifactId>
            <version>2.6.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.codeborne</groupId>
            <artifactId>phantomjsdriver</artifactId>
            <version>1.2.1</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.44.0</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.9</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.11-beta3</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-cucumber-jvm</artifactId>
            <version>2.6.0</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.7.1</version>
        </dependency>

    </dependencies>

    <build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.20</version>
            <configuration>
            <systemProperties>
            <property>
              <name>allure-results</name>
              <value>${allure.results.directory}</value>
            </property>
          </systemProperties>
                <argLine>
                    -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                    -Dcucumber.options="--plugin io.qameta.allure.cucumberjvm.AllureCucumberJvm"
                </argLine>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjweaver</artifactId>
                    <version>${aspectj.version}</version>
                </dependency>
            </dependencies>

        </plugin>
        <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
    </plugins>
</build>

</project>

RunCukesTest.java
`
`package step_definitions;

import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.api.junit.*;


@RunWith(Cucumber.class)
@CucumberOptions(
        features = {"src/test/resources/"},
        plugin = {"io.qameta.allure.cucumberjvm.AllureCucumberJvm",
                "pretty", "json:target/allure-results/Cucumber.json",
                "html:target/allure-results"},
        tags = {}
        )



public class RunCukesTest{

}`

I am able to run mvn clean test and generate the allure-results which contains the json files.

How to convert the the generated result to allure report? I have tried generating using allure command line : allure generate , but the html file will be blank except allure headers. Can anyone help on this , I am running cucumberjvm . @Dmitry Baev

maya248
  • 9
  • 2
  • 6
  • see https://stackoverflow.com/questions/23997449/allure-report-nothing-shown-in-chrome – Dmitry Baev Jul 19 '18 at 13:49
  • 1
    also you can use `allure serve ` command in order to generate & open report in your default browser – Dmitry Baev Jul 19 '18 at 13:50
  • @Dmitry ,thanks for the suggestion . I tried with allure serve . please find the attachments . 1. allure serve target\allure-results . 2.Opening the index.html created in temp folder. – maya248 Jul 20 '18 at 06:13
  • @DmitryBaev , Can you please guide me if I need to update something else. – maya248 Jul 20 '18 at 06:18
  • @maya248 try to open index.html in target/site/allure-maven-plugin folder, using firefox instead of chrome – AutomatedOwl Jul 22 '18 at 12:02
  • @DmitryBaev Facing similar issue running on Cucumber6 and allure 2.14.0 --No plugin found for prefix 'allure' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/rishikhanna/.m2/repository), central (repo.maven.apache.org/maven2)] --------- My sample POM file : https://github.com/rkhanna1401/cucumber_selenium_grid/blob/master/pom.xml Any suggestion is appreciated – RISHI KHANNA Jun 29 '21 at 14:08

0 Answers0