Questions about testing applications written in Java, a popular programming language and runtime environment which allows Java programs to run unchanged on most hardware and software platforms.

learn more… | top users | synonyms

1
vote
2answers
138 views

Java Unit Testing Completeness Indicator Tool?

I am talking about the real 'Test Completeness', not the traditional 'Code Coverage',because Code Coverage is not very helpful when people start asking for more accurate estimations. And by 'Test ...
0
votes
0answers
3k views

Webdriver : How to switch to a specific window?

I came across many solutions for switching between windows, one of them is: Set<String> allWindows = driver.getWindowHandles(); for(String currentWindow : allWindows){ ...
2
votes
1answer
1k views

Selenium Webdriver code in Java to search hidden Objects in Web Browser

I am trying to create a Selenium Web driver java code where I can find all the hidden objects on the webpage and can be accessed. I want the count of all those hidden objects. Which property I can use ...
1
vote
5answers
5k views

Selenium test case fails due to page load time

I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever i feel it takes more time to ...
0
votes
1answer
206 views

Recent comparisons of Java mocking frameworks?

I'm trying to find recent comparisons of Java mocking frameworks but all of the ones I've seen are quite old. Can anyone point me to something relatively recent? Thanks
3
votes
1answer
349 views

Testing EJB based web service - Java vs .NET vs SoapUI

I am testing a workflow application that takes the user step by step through each task. The inputs in each task are basically just barcodes or some numerical values. Fortunately, each task has an EJB ...
2
votes
1answer
5k views

Selenium WebDriver | Unable to switch to apparent pop-up

I am trying to automate Peoplesoft 9 based Web application on Firefox 20.0.1. On clicking a search icon another form opens which I thought to be a pop-up and tried my code - ...
0
votes
1answer
2k views

How to Check my pc is having internet connection using java [closed]

I need to find whether my pc is connected to internet using java.From references, I found that using below code just verify whether NIC is up or down. public static boolean ...
2
votes
1answer
5k views

Selenium Webdriver | Unable to locate element error

I am trying to run the below code but getting error. Can you please point out the issue? import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import ...
1
vote
1answer
1k views

Is Selenium 2 WebDriver JavaDoc API available offline?

Can I get a offline copy/archive of Selenium Webdriver Javadoc API which is available here so that I can bind the same to my Eclipse IDE for offline use? A ready-made HTML archive will be ...
2
votes
2answers
162 views

Dynamic whitebox testing and coverage metrics for Java systems?

What coverage measures/metrics are useful for unit testing and for integration testing of Java or other object-oriented systems? Context: We would like to establish a better test process. Our ...
2
votes
2answers
119 views

How do I compare the performance of two .toString() methods?

Say I want to compare the performance of Java's StringBuilder.toString() with new String(char[]) for strings from one to 3000 characters in length. I do know beforehand how long the resulting string ...
1
vote
1answer
132 views

Unittesting GUI. MVC model. When to move data to controller

I've been reading different opinions about how to unittest GUI in Java and it is clear that the best approach is to design the code in a MVC model, in order to be able to test everything. Anyway I ...
1
vote
2answers
1k views

FileUpload using selenium RC and java

I am using Selenium RC and Java and I need to automate the file upload feature.I tried a lot, Clicking on Browse button is not executing and rather getting stuck. I tried in FireFox but to no avail. ...
2
votes
0answers
137 views

How to debug heap thrashing problem

My application is causing heap thrashing. I have the heap dump but I don't know how and where should I start to look for problems? This is a 6 GB dump. Please recommend some suitable heap analysis ...
-3
votes
1answer
810 views

How to read data from Excel by using loops? [closed]

I created an Excel file name "readdata.xls" and entered some inputs like UserName Password Akshit Ak12345 Ashwika AS12345 I've written a code like this .... package ...
-4
votes
1answer
1k views

ArrayOutOfBoundException when reading test data from Excel [closed]

I am very new to Selenium RC. Please, help in my question. I installed jxl.jar file (Java library for Excel) and added it to Eclipse build path. I created an Excel file as readdata.xls where I ...
0
votes
2answers
2k views

Selenium WebDriver and Highchart testing

I know this question has been asked before on S.O. and other websites but I haven't found a definite answer -- most of them say its not easily done but I wanted to make sure that was the final ...
1
vote
1answer
248 views

“session has expired” error - after clicking a button with webdriver in IE8

After clicking a button in my application with webdriver, it gives me “sorry..your session has been expired” in IE8 and i am unable to proceed. But I am able to do it manually. Now to proceed with ...
2
votes
1answer
89 views

Test automation for .NET / Java Project relying on app container

I am looking to a testing / continuous integration tool which can help me with the following: 1) Inside a Maven project, allow me to run a JUnit test case that, using some API, deploy an application ...
5
votes
4answers
2k views

