Questions tagged [testng]

TestNG is a testing 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.

Filter by
Sorted by
Tagged with
3
votes
1answer
8k 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 ...
5
votes
2answers
8k 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 "...
1
vote
0answers
119 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.
0
votes
1answer
16k 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 ...
1
vote
0answers
93 views

Feed TestNG tests

Recently, I used feed4testng in order to run multiple instances of test using a data provider with feed4testng tool. But this tool only iterates through external resources. Is there any other tool for ...
1
vote
0answers
721 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
1answer
1k 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 ...
12
votes
3answers
14k 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
1answer
517 views

Selenium Webdriver and OpenLayers [closed]

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.
2
votes
0answers
1k views

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

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[] dp()...
4
votes
1answer
2k 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 ...
2
votes
2answers
1k views

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

My code structure is like this: I have four classes having ten tests and one @BeforeClass method to run before any of the tests. In each of four classes all tests are of one single group. And I have ...
5
votes
1answer
5k 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
3answers
11k 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" ...

1
3 4 5 6
7