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 …
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. R…
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 …
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 Cla…
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 anyon…
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 possib…
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̵…
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 y…
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.