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
0
votes
2 answers

Running Android JUnit tests with Ant: ClassNotFoundException: org.junit.Test

I am attempting to get my JUnit tests for an Android application running using Ant. While using Eclipse, it is no problem, all is compiled and can be run with no problem. At the moment I am receiving a ClassNotFoundException to org.junit.Test. I…
Rebane Lumes
  • 393
  • 2
  • 4
  • 18
0
votes
4 answers

How to Run the junit+selenium tests in order

Hi I am new to JUnit testing. I run my JUnit program having selenium code it doesn't run from top to down, it runs randomly. However i want to execute the program in order, functions like login, creation, updation, Delete. But, it's running like…
user2251940
  • 61
  • 1
  • 3
  • 11
0
votes
1 answer

How can I convert these JUnit 3 tests to JUnit 4?

My company wants to move off of JUnit 3 and start using only JUnit 4. The other intern and I have been given the task of converting the older JUnit 3 tests to use JUnit 4 conventions. However, I'm having a problem converting the testfile I'm working…
gchan
  • 27
  • 2
  • 9
0
votes
1 answer

Android TestCase Junit3

Im trying to test next code: public class MessagerTest extends TestCase { Messager mClassToTest; Context mArg1; String mArg2; protected void setUp() throws Exception { mClassToTest=new Messager(); mArg1= getTestContext(); mArg2=…
0
votes
1 answer

CastClassException Building a test case for a Struts2 Action

I am having trouble getting unit tests built that use the Spring mock framework that comes with Struts 2.3.8. Basically, I have a BaseTestCase that builds the framework. And then individual test cases that call into it. Coming out of the…
WPrecht
  • 1,340
  • 1
  • 17
  • 29
0
votes
1 answer

Android JUnit and parsing xml data - what to test

I am trying to get more experience on JUnit and its usage in Android. Referring to this official Android training Parsing XML data I wonder if anyone can provide with an example on how to test some of the used methods. Particularly how would you…
eeadev
  • 3,662
  • 8
  • 47
  • 100
0
votes
2 answers

Unable to run junit test from command prompt

I'm trying to run a JUnit test case from command lineThe code I followed is set to bin dir c:/eclipse/workspace/sample/bin> java -cp C:\Ram Doc\eclipse\plugins\org.junit_4.8.2.v4_8_2_v20110321-1705.junit.jar C:\Ram…
Riy1234
  • 39
  • 1
  • 8
0
votes
1 answer

junit4 output interpretation

My console output from running JUnit in cmd.exe looks like: JUnit version 4.10 .....I Time: 0,469 OK (5 tests) What does the I on the second line mean?
panny
  • 2,186
  • 4
  • 23
  • 26
0
votes
1 answer

Adding a @Test method dynamically to junit test class

We have a text file where a list of search query and the expected result is given. Such as, Search Result a:120 result1 b:220 result2 ..... ..... Now, we need to write a JUnit (heavily used in our daily build) test class,…
kma
  • 3
  • 3
0
votes
2 answers

Mocking a concrete class in junit 3

I have a class which has the following constructor: class Foo { Foo (Bar bar) { ... } } I am attempting to write a unit test for this class and Mock out the dependency on Bar. However, I have to use JUnit 3 and Bar is a concrete…
bm1729
  • 2,315
  • 3
  • 21
  • 30
0
votes
1 answer

java.lang.ClassNotFoundException: junit.framework.TestCase?

In my Lifeary custom portlet i have included one java class in which my custome logic for uploading the media on cloud server is resides. that java class if i put in one java project then if i run then its working fine. but when that same java class…
BhavikKama
  • 8,566
  • 12
  • 94
  • 164
0
votes
1 answer

Mocking inside a Java class

So I have this GWT code that handles RPC requests maintain states(ready, waiting, error etc). And I would like to check if the class change its states correctly after each call, set response variables etc. Now how should I proceed to test that…
Diones
  • 1,425
  • 2
  • 19
  • 26
0
votes
1 answer

Unit Testing Struts2 + Spring action with DAO

I'm trying to unit test struts2 actions (hitting a real database), but I haven't been able to connect to the db successfully. I'm new to Spring, and the project setup uses jdbctemplate in multiple beans and DAO classes. Here's my attempt so…
Dax
  • 3
  • 4
0
votes
2 answers

How do I pass parameters to the tested project?

I have an application that draws random characters from the alphabet and deals with them. I’m new to JUnit and try to use it. I want to test the application by providing predefined characters and testing if it deals with them right. How can I pass…
Herrbert74
  • 2,578
  • 31
  • 51
0
votes
1 answer

JMock tutorial using JUnit 3?

I'm looking for a JMock tutorial using JUnit 3. Preferably an easy one as well. Every JMock tutorial I have found has been fairly difficult to read through. Also, is it worth it to use JUnit 4? Thanks
Eric Francis
  • 23,039
  • 31
  • 88
  • 122
1 2 3
10
11