How to generate the test-output folder for a testNG test? I am trying to get the default testng report, index.html Netbeans7/windows7 I made a simple testng test case, ran it in netbeans 7, and here is the result. I see no test-output. I am displaying the project and file structure. If I need to do something with ant or maven,
Tag: testng
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
selenium webdriver move slider on left side
I want to move slider on left side of slider-bar. However, selenium webdriver moves it to right side but it does not move to left side. I want to move slider to 25% of total width of slider-bar. I am using below given code with java 1.8 with selenium 2.44. I have tried all the option using up,down,left,right arrow key
How to specify order of execution of Java classes in a Selenium-Java Webdriver test project
I have to automate a test-suite for a web application which let user connect and sync with their Dropbox account. I am using Java Selenium Webdriver. Here I have created test classes like this. Class1.java – Test case to check if connected to Internet. Class2.java- Test case for sign in with Dropbox Class3.java- Test case to verify if Dropbox folders
How to run TestNG from command line
How exactly do I run a .java TestNG project from a command line? I have read through the TestNG documentation, and tried the following to no avail: … with the following testng.xml file in my project: The error I get is this: Obviously, I am not referencing TestNG correctly in my command line. Does anyone know how to get this
TestNG: More than one @DataProvider for one @Test
I’m using TestNG for Eclipse. Is it possible to give two data providers step by step to the same test-function? I could put both providers in one, but that is not what I want. I need (not like in this example) to generate independently data. I want to give both providers to the same test. Is this possible? Answer No,
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 I try to launch them with maven from console then process suspends after trying to send message via activeMQ and after some time crashes with the following error in log: I have no idea what’s going on.
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:
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: “BeforeTest” is only printed once, not twice. What am I doing wrong? Answer Use @BeforeMethod, not @BeforeTest. The meaning of @BeforeTest is explained in the documentation.