开发者

Which the best way to run my Test methods?

开发者 https://www.devze.com 2023-01-23 09:35 出处:网络
I have some test methods. Each method will be in each class file, which has independent DP that has various scenarios as data parameters. The class files are consolidated in different packages accordi

I have some test methods. Each method will be in each class file, which has independent DP that has various scenarios as data parameters. The class files are consolidated in different packages according to their behaviour in the application. The code runs on Selenium GRID. Now I wanted to make more user friendly to just run one DRIVERSCRIPT which will get the files needed to be run. For example my main sheet whic开发者_运维百科h has all the datas will be like this

http://img815.imageshack.us/img815/5455/format.jpg

Am wondering whether I could only have one script which would fetch all the enabled data from the sheet and use the TestNG XMLsuite from to create TestNG.xml and run it? Or is there any other way around?


You can certainly run TestNG programmatically, which I've never done but seems like it would be straightforward. It is difficult to assess whether that is a good idea or not without knowing more about your setup. My tests are contained within TestNG suite files, called by an ANT script. I don't think you gain much beyond a bit of readability using a spreadsheet instead.

If readability is of the utmost importance to you, Cedric wrote a blog on using YML as an alternative.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号