Top "Testng" questions

TestNG is a testing framework focused on providing both unit and functional testing abilities in the Java programming language.

How do I get the name of the test method that was run in a testng tear down method?

Basically, I have a teardown method that I want to log to the console which test was just run. How …

java unit-testing testng
A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION

I have java 1.6, maven 2, activeMQ 5.5 and functional tests with testng. When I launch it in Idea then OK, but when …

java maven activemq testng fatal-error
How to use @FindBy annotation in Selenium WebDriver

I want to know what wrong with my code, because when I try to test my code, I didn´t …

java selenium-webdriver annotations testng findby
Reload or refresh a Spring application context inside a test method?

I need to change the Spring profiles that are active in my applicationContext within a single method of my test …

java spring testng applicationcontext spring-test
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 …

java ide testng
Gradle task check if property is defined

I have a gradle task that executes a testng test suite. I want to be able to pass a flag …

properties gradle task testng
TestNg's @BeforeTest on base class only happening once per fixture

I'm trying to use @BeforeTest to get code to ... run once before every test. This is my code: public class …

java unit-testing testng
JUnit vs TestNG

At work we are currently still using JUnit 3 to run our tests. We have been considering switching over to JUnit 4 …

java testing junit testng
How to disable TestNG test based on a condition

Is there currently a way to disable TestNG test based on a condition I know you can currently disable test …

java eclipse annotations testng java-5
Retrieve test name on TestNG

Can I retrieve currently running test name like in JUnit (using getName() or rules)? @Test public void fooBar(){ System.out.…

java testng