serenity-bdd / serenity-maven-plugin

19 stars 21 forks source link

ERR_FILE_NOT_FOUND when click on a test in a Report #61

Closed ghost closed 6 years ago

ghost commented 6 years ago

I am using version 1.9.4.

My pom.xml is: `<?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
<groupId>com.someproject.automation</groupId>
<artifactId>automation-poc-3Apr</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>1.9.4</serenity.version>
    <serenity.maven.version>1.9.4</serenity.maven.version>
    <webdriver.driver>chrome</webdriver.driver>
</properties>

<dependencies>

    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>

    <!-- http://mvnrepository.com/artifact/net.serenity-bdd/serenity-core -->
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>${serenity.version}</version>
    </dependency>

    <!-- http://mvnrepository.com/artifact/net.serenity-bdd/serenity-cucumber -->
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-cucumber</artifactId>
        <version>${serenity.version}</version>
    </dependency>

    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>${serenity.version}</version>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.25</version>
    </dependency>

</dependencies>

<build>

    <plugins>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.21.0</version>
            <configuration>
                <includes>
                    <include>**/*Runner.java</include>
                </includes>
            </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.7.0</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.maven.version}</version>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-core</artifactId>
                    <version>${serenity.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

`

Now if I click on specific test in a report I get

Your file was not found It may have been moved or deleted. ERR_FILE_NOT_FOUND

And I really can not find html file with this name, but I can find json with the same name. Issue or something wrong in configuration?

wakaleo commented 6 years ago

Can you post your serenity.properties file?

ghost commented 6 years ago

Sure

serenity.project.name = Sample Serenity BDD project using Cucumber

serenity.use.unique.browser = true serenity.restart.browser.for.each = scenario

serenity.browser.height = 1050 serenity.browser.width = 1680 serenity.dry.run=false

security.enable_java = true

serenity.test.root=net.thucydides.showcase.cucumber.junit

webdriver.timeouts.implicitlywait = 1000 serenity.take.screenshots=AFTER_EACH_STEP webdriver.base.url=http://localhost:8081/app/

webdriver.driver = provided webdriver.provided.type = mydriver webdriver.provided.mydriver = driver.ExtendedDriver thucydides.driver.capabilities = mydriver

wakaleo commented 6 years ago

I can't see anything obvious; it might be something to do with the names or directory structure of your feature files. Could you provide a sample project?

ghost commented 6 years ago

Done

automationpoc3Apr.zip

wakaleo commented 6 years ago

The sample application works fine with serenity-core 1.9.7, serenity-maven-plugin 1.9.7 and serenity-cucumber 1.9.4

ghost commented 6 years ago

Thanx a lot. Works! But why 1.9.4 does not?

wakaleo commented 6 years ago

There was a date-dependent issue in the report generation.