Run test based on defined priority with multiple classes through test.xml file

前端 未结 3 1497
不思量自难忘°
不思量自难忘° 2021-01-26 06:26

I have 3 classes for with 3 tests each.

Class 1

@Test( priority = 1 )
public void testA1() {
    System.out.println(\"testA1\");
}

@Test( priority = 2         


        
3条回答
  •  感情败类
    2021-01-26 07:04

    Finally I got solution of problem.

    Please refer below XML code for same.

    
                
                    
                        
                        
                        
                    
                
               
                    
                        
                        
                        
                    
                
                
                    
                        
                        
                        
                    
                
    

    This will give you expected result. Plus it will be easier to manage also. As if we want to see my all tests or remove some tests, i can look into test.xml

提交回复
热议问题