How to create 'testng.xml' using Eclipse

后端 未结 4 1456
挽巷
挽巷 2021-01-02 17:27

I am new to TestNG and Selenium Webdriver and trying to create a testng.xml using eclipse.

Done some research in www and understand that this file can be created by

4条回答
  •  既然无缘
    2021-01-02 17:58

    1. Click on Project
    2. CNTL+ENTER
    3. Go to general file
    4. Create a file in your project with name testng.xml
    5. click on finish
    6. Open that file and write the given below code

    Change the names according to your program and run that testng.xml Run as Testng it will run your program with Testng

    
    
     
     
    
    
                 
                         
                           
                                 
                         
                 
    
    
                       
                  
                           
                  
    
    
    

    *********************************if you have to run using multiple suite********

    let me give you an example if you have three suites that have multiple cases then create the tree .xml file and write the code as above for all the three suite

    then create a testng.xml file that will include the code as below

    
    
    
    
        
        
        
    
    
    

    Then run the testng.xml Run as Testng then it will run all the program of those are part of these three suites

提交回复
热议问题