Получение ошибки сбоя сборки из-за Не удалось выполнить цель org.apache.maven.plugins: maven-failsafe-plugin: 2.18: интеграционный тест - PullRequest
0 голосов
/ 29 мая 2018

Все мои тесты пройдены, но все равно, я получаю ошибку сбоя сборки

Выполнено тестов: 12, сбоев: 0, ошибок: 0, пропущено: 0

[ERROR] Failedвыполнить цель org.apache.maven.plugins: maven-failsafe-plugin: 2.18: интеграция-тест (по умолчанию) в проекте StoreTestUiAutomation: выполнение по умолчанию цели org.apache.maven.plugins: maven-failsafe-plugin: 2.18: интеграция-тесте не удалось: java.lang.RuntimeException: org.apache.maven.surefire.report.ReporterException: невозможно создать файл для отчета: C: \ Users \ Nageswar \ Desktop \ E-Florist \ qa-ui-Automation \ target \failsafe-reports_ smoketest.nageswar@qa.com _ Mine @ 123456 _ T11Z101A _ Новый получатель _ 07470 _ Nageswar _ Rao _ 55 широкая улица _ 8187828580 _ День рождения _ Nageswar _ тестовое сообщение _ Visa _ 4111111111111111 _ 123 _ Jan _ 2022 _ Nageswar_ Pattipati _ 13 nevins rd _ Wayne _ Нью-Джерси _ Соединенные Штаты _ 07470 _ 8187828580 _.txt (Неверный синтаксис имени файла, имени каталога или метки тома) -> [Помощь 1] [ОШИБКА]

TЭто мой pom.xml

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

<groupId>net.serenity-bdd.demos</groupId>
<artifactId>StoreTestUiAutomation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>StoreTest</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <serenity.version>1.2.4</serenity.version>
    <serenity.maven.version>1.2.4</serenity.maven.version>
    <serenity.cucumber.version>1.1.27</serenity.cucumber.version>
</properties>

<!-- Define the Bintray repos for convenience -->
<repositories>
    <repository>
        <id>serenity</id>
        <name>bintray</name>
        <url>http://dl.bintray.com/serenity/maven</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>serenity</id>
        <name>bintray-plugins</name>
        <url>http://dl.bintray.com/serenity/maven</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-junit</artifactId>
        <version>${serenity.version}</version>
    </dependency>
    <dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-rest-assured</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.6.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.7</version>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>1.3</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.8.0</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
    </dependency>
    <dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixapi</artifactId>
        <version>1.1.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.opencsv/opencsv -->
    <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>3.2</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>1.4</version>
            <executions>
                <execution>
                    <id>enforce</id>
                    <configuration>
                        <rules>
                            <requireUpperBoundDeps />
                        </rules>
                    </configuration>
                    <goals>
                        <goal>enforce</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
    <testFailureIgnore>true</testFailureIgnore>
 </configuration>
 </plugin>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.18</version>
            <configuration>
                <parallel>classes</parallel>
                <threadCount>1</threadCount>
                <argLine>-Xmx2048m</argLine>
                <forkCount>1</forkCount>
                <!-- <systemPropertyVariables> <webdriver.driver>${webdriver.driver}</webdriver.driver> 
                    </systemPropertyVariables> -->
                <includes>
                    <include>**/cucumber/junit/**/*.java</include>
                    <include>**/cucumber/*.java</include>
                </includes>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <classifier>exec</classifier>
            </configuration>
        </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.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>
<profiles>
    <profile>
        <id>firefox</id>
        <properties>
            <webdriver.driver>firefox</webdriver.driver>
        </properties>
    </profile>
    <profile>
        <id>chrome</id>
        <properties>
            <webdriver.driver>chrome</webdriver.driver>
            <webdriver.chrome.driver>chromedriver.exe</webdriver.chrome.driver>
        </properties>
    </profile>
    <profile>
        <id>phantomjs</id>
        <properties>
            <webdriver.driver>phantomjs</webdriver.driver>
        </properties>
    </profile>
</profiles>

, пожалуйста, помогите мне решить эту проблему.

1 Ответ

0 голосов
/ 31 мая 2018

Если вы используете операционную систему Windows, сообщение о ключе выглядит следующим образом:

"Неверный синтаксис имени файла, имени каталога или метки тома."См. Следующую ссылку, https://msdn.microsoft.com/en-us/library/ms832054.aspx,, где дано следующее объяснение:

The system does not accept the keyboard combination Alt+0 through Alt+32 or the following characters: \\ \\ / [ ] : | < > + ; = . ? "

User Action:
Correct the file name or volume label and try the command again.

Фактически, я вижу из ваших журналов следующее имя файла:

filename:
C:\Users\Nageswar\Desktop\E-Florist\qa-ui-automation\target\failsafe-reports_ smoketest.nageswar@qa.com _ Mine@123456 _ T11Z101A _ New Recipient _ 07470 _ Nageswar _ Rao _ 55 broad street _ 8187828580 _ Birthday _ Nageswar _ test message _ Visa _ 4111111111111111 _ 123 _ Jan _ 2022 _ Nageswar _ Pattipati _ 13 nevins rd _ Wayne _ New Jersey _ United States _ 07470 _ 8187828580 _.txt

IЯ попытался создать файл с таким именем в окне Windows и из командной строки это невозможно.Я получаю сообщение об ошибке:

C:\Users\Nageswar\Desktop\E-Florist\qa-ui-automation\target>echo. 2>"failsafe-reports_ smoketest.nageswar@qa.com _ Mine@123456 _ T11Z101A _ New Recipient _ 07470 _ Nageswar _ Rao _ 55 broad street _ 8187828580 _ Birthday _ Nageswar _ test message _ Visa _ 4111111111111111 _ 123 _ Jan _ 2022 _ Nageswar _ Pattipati _ 13 nevins rd _ Wayne _ New Jersey _ United States _ 07470 _ 8187828580 _.txt"
Impossibile trovare il percorso specificato.    

Если я пытаюсь сделать это из проводника Windows, это не дает сбоя, но имя файла автоматически усекается до:

failsafe-reports_ smoketest.nageswar@qa.com _ Mine@123456 _ T11Z101A _ New Recipient _ 07470 _ Nageswar _ Rao _ 55 broad street _ 8187828580 _ Birthday _ Nageswar _ test message _ Visa _ 4111111111111111 _ 123 _ Jan _ 2

Или,если я сохраню расширение:

failsafe-reports_ smoketest.nageswar@qa.com _ Mine@123456 _ T11Z101A _ New Recipient _ 07470 _ Nageswar _ Rao _ 55 broad street _ 8187828580 _ Birthday _ Nageswar _ test message _ Visa _ 4111111111111111 _ 123 _ Jan.txt

Итак, я думаю, проблема в том, что имя файла слишком длинное.

Надеюсь, это поможет.

...