пытается запустить все мои тесты на огурец с TestNG. Однако мой набор не найден.
Я видел несколько вопросов о стековом потоке, но ни один из них не решил мою проблему.
Runner - junitRunner.java
package testRunner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.SnippetType;
import cucumber.api.junit.Cucumber;
//@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/resources/features/",
glue = "br.mysteps.steps"
)
public class junitRunner {
}
testng.xml
<suite name="SeleniumSuite">
<test name="testAll">
<classes>
<class name="testRunner.junitRunner"/>
</classes>
</test>
</suite>
pom.xml
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
</dependencies>
Когда я запускаю файл testng.xml как TestNG, тесты не обнаруживаются, как показано ниже
[RemoteTestNG] detected TestNG version 6.11.0
[TestNGContentHandler] [WARN] It is strongly recommended to add "<!DOCTYPE
suite SYSTEM "http://testng.org/testng-1.0.dtd" >" at the top of your
file, otherwise TestNG may fail or not work as expected.
===============================================
SeleniumSuite
Total tests run: 0, Failures: 0, Skips: 0
===============================================