Looking for open source, Java-based tool for performance testing

Goal: I have an enterprise application written in java to test for performance. I need to do it separately, so I will be basically simulating a user interaction over http/https. My findings: ...
4
votes
1answer
473 views

Watir WebDriver in conjunction with Java [closed]

Is it possible to use Watir WebDriver in conjunction with Java? I have to execute some Java methods for dealing with data in DB in order to simulate different situations and test website UI using ...
3
votes
2answers
154 views

Isolating defect in distributed event-driven system

Our system takes an object from external system every time the object gets changed (change event), processes it and put it back processed into this external system. So, end-to-end testing is about ...
2
votes
1answer
67 views

Enforcement of quality as a runtime requirement

I come from a background that strongly emphasizes automated testing baked into the build process. You commit, the code is checked out by the build system, compiled, and tests run against it. If it ...
0
votes
2answers
5k views

Error upon starting Select server “Could not find agent library JVMHOOK”

I am attempting to run the Selenium server for the first time on my machine and am receiving an error when running the jar, or when attempting to find the java version. Here is the error: ...
0
votes
1answer
622 views

Unable to locate element (Modal Dialogue Box)

I'm new to Webdriver. I need to automate a scenario on Mozilla, System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_27' I have a scenario to create a user and ...
3
votes
1answer
487 views

Parameterized JUnit tests with HtmlUnitDriver leading to test termination

I came across an unusual issue with my automation tests while using the HtmlUnitDriver. I have been using the junit parameterized class to iterate over a list of urls to run some of my tests. The test ...
1
vote
1answer
177 views

Is there a way to shorten the time Selenium2/Webdriver takes to look for an element when a failure is expected?

Selenium2/WebDriver is optimized for positive testing paths. My web application hides elements based on user permissions. I am looking for an element and throwing-catching the exception when it does ...
3
votes
3answers
3k views

Unable to upload a file using selenium/web driver running with java

I have a complicated interface where uploading a file is three step ( The forum is not allowing me to add screenshots of my window so please try to visualise it) step 1 click on browse tab and select ...
2
votes
3answers
488 views

Looking for a content-aware library for regression testing of PDF files

I'm doing some automated regression testing on a web application using Rational Functional Tester with Java. I need to test some PDF files produced by that application, comparing them with a "base" ...
1
vote
0answers
579 views

Dependent methods in the same class run out of order only when included in a “testng suite”; running class independently respects the dependency

I have a class with dependent methods using the TestNG annotation dependsOnMethods The test runs fine 100% of the time if I simply run it as a TestNG Test from the package. When I include the test ...
4
votes
2answers
1k views

Issue with losing focus of “hover” command when the mouse is outside of the active window

If I automate mouse actions using Selenium2/Webdriver in combination with Firefox 12, I can easily get the "mouse" to move to and hover over a context menu so the sub-menus are seen. However, if I ...
1
vote
2answers
5k views

"Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I ...
3
votes
3answers
2k views

Handling popup with many buttons using Selenium webdriver

I'm using Selenium web driver with Java language. When there are two buttons in a popup i.e. ok and cancel , it can be easily handled with web driver using the following code: Alert alert = ...
0
votes
1answer
355 views

