I am having an issue running my cucumber project with device farm. I am getting this error:
[TestNG] Caused by: java.lang.IllegalArgumentException: Not a file or directory: /tmp/scratchheDEgq.scratch/test-packagex5ZhYf/src/test/java/cucumber/features
I understand from this message that there is an issue with the path of the features directory in my project but locally it works.
This is how I put it in my code:
@CucumberOptions(features = "src/test/java/cucumber/features", glue = "cucumber.steps")
Should I provide a different path to device farm? What am I missing here?
Thanks
By default the
src/test/java/cucmber
directory(if it exists in the project) is not included the *-test.jar file. Try putting the feature files in thesrc/test/resources
directory as shown in the Device Farm sample project.https://github.com/aws-samples/aws-device-farm-appium-cucumber-tests-for-sample-app/tree/master/src/test/resources/LoginTest
Alternatively, you can implement the testResources tags in the pom.xml to explicitly reference another directory besides src/test/resources assuming that we're using maven:
Check out this link for more info on the testResources tag https://maven.apache.org/pom.html#Resources
HTH
-James