简体   繁体   中英

Can we use XML file in a java program by creating object?

I have a XML file(Ex: testng.xml ) where I added all my test scripts in this XML file. I created a script where the login data is being pulled from excel file(Having three sets of login data). Now I want to use this XML file in the Login data script where I want to run all the scripts in 3 accounts?

If you are using TestNG, then you dont need to create any xml objects to run the tests. Just check the TestNG official site on how to use TestNG tests. Also check the DataProviders topic in the same site on how to use test data for TestNG tests.

http://testng.org/doc/documentation-main.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM