3

I'm new at TestNG.

So, I want to know more details about how to run multiple test-cases on different browsers. Which Framework model should I use in my project? So that each & every part of my code is clear & understandable?

Right now I have about 30 Test Cases that I have to run on different browsers.

asked Mar 26, 2016 at 11:26

2 Answers 2

3

By using TestNG.xml we can easily run number of test cases on multiple browser. Is it right?

 <?xml version="1.0" encoding="UTF-8"?>
 <suite name="Suite" parallel="false">
 <test name="Test1">
 <parameter name="browserType" value="firefox"/>
 <classes>
 <class name="crossBrowserTesting.Magento_RAR_Framework"/>
 </classes>
 </test> <!-- Test -->
 <test name="Test2">
 <parameter name="browserType" value="chrome"/>
 <classes>
 <class name="crossBrowserTesting.Magento_RAR_Framework"/>
 </classes>
 </test> <!-- Test -->
 <test name="Test3">
 <parameter name="browserType" value="ie"/>
 <classes>
 <class name="crossBrowserTesting.Magento_RAR_Framework"/>
 </classes>
 </test> <!-- Test -->
 </suite> <!-- Suite -->
answered Mar 30, 2016 at 8:22
1

If you want to achieve parallel execution of test cases on different browsers, you can go for Selenium Grid.

It lets you run your tests on different machines having different browsers using a hub and node concept. If you don't have any other machine available, you can use your local system and register it as a hub and a node as well.

answered Mar 29, 2016 at 12:20
1
  • 1
    Is it possible to run same test cases on single machine with multiple browser? I think by using TestNG.xml file we can easily run it. Is it correct? Commented Mar 29, 2016 at 12:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.