TestNG not running tests in testing suite

前端 未结 15 2369
北荒
北荒 2021-02-19 21:16

I\'m trying to run a testing suite using XML and TestNG, but I\'m always getting the same message using both: Eclipse and the command line:

[TestNG] Running:
  /         


        
相关标签:
15条回答
  • 2021-02-19 21:39

    I had to change my method access modifier to public from private to get it working .

    0 讨论(0)
  • 2021-02-19 21:39

    This can also happen when there is groups usage in suite.xml and @BeforeXXX annotations have missing alwaysRun = true.

    @BeforeTest(alwaysRun = true)
    public void setUp() throws IOException {
    }
    
    0 讨论(0)
  • 2021-02-19 21:43

    I had this same issue, here is what worked for me:

    1. I put all of the TestNG libraries in a separate lib folder in my project

      a. com.beust.jcommander_1.72.0.jar

      b. org.apache-extras.beanshell.bsh_2.0.0.b6.jar

      c. org.testng_6.14.2.r201802161450.jar

      d. or.yaml.snakeyaml_1.17.0.jar

    2. I also put a copy of selenium-server and chromedriver in the lib folder as well

    3. From my project folder (with testng.xml located in the project root) I ran:

      java -cp .\lib\*;.\target\classes org.testng.TestNG testng.xml

    0 讨论(0)
提交回复
热议问题