Ошибка при запуске TestNG - невозможно найти имя приложения при поиске - PullRequest
0 голосов
/ 19 ноября 2018

Я пытаюсь запустить некоторые Cucumber функциональные тесты для настройки TestNG в IntelliJ IDE.Так как функциональные тесты уже существовали в проекте (и они работали), и я просто пытаюсь их запустить, это должно быть некоторой проблемой конфигурации.

В конфигурации Run / Debug я создал новую "TestNG "рабочая конфигурация, где я установил

- the class I want to run (containing the functional tests)
- the VM options: -ea -Dproject.parent.version="2.78.0-SNAPSHOT" -Ddocker.image.env=dev -Dcucumber.options="classpath:com/[...]/providerResponse.feature:11"
- the classpath of the module
- the JRE
- the build maven command: clean install -P run-automated-test -Dmaven.test -Dmaven.test.skip.exec=true

, где run-automatic-test определяется следующим образом:

<profile>
    <id>run-automated-test</id>
    <build>
        <plugins>
            <plugin>
                <!-- Overwrite resources with functional resources -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/main/functional-tests-resources</directory>
                                </resource>
                            </resources>
                            <overwrite>true</overwrite>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</profile>

Когда я ее запускаю, у меня появляется это сообщение об ошибке:

[TestNG] Running:
C:\Users\[...]\.IntelliJIdea2018.2\system\temp-testng-customsuite.xml
ERROR - Unable to find the Application Name with lookup
INFO - Creating new oracle
INFO - Creating new oracle initializer for the artifact=Artifact{uuid='c5cc7131-4caa-4959-87d2-f7d32c37b1de', groupId='com.[...].gateway', artifactId='accommodation-gateway', version='2.78.0-SNAPSHOT'}
INFO - Creating new module for the artifact=Artifact{uuid='c5cc7131-4caa-4959-87d2-f7d32c37b1de', groupId='com.[...].gateway', artifactId='accommodation-gateway', version='2.78.0-SNAPSHOT'}
INFO - build: ProgressMessage{id=null, status=null, stream=Step 1/2 : FROM accommodation-gateway, error=null, progress=null, progressDetail=null}
INFO - build: ProgressMessage{id=null, status=null, stream=
, error=null, progress=null, progressDetail=null}
ERROR - Error starting functional test containers

Временный файл "temp-testng-customsuite.xml" содержит:

<suite name="Default Suite">
  <test name="accommodation-gateway-parent">
    <classes>
      <class name="com.[...].FunctionalSetUp"/>
    </classes>
  </test>
   <!--  accommodation-gateway-parent  -->
  </suite>
<!--  Default Suite  -->
...