2

Cucumber と Serenity を使用して、Java の Maven を使用して IntelliJ IDEA で Serenity レポートを生成しようとしています。

これは私のランナーです:

import cucumber.api.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
        features =  {"src/test/resource/features/Matest.feature"},
        glue=       {"stepdefs"},
        monochrome = true,
        tags =      {"~@Ignore"},
        plugin =    {
                "pretty", "html:target/serenity-reports/jalaja/serenity-html-report",
                "json:target/serenity-reports/jalaja/SerenityTestReport.json",
                "rerun:target/serenity-reports/jalaja/rerun.txt"}
)
public class SerenityRunner {
}

これが私の serenity.properties ファイルです。

serenity.project.name = "automation_test_cukes"
serenity.test.root =  "src/test/resource/features"
serenity.outputDirectory = target/serenity-reports/jalaja
serenity.take.screenshots= FOR_EACH_ACTION
serenity.reports.show.step.details = true
serenity.store.html.source = true
json.pretty.printing = true
serenity.requirement.types= feature
serenity.compress.filenames= false

一方、これは私の POM ですが、これらの依存関係のバージョンでは、私のラップトップで Cucumber を実行する唯一の方法です。

<?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>cl.cooper</groupId>
    <artifactId>automation_test_cukes</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <cucumber.version>1.2.5</cucumber.version>
        <serenity.version>1.2.5-rc.6</serenity.version>
        <serenity.cucumber.version>1.1.29</serenity.cucumber.version>
           <java.version>8</java.version>
       </properties>

       <dependencies>
           <!-- CUCUMBER DEPENDENCIES -->
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-jvm</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.mkolisnyk</groupId>
            <artifactId>cucumber-runner</artifactId>
            <version>1.3.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.mkolisnyk</groupId>
            <artifactId>cucumber-report-generator</artifactId>
            <version>1.3.3</version>
            <scope>test</scope>
        </dependency>
        <!-- CUCUMBER DEPENDENCIES -->
        <!-- SELENIUM DEPENDENCIES -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-api</artifactId>
            <version>3.12.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-ie-driver</artifactId>
            <version>3.12.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <version>3.12.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.12.0</version>
        </dependency>
        <!-- SELENIUM DEPENDENCIES -->
        <dependency>
            <groupId>com.github.stephenc.monte</groupId>
            <artifactId>monte-screen-recorder</artifactId>
            <version>0.7.7.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.17</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>22.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>2.9.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

        <!--SERENITY DEPENDENCIES-->
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-core</artifactId>
            <version>1.2.5-rc.6</version>
        </dependency>
        <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>1.2.5-rc.6</version>
        </dependency>
        <dependency>
            <groupId>net.serenity-bdd</groupId>
            <artifactId>serenity-cucumber</artifactId>
            <version>1.1.29</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.25</version>
        </dependency>
        <!--SERENITY DEPENDENCIES-->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.21.0</version>
                <configuration>
                       <includes>
                            <include>runners.TestRunner.java</include>
                        </includes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <source>8</source>
                        <target>8</target>
                    </configuration>
                </plugin>

            <!--SERENITY PLUGINS-->
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.21.0</version>
                <configuration>
                    <includes>
                        <include>SerenityRunner.java</include>
                    </includes>
                    <reuseForks>true</reuseForks>
                </configuration>
                <executions>
                     <execution>
                         <goals>
                             <goal>integration-test</goal>
                             <goal>verify</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
                 <groupId>net.serenity-bdd.maven.plugins</groupId>
                 <artifactId>serenity-maven-plugin</artifactId>
                 <version>1.9.20</version>
                 <executions>
                     <execution>
                         <id>serenity-reports</id>
                         <phase>post-integration-test</phase>
                         <goals>
                             <goal>aggregate</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
             <!--SERENITY PLUGINS-->

            </plugins>
        </build>
        <reporting>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>2.21.0</version>
                </plugin>
            </plugins>
        </reporting>
    </project>

通常のレポートが生成されていますが、画像をクリックしようとするこの画像と次の結果が表示されます見つかりません

誰でもこれで私を助けることができますか?

4

0 に答える 0