Questions tagged [junit3]

JUnit 3 is version 3 of the popular JUnit testing framework for Java

JUnit 3 is version 3 of the popular JUnit testing framework for Java.

Use this tag only for question related to features provided by version 3. Use for general questions.

152 questions
5
votes
1 answer

how to accept input from user in Junit console

I am trying to write Junit test case for the function given below: class A{ int i; void set() { Scanner in=new Scanner(System.in); i=in.nextInt(); } } Now my problem is when i create a Junit test case for it, it does not except…
user1778824
  • 369
  • 2
  • 6
  • 15
4
votes
4 answers

Migration: JUnit 3 to JUnit 4: TestSuite

I was recently working with JUnit 3, but I decided to migrate to JUnit 4. Now Im facing the following problem: I was using a TestSuite with JUnit 3, where I ran all java-Testclasses whose names matched a pattern like "*TestMe.java". I've got a…
nano7
  • 2,455
  • 7
  • 35
  • 52
4
votes
3 answers

Running lots of tests causes Eclipse to freeze, continue freeze etc

I have noticed that executing large mostly Junit 3.x test suites, causes Eclipse to shititself and lockup. Even when i allocate a lot of heap and perm gen (1200m and 400m) it hums along and then just freezes and then continues, taking quite some…
mP.
  • 18,002
  • 10
  • 71
  • 105
4
votes
1 answer

BadPaddingException with Jasypt library

I am not sure whether this is a bug or I am doing some mistake. In either case, I need help from somebody. We have incorporated Jasypt along with Spring 2.05 in our web application in which we are encrypting some passwords in the properties file.…
Kashif Nazar
  • 20,775
  • 5
  • 29
  • 46
3
votes
0 answers

Android automated testing with Jenkins

Does anyone have a good tutorial for setting up Jenkins to do unit testing for an Android project? I can do unit tests with Eclipse, but I need it for Jenkins.
mars3142
  • 2,501
  • 4
  • 28
  • 58
3
votes
1 answer

Repeating a JUnit3 test

I am using Apache's Surefire JUnit plug-in for maven. I would like to re-run a test suite in JUnit 3.x. This is possible easily in JUnit 4, which offers the 'Parameterized' annotation. Do you know how I can do the same in JUnit 3.x? My goal is to…
Ravi Kumar
  • 31
  • 1
3
votes
1 answer

Calling test from another class of selenium in java

This is my method which call a function from another class Selenium Setup is defined hear. public void Transfer() throws Exception { System.out.println("\nTransfer\n"); selenium.open("/logon/user"); selenium.windowMaximize(); login…
user808548
3
votes
1 answer

Android - testing if another activity has started

I am trying to test the following scenario, enter a letter in the autocomplete textview, scroll down and select one of the options, then click a button, The button click starts a new activity. I want to check if the new activity has begun or not.…
Mukul Jain
  • 1,807
  • 9
  • 26
  • 38
3
votes
1 answer

Purpose of test suites? (JUnit 3)

Can anybody explain me the purpose of test suites? I'm using idea+maven (I just started doing with maven) and i have sources like this: my classes and i clicked to "test" on the lifecycle toolbar of my project, and the result was like…
Charlie Harper
  • 379
  • 4
  • 7
  • 21
3
votes
1 answer

Must GroovyTestCase methods return void?

In the docs for groovy.util.GroovyTestCase (http://groovy.codehaus.org/api/groovy/util/GroovyTestCase.html) the description says "A default JUnit TestCase in Groovy. This provides a number of helper methods plus avoids the JUnit restriction of…
Jack Holt
  • 497
  • 4
  • 9
3
votes
2 answers

unable to resolve static method junit assert

I have tried using both Junit 3.8 and Junit 4. After reading in the Android docs that Android is not updated for Junit4 I downgraded to 3.8. I am persistently getting this error: 02-17 16:37:27.409: W/dalvikvm(32014): VFY: unable to resolve static…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
3
votes
1 answer

Junit4: how to create test suite dynamically

I have huge set of JUnits in my projects. Out of which, I would like to execute certain set by looking up the classes from a property file. Prior to JUnit 4: public class TestSuite { public static Test suite() { TestSuite suite = new…
Chris
  • 5,584
  • 9
  • 40
  • 58
2
votes
2 answers

JUnit 3, how to find which tests covered my lines of code? (RTC...maybe?)

The scenario is: I've run JUnit code coverage in eclipse with RTC installed. I have this view called "Coverage" that I am not sure about, but it seems to show me the code coverage of my JUnit tests. It shows for every package, class and method a…
vlad-ardelean
  • 7,480
  • 15
  • 80
  • 124
2
votes
1 answer

Tests run via maven, and adb, but not IntelliJ - why?

I'm working on a project defined with maven, and I can successfully run the maven script to build the app, and run automated (junit 3.8.2) tests on the device with instrumentation. Likewise I can use adb to run the instrumentation tests…
Ollie C
  • 28,313
  • 34
  • 134
  • 217
2
votes
1 answer

what is the difference between Junit 3, Junit 4, TestNG

what is the difference between JUnit 3, JUnit 4, TestNG in selenium how selenium is implemented differently in these three testing frameworks? Can any one explain clearly.. Thanks in Advance..
1 2
3
10 11