Open jayboyi opened 2 years ago
My only suggestion would be to try to figure out the differences between your local execution environment and the one in Jenkins, like gradle version, Java version, etc.
i'm not able to find those.. any hint.. and the command ./gradlew test i -Dcucumber.options="--tags @$gatewayname" is not running. If i see the Jenkins gradle commands it's starting the test with + ./gradlew build . But i gave above command to run tag wise... here my tag is SDT but its starting the very first feature file on the test run and failing with exception.
gateway is SDT
Task :clean UP-TO-DATE Task :compileJava NO-SOURCE Task :processResources NO-SOURCE Task :classes UP-TO-DATE Task :jar Task :assemble
BUILD SUCCESSFUL in 4s 2 actionable tasks: 1 executed, 1 up-to-date
Task :compileJava NO-SOURCE Task :processResources NO-SOURCE Task :classes UP-TO-DATE Task :jar UP-TO-DATE Task :assemble UP-TO-DATE
Task :compileTestJava Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Task :processTestResources Task :testClasses Task :test
Gradle suite > Gradle test > regressionSuite.TestRunner.feature[0](Address Verification) FAILED cucumber.runtime.CucumberException at TestRunner.java:64 Caused by: java.lang.AssertionError at Assert.java:94
1 test completed, 1 failed
Hi, i have moved to gradle framework from maven. while running our test with gradle on local machine its getting success but while running the same on jekins with gradle commands i'm facing error on the testng cucumber as below
Gradle suite > Gradle test > regressionSuite.TestRunner.feature[0](Address Verification) FAILED cucumber.runtime.CucumberException at TestRunner.java:64 Caused by: java.lang.AssertionError at Assert.java:94
lines of the code at those lines is as follows: @Test(groups = "cucumber", description = "Runs Cucumber Feature", dataProvider = "features") public void feature(CucumberFeatureWrapper cucumberFeature) throws IOException { testNGCucumberRunner.runCucumber(cucumberFeature.getCucumberFeature()); }
Not able to find the root cause of this issue
commands using on Jekins file are: sh """