Questions tagged [testng.xml]

179 questions
1
vote
2 answers

How to get the master suite name?

While running selenium suite files from the master file i want to get the suite name of master xml. I tries using ISuite and ITestContext but it is returning currently running suite name Master :
Sadha Nanda
  • 337
  • 4
  • 15
1
vote
1 answer

How to set system property using testng.xml and beanshell

I have an XML configured like this
1
vote
1 answer

TestNG - How to print run time testng parameters in testng custom emailable report?

I found there is an option to set the parameters to testng xml through surefire plugin, by then the parameter can be sent from command line. [...] org.apache.maven.plugins
Sandeep Nalla
  • 173
  • 2
  • 15
1
vote
1 answer

Is there a way to pass POM parameters/attributes to TestNG XML file?

I have a maven project. Is there a way to read attributes of pom file from the TestNg Xml file for example I want to read the version of the app from the pom file and then pass it down to my test from the TestNG xml file using @Parameter annotation.…
1
vote
1 answer

"Executing a test in testNG based on condition"

i have a testNG xml which will execute a (one)test case 2 times. the difference between each time is the test level parameter. so i have to execute the test case with 2 different parameter (2 user). Now i will be creating new xml (suite of xml) from…
kannan
  • 35
  • 5
1
vote
1 answer

How to run multiple classes sequentially in TestNG.xml?

I have 2 classes in the same package which I need to run sequentially, ie, only after executing my 1st class should my 2nd class start executing. Right now, when I run my xml, 2 browsers are opening up at the same time. I tried giving…
1
vote
1 answer

testng / Jenkins - include name, parameterized

I'm new in programming. I have a question about testng.xml and Jenkins. I run a parameterized build in Jenkins with the following…
1
vote
0 answers

testng.xml does not pick/execute all tests

I'm trying to run all tests in the project using testng.xml I have 80 classes with ~ 140 tests but every time I run test, testng runs only 83/140 tests. I tried to find pattern in tests that are not being executed but could not find any. All…
Yogesh
  • 125
  • 2
  • 13
1
vote
4 answers

How to run multiple methods in a class first before running the methods in other class while parallel execution

I'm facing with the following problem: I created two classes which include @Tests with priority attribute: @Test( priority = 1 ) public void testA1() { System.out.println("testA1"); } @Test( priority = 2 ) public void testA2() { …
Rashi
  • 11
  • 1
0
votes
0 answers

Unable to run testcases using groups in TestNG

SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details. =============================================== Suite Total tests run:…
0
votes
0 answers

Executing TestNG Test Suite with Selenium Tests from Portable Software (JAR) - How to Run Tests Using 'java -jar' Command?

I'm currently developing a portable software that runs Selenium and TestNG tests on a web page. I am using the maven-surefire-plugin and maven-assembly-plugin plugins in my Maven project. I would like to know how to configure my TestNG XML file…
Yorye
  • 1
  • 1
0
votes
0 answers

How can I not INCLUDE the system-out tag in the junit.xml report? I use TestNG

I am trying to do a jenkins integration with zephyr but the junit report. xml contains the tag, how can I not include this tag in my report? the system-out tag not present in the report How can I not INCLUDE the system-out tag in the junit.xml…
0
votes
1 answer

Cannot run parallel execution in testng due to static WebDriver in the testng framework

I created a framework using testng and used driver as a static variable, but I'm unable to run parallel execution in testng, as I used static to create the driver. Now I want to change the driver to non static, but am confused on how to change the…
0
votes
0 answers

Parallel execution on testng

I am new at parallel automated testing. I am using testng to run my tests in parallel. The problem is that I am using data providers to provide the data to my tests. I have put the attribute parallel = true on my data providers. When I run the…
0
votes
0 answers

Location of Testng logs unless explicitly logged

Overnight I was running test cases using the xmlsuite file from the Windows command prompt and I see that there was an exception when running test cases. Unfortunately I can't get back the buffer that left from the command prompt, so I was looking…
Garudaraja
  • 63
  • 7