Questions tagged [testng.xml]
179 questions
3
votes
0 answers
TestNG get the value of "test" level parameter from "ISuiteListener" class's "onStart" method
In my TestNG.xml file , I have two different values for Test level parameter, "TestRailRunId".

Sameera De Silva
- 1,722
- 1
- 22
- 41
2
votes
2 answers
Can we pass Cucumber Options values like Features and Tags values dynamically from TestNg.xml file?
I am trying to run my regression test suite from TestNg.xml file. Most Testcases use different tags and different feature filenames. So i want to pass these input as a parameter from TestNg.xml file.
I currently have duplicate runner class with…

kumaresh .v
- 23
- 2
2
votes
1 answer
How can I dynamically assign test groups to test methods and @BeforeXXX and @AfterXXX annotated methods during runtime?
My Requirement:
I have around 100 tests in my test suite.
I don't want to hardcode the group name in the tests source code.
I want to choose the tests that I want to run each time but want to pass that list from an external source (csv/json/xml,…

AutoTester999
- 528
- 1
- 6
- 25
2
votes
2 answers
Only the last @Test is being executed when using IMethodInterceptor as Listener in TestNG
I'm trying to use @Factory to create multiple instances of a class and print the values in the same order that we have passed by using IMethodInterceptor listener:
public class MainFactoryClass implements IMethodInterceptor {
@Factory
public…

Surendra Anand
- 121
- 6
2
votes
0 answers
How to create a separate testng-failed.xml for each suite without over-writing?
I use mvn test command to run the suite. My testng.xml looks like below:

AutoTester999
- 528
- 1
- 6
- 25
2
votes
1 answer
TestNG Parameters are not recognized when using Groups
When running test suite using testNG xml, the test will run fine and all of the parameters from the xml file are used as expected. The moment I added grouping to my @Test Methods, and add the groups xml I get a failed:java.lang.nullpointerException.…

Charles
- 31
- 2
2
votes
1 answer
Running TestNG QAF BDD tests in Parallel
How do I run all Qmerty tests in a folder in parallel using TestNG, I have my config XML like below, but tests in resources/scenarios/smoketests folder are not running in parallel

JavaKB
- 438
- 1
- 3
- 18
2
votes
0 answers
How to run mockito and selenium tests together using testng.xml as a single Testrunner?
The xml file is as follows:
Login Test is a selenium test class.
xlImportTest is mockito test class.

Pranav Bhagwat
- 287
- 2
- 11
2
votes
0 answers
TestNG console is displaying blank only when running the suite using testng.run() command
I am running a TestNG.xml
I have created a maven project for my automation selenium script and added all the required dependencies to pom.xml. If I run the suite defined in the Testng.xml file using TestNG.run() command TestNG test result console…

Mayank Arora
- 21
- 3
2
votes
2 answers
Is there any way to divide and run testng tests in chunks instead of full suite
I have 100s of tests in my testng.xml, most of tests failing due to timing issue, but when I am running them in chunks it works fine
One ineffective solution I tried is to divide the small number of tests in to multiple testng.xml file and run one…

sunpat
- 389
- 2
- 7
- 28
2
votes
2 answers
How to run test cases in parallel?
I have one @Test method and I am getting the Test case names from @Dataprovider. I need to run the test cases in parallel:
@Test(dataprovider="testdataprodivder")
public void TestExecution(String arg 1)
{
/* Read the testcases from dataprovider and…

Danesh
- 45
- 10
2
votes
1 answer
How to build single testNG e-mailable report from the different e-mailable html files
I have a scenario where I need to collect the data from different testng emailable-html report and make it as single one as look like same as testng-emailable report.
I didn't get any idea about this like how can I achieve it. I just want to create…

ArrchanaMohan
- 2,314
- 4
- 36
- 84
2
votes
1 answer
TestNG execution order - it's mixing tests from different classes
TestNG mixes tests from different classes when executing.
Each class has a few tests. And instead of executing like this:
FirstTestClass firstTest
FirstTestClass secondTest
FirstTestClass thirdTest
SecondTestClass firstTest
SecondTestClass…

Max
- 85
- 1
- 10
1
vote
0 answers
Selenium + Cucumber + TestNG with multiple tabs in one Scenario Outline
I am having a thought of giving a stress test on my webpage, which can be simplified to "a group of people clicking on the same button on the page at the same time"
Therefore, I am wondering if I can do a Scenario Outline with my selenium + cucumber…

Johnson J
- 11
- 2
1
vote
1 answer
testNG Listens class file has wrong version 55.0, should be 52.0
When I am running my code getting below error. Can anyone Please help me here.
testNG version : 7.6.1
java: cannot access org.testng.ITestContext
bad class file:…

pkdhake
- 21
- 1