The importance of the testng.xml file is to define the order of execution of different tests. User can put all the tests together in one testng.xml file or can create separate testng.xml files for different based on the requirement.
some of the benefits are listed below:
Basic testng.xml file looks like this
Creating testng.xml:
Step 1: To create testng.xml, Right click on the java class in the project (that is having tat least one test) --> TestNG --> Conver to TestNG
Step 2: A window popup will be shown, Click Finish
Step 3: You will be navigated to the previous window and you should see testng.xml file in the eclipse window as shown in the below screen shot
That's it. Let me know your comments!!
some of the benefits are listed below:
- Tests can be grouped and executed as per requirement
- Only selected tests can be executed
- Tests can be executed in parallel
- TestNG listeners can be implemented at Suite level
- To Integrate TestNG framework with third party tools like Jenkins testng.xml is required
Basic testng.xml file looks like this
Creating testng.xml:
Step 1: To create testng.xml, Right click on the java class in the project (that is having tat least one test) --> TestNG --> Conver to TestNG
Step 2: A window popup will be shown, Click Finish
Step 3: You will be navigated to the previous window and you should see testng.xml file in the eclipse window as shown in the below screen shot
That's it. Let me know your comments!!
No comments:
Post a Comment