Questions tagged [testng.xml]

179 questions
1
vote
1 answer

testng-results.xml file getting overridden when running tests in parallel

When running tests in parallel using TestNg, the reports, emailable and testng-results.xml seems to be getting overridden and show results from the last thread only and not combined of all the threads. Sample testng.xml file
arctic_monkey
  • 153
  • 2
  • 4
  • 16
1
vote
1 answer

How to access dependsOnMethod or dependsOnGroup across different classes having TestNG tests?

We're writing a TestNG based regression suite. Soon, we'll have tests across different classes, wherein the Test in Class A should run only after tests in Class B has run, also we'll need a facility to access some methods, variables which will be…
user2451016
  • 1,857
  • 3
  • 20
  • 44
1
vote
0 answers

org.openqa.selenium.WebDriverException;unknown error: Chrome failed to start: exited abnormally - Error while executing the test suite in JENKINS

I have a testNG.xml test suite that i execute as maven project, the maven command works fine when executed through my terminal in local machine, but executing the same through Jenkins gives below…
1
vote
1 answer

Prevent TestNG from continuing suite if a test method does not exist

This causes a lot of churn on debugging and I'm thinking there has to be a way to prevent this. Right now, if a test method does not exist (say it was misspelled), the suite will just skip that method and continue with the next one no issues. This…
GregMa
  • 740
  • 2
  • 10
  • 25
1
vote
1 answer

Not able to execute Cucumber feature file using testng.xml

I am having 2 feature files and i want to execute parallely through testng. If i execute mvn test it shows Build Success but it doesn't execute Test cases. Could anybody helpout on this? Please find below my structure. TestNG.xml:
RAGHUNATH
  • 187
  • 3
  • 13
1
vote
0 answers

Can anyone help me resolve this testng xml parsing issue?

I am using this testng xml, but getting parsing error, can anyone look into it. Error: org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 61; columnNumber: 3; The content of elements must consist of well-formed character data…
1
vote
0 answers

testng.xml file not execute all the method

I am trying to run a testng.suite but it is not running all methods from each class. It just ran first few methods from each class.I broke my .xml file into two .xml files. In one file I added first four classes and ran it successfully, testng.xml…
Tarishah
  • 81
  • 11
1
vote
1 answer

Getting Error in XML testng file while running the test case in a suite

I am trying to run a testng xml file in a suite.But when i run file as run as testng suite i am getting below error in console org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 37; columnNumber: 9; The content of element type…
1
vote
1 answer

Test cases failing when run in TestNG parallel

In TestNG parallel, test cases are failing when run in Parallel but run in series all cases are passing. May i Know what is the reason for this and how to solve it? Find my TestNG XML;
1
vote
1 answer

How do I simplify the passing of parameters in testng XML file?

I have a testng XML file which runs Selenium tests in groups like below. I want to pass through all the browser info set in the parameter names and values from a JSON or another sort of file so i don't have to keep copy and pasting them if i add…
1
vote
0 answers

Facing issues in extent report, logs and testng file

I am working on application that requires two browsers at once so my code launches two browsers at once Chrome and FF, perform some test cases on chrome and some on FF parallel - when I execute my code thru execution files, It executes fine and…
1
vote
0 answers

Error while exporting test result to excel by using TestNG

I have get sample code from google and tried, Test scenario: To export test result into excel by using TestNG Installed TestNG and Jars Apache jar poi-4.1.1 Selenium stand alone jar Selenium-server-standalone-2.7.0-patched resources I am getting few…
1
vote
2 answers

How to run jar file of a maven project generated after build?

I made a simple project with a few tests in it and I want to be able to launch tests on other computers. I built the project using Run As -> Maven build... -> Goals: package in Eclipse, and I found a jar file in target folder of the project. But…
user218649
  • 73
  • 1
  • 8
1
vote
0 answers
1
vote
2 answers

How to run test using testng by only providing partial class name?

Suppose my java file name is SeleniumID1Test.java, so currently my testng xml file is like this But I want it to do…
Omkar Nath Singh
  • 3,375
  • 2
  • 15
  • 34
1 2
3
11 12