I’m trying to mock a list of strings but it’s not working. I’m not able to figure out the problem

This is the class and the corresponding test I have written for it. Can someone please help me understand why System.out.println(a.size()) prints 0 , when it should print 1000? WorkingwithLists.java …

How to print exceptions on console? I am using TestNG and Maven

I want to see the exceptions on console. I am using TestNG with Maven as a build tool. I have defined my testng.xml in the Maven surefire plugin.

How do I stop selenium automation if 20% or 1st 20 test cases test methods are failed?

I have 100 test cases, if 20% or first 20 test cases all fail how can I stop the execution ? Already have testng ITestResult where should I break the build? @Test(retryAnalyzer = ReTryFail.class, …

Jersey test framework: Test Container is null

I have the following test class that tests a simple “/helloWorld” endpoint that is implemented in jax-rs. I am running this as an EAR file in a JBOSS EAP Server locally. public class HelloWorldTest …

How to generate test-output folder from testng tests?

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 …

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 …

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. …

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 …