TestNG not running tests in testing suite

前端 未结 15 2449
北荒
北荒 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:19

    I also had this problem, and none of the above solutions worked. Restarting Eclipse, however, did. I know this seems like an unnecessary answer, but I myself would have saved a lot of time if I had done it sooner, so I'll post it anyway.

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

    I was facing the same issue , i have updated/installed TestNG from eclipse marketplace it worked for me

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

    I had done all possible solution that everyone shared here and still does not work.

    Heard someone mentioned creating a new workspace.

    So I started a new workspace and recreated the whole TestNG suite & methods.

    It worked!

    Most probably my other TestNg stuff in my previous workspace could have conflicted with the recent Testng setup.

    So starting a new workspace solved!

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

    You could also check imports for imported Test annotation, should be:

    import org.testng.annotations.Test;
    @Test
    public myTest(){ ... }
    

    and not for example:

    import org.junit.Test;
    
    0 讨论(0)
  • 2021-02-19 21:23

    I experienced a similar issue and it was resolved by performing a project clean within Eclipse (Project-> Clean-> Clean Selected project)

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

    Very simple but sometimes hard to spot. @Test is not picked when no data is returned by the corresponding dataprovider.

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