Error: org.testng.TestNGException: Cannot find class in classpath: EmpClass

前端 未结 30 1206
礼貌的吻别
礼貌的吻别 2020-12-09 08:17

When i\'m trying to run the test suite, am getting this exception. We are using maven project here and i am done with refreshing, cleaning, reinstalling testNG and then impo

30条回答
  •  攒了一身酷
    2020-12-09 09:13

    I had this same problem when I imported my project from one PC to another on IntelliJ IDEA.

    Below Solution worked for me:

    1. Import project using Git.
    2. After Importing IDE would prompt you a dialog on the bottom right corner saying "Import as Gradle", you need to select that but make Sure you have set JAVA_HOME and GRADLE(Gradle Home or Gradle wrapper both should work) properly.
    3. Run the build.gradle and make sure all the dependencies are downloaded correctly without any error.
    4. Now move to your Test Case and try to run with TestNG or JUnit and if you have followed above 3 steps properly you should able to run the test case.

提交回复
热议问题