Command prompt execution of Maven project giving errors. Below are the details: | Selenium Forum
P
Pravin V. Kumbhare Posted on 15/03/2022

Hello,

I'm running my Cucumber project from command prompt using Maven commands, but I'm getting the below errors. I tried a lot og Googleing, but still no lucl:

Attached is my project, and below is the error I'm getting:

[INFO] Running TestSuite
[ERROR] Invalid default: public abstract java.lang.Class io.cucumber.testng.CucumberOptions.objectFactory()
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.057 s
[INFO] Finished at: 2022-03-15T09:50:30+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project ZohoCucumPom: There are test failures.


A
Ashish Thakur Replied on 15/03/2022

Modify POM.xml

Try with this version of maven surefire

 

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>suitethreadpoolsize</name>
<value>1</value>
</property>
</properties>
</configuration>
</plugin>


P
Pravin V. Kumbhare Replied on 15/03/2022

Thank you for your reply,

But I already have tried with this version, and many other older version. The issue remains same.

Can you please check and let me know if the same pom.xml works in your system?


A
Ashish Thakur Replied on 21/03/2022

Its working on my machine


Related Posts