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.

Default Asked on June 12, 2016 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    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/
    L
    ook for Groups

    Virender

    Professor Answered on June 13, 2016.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.