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

learn more… | top users | synonyms

0
votes
0answers
13 views

Testing Verify Method Call Without Argument In Test Class

I have a class which takes a message with payload String. The payload is then split and used to create an Entity which is passed to DAOInterface to persist. How can you test the call ...
0
votes
1answer
104 views

Calling data from one class to another class - framework for JUnit

Please forgive me as I am still very new to the world of test automation. I have started out by using Selenium WebDriver with JUnit4, predominately on windows OS, although I have modified my scripts ...
5
votes
4answers
8k 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
69 views

Selenium opens browser and loads page, then stops

Selenium opens browser and loads page, then stops. I have inherited a selenium project with no internal documentation and I'm a bit stuck on how to get it up and running (I am new to Selenium). We've ...
1
vote
1answer
66 views

Selenium webdriver - Java with Webservices

In our application we are using web-services and DB, is it possible to integrate Selenium webdriver with web-services (Soap UI)? If two different frameworks are integrated, whether this is good?. My ...
0
votes
1answer
47 views

How to compare value of a td of a table with a numeric value using webdriver?

I have to compare a value of a td tag with a numeric value. I have o check whether the value coming in that td is >= some value. The html of td is: <td class="sorting_1">78000</td> I ...
1
vote
0answers
46 views

How can I use Surefire to run parameterized tests in parallel?

I am using jUnit's Parameterized annotation on some Selenium tests to specify the browsers they should run with. I am also using SureFire's new parallel parameter (set to "classes") to try and run ...
0
votes
1answer
38 views

Using Jtidy to parsing HTML

I am using Jtidy I pass an InputSteam and then I tried to validate whether or not the XHTML code in the InputSteam is valid. InputStream s = new ...
2
votes
1answer
161 views

How to run multiple browser instance with Webdriver, Java, and Junit/TestNG?

I have a test ready to be executed but it takes a long time to finish. In this test I'm feeding in csv data, so basically the whole test will run 56 times. I was wondering if there's anyway I could ...
3
votes
1answer
460 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
479 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. ...
1
vote
1answer
65 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
2answers
177 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
60 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
85 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
116 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
366 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
676 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
317 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
76 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
564 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
237 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
458 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
2k 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
2k 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
124 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
167 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
129 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 ...
1
vote
1answer
203 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 ...