简体   繁体   中英

How to use TestNG annotations when the framework is Hybrid and test cases are driven by excel in Selenium?

When I use a Hybrid framework using Selenium where my test cases are driven by Excel, how can I use TestNG annotations like @Test for my test cases which are in Excel format? Meaning, I have all my test steps converted in Excel as Element, Action and Data combination to trigger an action in UI.

I will be calling a method in main() which in turn calls another method where the reading of Excel and converting the set of rows/columns to frame the Selenium command to trigger events for a test case flow. Given this, how/where can I mention @Test to let TestNG that this is my test method?

I have 1000+ test cases to execute and planning to use Selenium GRID for distributed execution in multiple VMs. In order to do this, I believe we need to have TestNG to let Selenium GRID know that these are my test methods. Any help on this regard is highly appreciated.

Regards, Bala

Stop wasting time on excel driven solutions. Write normal code for elements and actions. Combine them in your tests. Feed with data which will be populated to the forms. That's all. There are a lot of frameworks which make it an easy task.

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