TestNg not executes @BeforeGroup if the method is in another class

My code structure is like this... I have 4 classes having 10 tests and one @BeforeClass method to run before any of the test.In each of 4 classes ,all tests are of one single group. And I have one ...
5
votes
5answers
6k views

How to handle self-signed SSL certificate error in IE8? (Selenium Webdriver + Java)

I am literally stuck to this problem for two days now. Scenario The website that needs to be tested has a self-signed certificate. So Internet Explorer (8 in Windows XP) shows "The security ...
0
votes
1answer
873 views

SSO in Selemium web driver

I am trying to run selenium web driver(Firefox) test cases which will need a single sign on (web). Issue over here is i have to sign in manually with my OTP every time i tear down the test case. So i ...
4
votes
2answers
201 views

Can I (in Eclipse/java) automate the logging of all enters and leaves into or out of all functions, including library ones?

While comparing the run of my wizard and a similar standard one, I have to check all entrances into all functions for both cases. Is there some tool that can automate the process? I can't do it by ...
3
votes
4answers
11k views

Downloading a file in Internet Explorer through Selenium

I have to automate a case in which I have to download an Excel file using Selenium IDE.I have done this in Firefox by using custom profile feature which automatically downloads file and saves it into ...
5
votes
1answer
5k views

“java.lang.NoClassDefFoundError” Error when running Selenium RC script

First of all I have recorded the script in Selenium IDE, then exported into the junit4 (RC), then copied the junit4 (RC) code into Eclipse IDE. When I run the project with junit test, I found the ...
1
vote
3answers
3k views

Handling multiple windows using selenium

Is it possible to work on multiple windows using selenium, when I searched on the net, there are only explanations and codes available for Selenium2 webdriver version. For the normal selenium I can't ...
0
votes
1answer
139 views

Hyperlinking FindBugs report to source code

By default, the HTML report generated by FindBugs specifies the name of the Java class and line number(s) of each issue it reports. Is there a way to tell FindBugs to hyperlink the report to the ...
2
votes
1answer
305 views

Har File Monitoring

I'm looking to automate some testing of calls we make to an external service. I've gotten Browsermob-proxy and selenium to play together nicely. I'd now like to monitor the requests as they occur, ...
0
votes
2answers
2k views

Selenium automation on Oracle applications

Is there a way we can perform Selenium automation (with Java) on Oracle applications? On the Oracle website they have given ways by which we can convert the Oracle applications into Oracle ADF faces ...
-1
votes
3answers
628 views

Launching WebDriver from a servlet.java throws exception

I prepare a web interface that I could launch the WebDriver. I used servlet.java. I'm using JBoss application server, when I try to run it I receive the following exception 13:39:40,779 ERROR ...
3
votes
1answer
2k views

How to get XPath of a list element generated by AJAX?

When I type a keyword ("Documents 1.xml") driver.findElement(By.id("documentSelect_enter")).sendKeys("Documents 1.xml"); in this field: <input id="documentSelect_enter" type="text" ...
3
votes
2answers
763 views

How to use TestNG to create multi-user tests scenarios?

What I need to do is to create UI test cases for our application and we have decided to use Selenium with TestNG (we're still open to other options if there are considerable advantages). The tests we ...
2
votes
4answers
2k views

Unable to get Selenium Web Driver running with Java

I tried running the following code to start running Selenium WebDriver on Java, using the following code import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import ...
5
votes
2answers
243 views

which version of jmeter-plugins (>=0.3.0) can work under JDK 1.5?

Which version of jmeter-plugins (version >= 0.3.0) can work under JDK 1.5? And which version of JMeter is compatible with this version of jmeter-plugins?
2
votes
2answers
2k views

TestNG Mark a Test as Failed if a Particular Path is Used

Is there a way to mark a test as failed in the TestNG framework if a certain path is followed? I know I can use system.exit(1); or something similar to mark an abnormal termination but it doesn't ...