Код: Выделить всё
mvn surefire:test -Dtest=OneTest.java
Код: Выделить всё
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"summary","pretty","com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:", "json:target/cucumber-report/TestResult.json"},
monochrome = false,
features = "src/test/resources/features/SampleTestFeatures/SampleTest.feature",
glue="Steps")
public class OneTest{
}
Код: Выделить всё
1 Scenarios (1 passed)
6 Steps (6 passed)
0m30,603s
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 31.923 s - in Runners.OneTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 43.123 s
[INFO] Finished at: 2019-11-22T15:12:11+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project test: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Код: Выделить всё
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
tony
test
1.0-SNAPSHOT
1.7.26
2.11.2
org.slf4j
slf4j-api
${slf4j.version}
org.apache.logging.log4j
log4j-slf4j-impl
${log4j.version}
org.apache.logging.log4j
log4j-api
${log4j.version}
org.apache.logging.log4j
log4j-core
${log4j.version}
xerces
xercesImpl
2.11.0
io.cucumber
cucumber-java
4.7.2
test
io.cucumber
cucumber-core
4.7.2
io.cucumber
cucumber-testng
4.7.2
org.apiguardian
apiguardian-api
1.1.0
io.cucumber
cucumber-junit
4.8.0
test
org.junit.jupiter
junit-jupiter-engine
5.3.1
test
org.mockito
mockito-core
2.28.2
test
org.seleniumhq.selenium
selenium-java
3.141.59
io.cucumber
cucumber-picocontainer
4.8.0
test
io.github.bonigarcia
webdrivermanager
3.6.2
org.assertj
assertj-core
3.13.2
test
org.apache.poi
poi
4.1.0
org.apache.poi
poi-ooxml
4.1.0
javax.ws.rs
javax.ws.rs-api
2.1
org.glassfish
javax.json
1.0.4
com.github.mkolisnyk
cucumber-runner
1.3.5
org.glassfish.jersey.core
jersey-client
2.28
org.glassfish.jersey.media
jersey-media-multipart
2.28
org.glassfish.jersey.core
jersey-common
2.28
org.glassfish.jersey.inject
jersey-hk2
2.28
org.json
json
20190722
org.glassfish.jersey.media
jersey-media-json-jackson
2.29
com.fasterxml.jackson.core
jackson-databind
2.9.8
io.codearte.jfairy
jfairy
0.5.9
net.masterthought
maven-cucumber-reporting
2.8.0
com.aventstack
extentreports-cucumber4-adapter
1.0.5
com.aventstack
extentreports
4.0.9
com.vimalselvam
cucumber-extentsreport
3.1.1
com.googlecode.json-simple
json-simple
1.1.1
org.postgresql
postgresql
42.2.8
javax.mail
javax.mail-api
1.6.2
com.sun.mail
javax.mail
1.6.2
org.apache.maven.plugins
maven-compiler-plugin
3.8.1
1.8
1.8
org.jacoco
jacoco-maven-plugin
0.8.2
org.apache.maven.plugins
maven-surefire-plugin
3.0.0-M4
**/*Test
org.apache.maven.plugins
maven-assembly-plugin
3.1.1
fully.qualified.MainClass
jar-with-dependencies
ОБНОВЛЕНИЕ:
Я знаю, что следующее не является разумным вариантом, но замена плагина maven Surefire, как показано ниже, устранила мою проблему без изменения каких-либо других зависимостей в pom
Код: Выделить всё
org.apache.maven.plugins
maven-surefire-plugin
2.22.2
org.apache.maven.surefire
surefire-junit47
2.22.2
both
4
**/*Test
Мобильная версия