Forum Discussion

Vijay06's avatar
Vijay06
New Member
2 months ago

Could not find or load main class cucumber.api.cli.Main

Hello, I am using Selenium framework with java and gradle run config to execute my automation test scripts,

We have updated our project to run on Java17 and Gradle 8.3 after updating this we have been facing the below error. Also we have updated our gradle-tests-execution-plugin and added module-plugin.


Currently Java version is set to 17 on the IDE as well, I am using Intellij as my IDE.

Recently i am facing this error while executing the scripts in my local, the compilation is successful and during the execution i am encountering this error and it is failing.

Error: Could not find or load main class cucumber.api.cli.Main
Caused by: java.lang.ClassNotFoundException: cucumber.api.cli.Main

Execution failed for task ':test:cucumber-webdriver:cucumberTest_._0'.

Gradle Run configuration : clean cucumberTest -Ptags=@Tag

I am using Cucumber-core:6.11.0 version

Can you please help.

Thanks

No RepliesBe the first to reply