how to call testng.xml from java main method?

前端 未结 5 1504
深忆病人
深忆病人 2020-12-10 15:40

I have testng.xml file created. Is there any way to run this file from java main method?

Something like -

Class test {
  public static void main ( St         


        
5条回答
  •  佛祖请我去吃肉
    2020-12-10 16:35

    I didn't get any error and XML path is correct. But It just end execution with failed test cases. It does not open firefox browser. I am using testng annotation (i.e. @Before Suite,@Test, @group etc ) inside classes whereas it successfully execute using Testng Suite in eclipse.

    
    
    
        
        
          
       
     
    
    

提交回复
热议问题