Skip to content
Advertisement

Tag: testng

Can’t run testng.xml in Cucumber-Maven(TestNG)

In eclipse IDE, I have created a basic cucumber framework by using Maven project. I have added all the dependencies required in pom.xml.For TestNG plugin added below dependencies. But ‘TestNG Suite’ option was not coming in preferences,so installed TestNG through Help->Install New Software. Framework is having feature file(scenario is described),stepdefinitions(code/logic given) and runner class(To map feature with stepdefinitions file and

Maven doesn’t run my testng.xml

When i’m running through testng.xml (right click on testng.xml, then run as TestNG) it works fine – 2 of the tests i have there are running, but when i’m running it from Maven (mvn test) it just perform build and doesn’t run the tests. BTW – i noticed that if i have classes with the word Test in them they

NoClassDefFoundError: org/testng/TestNG

This error NoClassDefFoundError: org/testng/TestNG appears when I’m trying to run my test from Testng.xml file using IntelliJ IDEA. Running my test one by one works perfectly as well as running whole gradle project which points to testng.xml, like grade core-test:test ( On my project I’m using Appium + IntelliJ + TestNG ) But when I’m running testng.xml using IntelliJ I’m

How to implemet singleThreaded=true in TestNG

In TestNG i am trying to undertand the use of singleThreaded=true attibute of @Test Annotation .I already referred http://testng.org/doc/documentation-main.html and http://beust.com/weblog2/archives/000407.html but didn’t got much help . My Question : Why do we need to execute method on single thread. Running on multiple thread can save out time. Note : In the example given at http://beust.com/weblog2/archives/000407.html He said :: “the

Retrieve test name on TestNG

Can I retrieve currently running test name like in JUnit (using getName() or rules)? P.S. I don’t want use some self-written tool based on stack traces. Answer According the to TestNG documentation at: http://testng.org/doc/documentation-main.html you can implement listeners that might be able to help you with your problem. Look at section 5.16 TestNG Listeners, and in particular the IInvokedMethodListener (javadoc:

Advertisement