JUnit is a unit testing framework for the Java programming language.

learn more… | top users | synonyms

0
votes
0answers
7 views

Selenium JUnit DOM Testing - Problem with counting Dynamic rows

I have a DOM structure "div > table id = 't1' > tbody > tr" (count of tr changes on resize) The javascript function changes the number of rows on resizing the browser. I want to count number of rows ...
3
votes
1answer
435 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
355 views

How to execute parallel junit tests with maven surefire

I'm using selenium webdriver, Junit 4.9, maven for testing. Now I need to parallel tests. I added the plugin below, then tried to run it from IntelliJ IDEA 11, but it was still running sequentially. ...
3
votes
2answers
83 views

How to manage application data when running multiple tests in parallel?

Our functional test suite is slow I have inherited a functional test suite using Selenium 2 (Webdriver) and Junit. We have around 500 tests written for our Java web application. Running the full ...
1
vote
2answers
40 views

Test results that differ from running via command line versus IDE

I have just run a set of automated tests via the command line using Maven as my build tool and JUnit4 as my test execution framework. There was a report of two errors which were recorded in a text ...
0
votes
0answers
22 views

JBehave Assert.fail fails in console and not in JUnit (eclipse)

I asked this question on StackOverflow and have not gotten any answers, so re-asking here. I am trying to set up JBehave for our school project and am unable to figure out why an Assert.fail() in a ...
0
votes
1answer
90 views

Alerts: How to assert a given paragraph

Using WebDriver and JUnit 4.11. I'm attempting to find an alert and assert the body of the alert paragraph. My code is: @Test public void dNameField(){ WebElement nameField = ...
2
votes
1answer
209 views

What are the Selenium, JUnit, Ant and JScover and how they are combined?

I am given a javascript function which takes as input some numbers and returns the max, as a part of a project at the university, and I have to test it, using Selenium, JUnit, Ant and JScover. I have ...
0
votes
2answers
281 views

JUnit ParallelComputer Runs All Test Classes As One

I'm building automation testing for web application by using JUnit 4.9 and Selenium Webdriver. It's time consuming. So I'm trying to experiment with ParallelComputer. I'm wondering how can I get ...
1
vote
2answers
159 views

Code Coverage for Web Applications?

Does anyone have any experience using code coverage tools for web applications? I primarily work with Webdriver and JUnit, but I am not sure if we are covering all the possible cases. This may ...
1
vote
2answers
73 views

Assertions and Outputting Specific URLs

Here's what I've done so far. @Test public void test() { String[] list = {}; for (int i=0; i<list.length; i++){ driver.get(baseUrl + "/" + list[i]); boolean ...
0
votes
3answers
240 views

Selenium tests written using Junit are not running in order

I executed some selenium scripts, but they are not running properly. Execution is taking the scripts randomly and start execution. I want to execute the scripts as per script order. Please tell me a ...
0
votes
3answers
123 views

Using WebDriverWait to verify a performed action versus assertions in JUnit

Can someone tell me if by using the following code is sufficient enough to verify that the actions performed have taken place. So by using a wait command for certain elements to be visible in the DOM, ...
0
votes
3answers
199 views

Best approach to use when values are dynamically created?

I'm looking for some advice on how to select a WebElement. When I click a button that creates a new 'page', the given value is dynamic, in that it is totally random and not sequential. I would expect ...
2
votes
3answers
801 views

How to make my tests more robust in WebDriver using JUnit (code included)

I'm hoping someone can advise me on some best practices to make my tests more robust. The problem I'm having is that every so often my tests will fail at the point of WebDriver waiting for an ...
1
vote
2answers
1k views

How to generate testing report in JUNIT in webdriver

I am using Selenium webdriver 2.0 in JUnit framework. I need to generate a report on my tuned both (positive and negative) test cases. NOTE: We have an option to generate report by default in ...
0
votes
0answers
96 views

How to test an SDK built for Android?

My company has an SDK for the Android platform. The SDK sends information to our servers. I need to be able to intercept, interpret, and analyze what the SDK is sending to these servers in terms of ...
5
votes
2answers
155 views

JUnit-friendly framework for production monitoring

My team deploys code to production every week or so. We have a large set of post-deployment validations, e.g.: New log lines are appended to Tomcat log (ssh to machine, tail -f the log) Database ...
0
votes
1answer
113 views

How to perform Selenium navigation before tests run without using JUnit 4.11+'s setUp or at the start of the test method?

How to perform Selenium navigation before tests run without using JUnit 4.11+'s setUp or at the start of the test method? We've got both navigation and bookmark based Selenium tests. The test code ...
4
votes
3answers
6k views

Webdriver Check if Checkbox is Set and Set it if Not

I am learning Webdriver with JUnit by going through Alan Richardson's Selenium Simplified book and taking translating the exercises/tests from Selenium RC to Webdriver. So far, this has proven to be ...
1
vote
1answer
192 views

JUnit Status Messages

Given I have the following class (See Parallelized Runner for more information on parallel runs): @RunWith(Parallelized.class) public class TopicTest { String topic; public TopicTest(String ...