TestNG is a test automation framework, inspired by the JUnit/NUnit unit testing frameworks. TestNG is intended to support more than just unit testing, allowing functional, end-to-end, integration, etc.

learn more… | top users | synonyms

5
votes
1answer
963 views

Automated tests pass every time when run individually, but when they are clumped into a test suite it's a toss up if the tests will pass

I have around 200 test classes for my web application at the moment. I use Selenium2/Webdriver and the tests are written in java, with TestNG used as my framework. When I run each test by itself, ...
2
votes
2answers
163 views

Difference between Selenium and TestNG

Am a beginner in Selenium and am trying to learn selenium on my own by googling. One thing which I noticed was in many of the posts which I read about selenium the name of the framework by name ...
2
votes
1answer
155 views

How to run multiple browser instance with Webdriver, Java, and Junit/TestNG?

I have a test ready to be executed but it takes a long time to finish. In this test I'm feeding in csv data, so basically the whole test will run 56 times. I was wondering if there's anyway I could ...
1
vote
1answer
493 views

What is the max number of threads allowed for running TestNG tests in parallel?

I’m trying to run TestNG tests in parallel, right now I’ve set “parallel=tests” & ‘thread-count=25’ but I see that only 10 threads are running at a time. Is this testNG’s thread limit? Is there ...
1
vote
1answer
200 views

TestNG - how to share same browser session between two methods?

I am writing TestNG code for the below scenario and do not know how to share browser session between two methods: 1. Creating a data driven testNG suite to login using 10 different usernames I need ...
1
vote
1answer
63 views

Selenium webdriver - Java with Webservices

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? If two different frameworks are integrated, whether this is good?. My ...
1
vote
0answers
54 views

Can any one explain me about how / where to use Listeners in TestNG? [closed]

As I am new to TestNG, I would like to request you guys to please give me a brief about @Listeners. If possible please provide a dummy code of the same.
1
vote
0answers
45 views

Feed TestNG tests

recently i used feed4testng in order to run multiple instances of test using a dataprovider with feed4testng tool. But this tool only iterates through external resources. Is there any other tool for ...
1
vote
0answers
234 views

How to keep test cases synced with HP ALM after refactoring?

We're planning to automate test synchronization between HP ALM QC and our TestNG test cases. We want to keep them synced in the following scenarios: Test adding: When creating TestNG test, a test ...
1
vote
0answers
228 views

Selenium Webdriver and OpenLayers

I would like to check that the locations asset on map (openLayer) are the same with some asset in a row. What is the best way to do this? I'm using the TestNG framework.
1
vote
0answers
401 views

How to report test execution method when using @Factory in TestNG?

I am using @Factory annotation from TestNG to create tests dynamically. It will read a property file that contains the list of test cases to be executed and return them. @Factory public Object[] ...
1
vote
0answers
401 views

Dependent methods in the same class run out of order only when included in a “testng suite”; running class independently respects the dependency

I have a class with dependent methods using the TestNG annotation dependsOnMethods The test runs fine 100% of the time if I simply run it as a TestNG Test from the package. When I include the test ...
0
votes
3answers
4k views

Running WebDriver tests in parallel using testng.xml

I'm trying to run WebDriver tests in parallel using testng.xml. I'm able to run testng tests in parallel by using parameter parallel="tests" but running with following paramters, "methods", "classes" ...
0
votes
1answer
73 views

Using multiple instances of webDriver

I have defined an object of Web driver in one class as Static WebDriver driver; and want to use that instance into another class to automate browser. Is it possible? Or I will have to define drivers ...
0
votes
2answers
91 views

Send testng report through email after test execution

I have to send an email of report of the test as soon as my all tests get executed. I will have to mention this in AfterSuite but don't know what exactly will have to use to achieve this. Any ...
0
votes
2answers
34 views

How to revert the changes made by selenium in a tear down process?

I am in a situation where I have to revert all the changes which I made while testing the application. Is there any way of doing this in Testng? Suppose if I have added something into the ...
0
votes
1answer
539 views

TestNG like unit testing framework in C# (C sharp)

I am trying to create data provider in C#. However, I don't want to connect the DB. I just want to provide some values. Is there TestNG like unit testing framework in C#, which can I use? Is there any ...
0
votes
1answer
295 views

TestNg not executes @BeforeGroup if the method is in another class

My code structure is like this... I have 4 classes having 10 tests and one @BeforeClass method to run before any of the test.In each of 4 classes ,all tests are of one single group. And I have one ...
0
votes
1answer
29 views

How to open a link in new tab and then coming back to previous tab in webdriver

I have a situation in which I have to perform some action on one web page and their changes will reflect in the other web page. And after that I want to check whether changes are reflecting or not by ...
0
votes
1answer
32 views

To run all test cases by invoking driver once for a suite

I want to run all my test cases with one start up and tear down process. I have written code for multiple browser testing and as of now I am repeating those codes in every class file under ...
0
votes
1answer
33 views

how to print currency symbols using webdriver with testng

In Dropdown currencies are listed as($,€,₤). Based on the selected currency, prices will display in other page like ($10,€10,₤10). Using the below code, I got the selected value from the dropdown. ...
0
votes
1answer
46 views

How to open and get input from a popup before running test?

I want to open a popup before running my tests and after completing my test run. I want to give few inputs from the popup on basis of that my test will run. Suppose I have multiple links on which my ...
0
votes
2answers
87 views

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures?

Can I force a Jenkins job to report a successful TestNG test even when the suite has failures? I have a test suite with 100 tests and I want to report a success in Jenkins if there are 3 or fewer ...
0
votes
0answers
569 views

TestNG IRetryAnalyzer not working

I am using TestNG IRetryAnalyser, I am facing following issues When I implement the listener and override retry () method getting following: Listener ...