I am facing an issue, unable to execute the my Runner file in the CMD mode
Here is my Runner class
package CFPlatform.runner;
import io.cucumber.junit.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.
class)
@CucumberOptions(
features = "src/test/resources/features",
glue = "CFPlatform.glue",
plugin = {"pretty", "html:target/cucumber-reports"}
)
public class CFPlatformRunner {
}
and my build.gradle file as
plugins {
id 'java-library'
id 'eclipse'
id 'idea'
//id 'net.serenity-bdd.aggregator' version '2.4.24' // Serenity plugin
}
repositories {
mavenCentral()
}
dependencies {
// JUnit Jupiter for testing
testImplementation 'org.junit.jupiter
junit jupiter5.8.1'
// Serenity dependencies
implementation 'net.serenity-bdd
serenity core4.1.15'
implementation 'net.serenity-bdd
serenity cucumber4.1.15'
implementation 'net.serenity-bdd
serenity screenplay4.1.15'
implementation 'net.serenity-bdd
serenity screenplay webdriver4.1.15'
implementation 'io.cucumber
cucumber java6.15.0'
implementation 'io.cucumber
cucumber junit6.15.0'
// Other dependencies as per your project requirements
implementation 'org.seleniumhq.selenium
selenium java4.19.1'
// Apache POI dependencies
implementation 'org.apache.poi
poi5.2.3'
implementation 'org.apache.poi
poi ooxml5.2.3'
// Other dependencies
implementation 'org.junit.jupiter
junit jupiter5.8.1'
implementation 'com.google.guava
guava30.1.1'
implementation 'org.apache.commons
commons math33.6.1'
}
test {
testLogging.showStandardStreams = true
useJUnitPlatform() // Use JUnit Platform for running tests
}
tasks.withType(Test) {
testLogging {
events "passed", "skipped", "failed"
}
}
// Task for running Cucumber tests
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = sourceSets.test.runtimeClasspath
args = ['--plugin', 'pretty', '--glue', 'com.yourpackage.stepdefinitions', 'src/test/resources/features']
}
}
}
gradle.startParameter.continueOnFailure = true
apply plugin: 'java'
and getting the output as
Working Directory: C:\workspace\
CFPlatform.com\lib
Gradle user home: C:\Users\rames\.gradle
Gradle Distribution: Gradle wrapper from target build
Gradle Version: 7.4.2
Java Home: C:\Eclipse2023-03\eclipse\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.6.v20230204-1729\jre
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Tests: CFPlatform.runner.CFPlatformRunner
Task libcompileJava
Task libprocessResources NO-SOURCE
Task libclasses
Task libcompileTestJava
Note: C:\workspace\
CFPlatform.com\lib\src\test\java\CFPlatform\Steps\LoginSteps.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Task libprocessTestResources
Task libtestClasses
Task libtest
FAILURE: Build failed with an exception.
* What went wrong:
No matching tests found in any candidate test task.
Requested tests:
Test class CFPlatform.runner.CFPlatformRunner
* Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
* Get more help at
https://help.gradle.org
BUILD FAILED in 2s
4 actionable tasks: 4 executed
Please help me on this