How can i use same group for execution of different methods from different test class?
Let me explain you mine case.
I want to do sanity testing for online shopping website.
Sanity includes : login with valid user >> go to product details page >> add product into cart >> go to cart page >> do checkout >> create new order.
I have POM classes for every page. Like Login page, Product detail page, cart page, checkout page etc
and I have test classes for each page like LoginPageTest , CartPagetest etc which contains all test cases(positive and negative) belonging to that respective pages.
Now i want to execute all positive test cases for my sanity testing for creating order.
please guide me how will I use this group annotation.
Thanks In advance.
You would like to use testng as your Test framework. In there you can create groups that can be executed as a single unit.
Here is the tutorial to do this: http://toolsqa.com/selenium-webdriver/testng-annotations-groups-depends/
Look for Groups