I am trying to run my feature file using the testNGcucumberRunner in intelliJ. I can get the code working from intellij. But when I tried with the intelliJ terminal or computers command prompt with "mvn test" i am getting an error as in the photo. Please help. Thanks
Asked
Active
Viewed 444 times
0

Krishnan Mahadevan
- 14,121
- 6
- 34
- 66

Piya
- 41
- 1
- 10
-
1Can you please the entire exception information and not merely the first few lines? – Venkata Rahul S Nov 12 '21 at 12:54
-
I have added the photos, recently i have added some static variable to the project, i am not sure the error is related to that. Please help. thanks – Piya Nov 13 '21 at 09:33
-
Could this answer help?: https://stackoverflow.com/questions/68974753/unable-to-make-field-private-final-java-util-comparator-java-util-treemap-compar – Venkata Rahul S Nov 13 '21 at 11:25
-
I have tried changing the java version, I got the same error from terminal. I cannot change the cucumber version as I am using api.cucumber(info.cukes) which allows me to inject my data provider in cucumber at runtime. this is my code : https://github.com/myWorksPiya/selenium_Shop.git(Main module/test). I have made everything working with io.cucumber, but with info.cukes command line is giving errors. Thank you very much. – Piya Nov 14 '21 at 00:06
-
@Piya - Can you please edit your question and add the following information. 1. The github URL of your code (I think you mentioned it in the comments). 2. What are the steps you are following to run the tests to trigger this error (Is it via the IDE or using `mvn clean test` and within which module are you seeing this error). What is your Java version that you are using. Any other additional information that you can add. I say this because I have tried running your code in JDK11 and I see only `NullPointerException` which suggests that the problem is with your test code. – Krishnan Mahadevan Nov 14 '21 at 06:21
-
Hai , thanks for the reply, my java version is 1.8. I am only doing "mvn test" from the main, which results in this error – Piya Nov 14 '21 at 13:15