The junit tag has no wiki summary.
0
votes
0answers
34 views
Best practices for introducing testing to a large, stable, legacy Java application? [duplicate]
I'm working with a stable, but large legacy java application that is over 12 years old, maybe older.
Although the code has been upgraded to java 6, it's lacks the features above java 1.4 for the most ...
2
votes
2answers
440 views
Unit testing to prove balanced tree
I've just built a self-balancing tree (red-black) in Java (language should be irrelevant for this question though), and I'm trying to come up with a good means of testing that it's properly balanced.
...
0
votes
2answers
426 views
Where Are Multiple JUnit Test Methods Typically Placed in Code?
I've just read the Vogella JUnit tutorial and found it very helpful in understanding how to use JUnit. However, I'm a bit confused about what the convention is for placing multiple test methods in ...
4
votes
2answers
337 views
Looking for a very subtle unit testing example [closed]
In the context of Continuous Integration, I need to teach unit testing to a 20-people audience of programmers.
Everything will be all right, but I am still trying to find the perfect unit testing ...
2
votes
1answer
277 views
Do I need JUnit tests for the controller layer on a MVC when I have a database layer
I have a MVC which has this structure:
ui
controller
db
model
Basically the controller doesn't really do much more than connection ui with db layer.
Do I need to provide JUnit tests for the ...
3
votes
2answers
119 views
Is the use of JUnit feasible for a short duration project of around 3 months? [duplicate]
I work on projects which are usually of a duration, not more than 3 months.
Recently there has been a discussion about the use of JUnit in the projects.
There are activities being planned related to ...
2
votes
5answers
526 views
Unit test cases(JUnit), not by developer but other team members
I have a very interesting situation. Management has strictly asked to do unit testing for the code being developed and divided the task in such a way that few are developing the code and others are ...
2
votes
1answer
425 views
JUnitEE vs JUnit
I know what unit testing is in general and what JUnit is in particular. But here I see that there is a project called JUnitEE which seems to me to be a wrapper over JUnit. So I would like to better ...
2
votes
3answers
2k views
How to write junit test case for the program [closed]
I have a method which has external dependencies within the method. Please help me in writing a junit test case for the below program.
@Override
public void methodToTest(String user){
...
8
votes
3answers
895 views
Mocking concrete class - Not recommended
I've just read an excerpt of "Growing Object-Oriented Software" book which explains some reasons why mocking concrete class is not recommended.
Here some sample code of a unit-test for the ...
2
votes
3answers
5k views
How to test Java web applications
So far I haven't been testing or learning how to test my java web applications.
If you do, what are the tools you need, and is it really necessary to test a web application if doesn't need scaling or ...
1
vote
2answers
499 views
Submitting Java Code with Junit unit test
I have mostly worked on simple java programs and compiled and run them with Eclipse on Windows. So, I have no experience of using command prompt for compiling Java projects and do not have much info ...
2
votes
3answers
128 views
Should I care about Junit redundancy when using setUp() with @Before annotation?
Even though developers have switched from junit 3.x to 4.x I still see the
following 99% of the time:
@Before
public void setUp(){/*some setup code*/}
@After
public void tearDown(){/*some clean up ...
5
votes
3answers
513 views
Jenkins without Automated Tests
I know that Jenkins is focused on continous building/testing, monitoring of batch jobs about the project. We have a legacy project which such condition :
1)Has a development team.
2)It has SVN for ...
4
votes
2answers
187 views
Shipping test code as a form of sanity check
Have you ever shipped test code (JUnit, NUnit etc) with your application that could be runnable by the end-user ?
Basic Idea is this :
The application can be deployed in a varied environment and it ...
1
vote
2answers
724 views
A good code coverage framework for groovy/java?
Currently, I am working on a very complex product. Unit testing is something unknown to this product till date. Hence the code base is too complex to keep it compatible with unit tests. I am supposed ...
19
votes
4answers
2k views
How to drastically improve code coverage?
I'm tasked with getting a legacy application under unit test. First some background about the application: It's a 600k LOC Java RCP code base with these major problems
massive code duplication
no ...
7
votes
3answers
701 views
What elements of my JUnits should I mock?
My classes are following this structure
Service Tier (creates and maps InputDTO to DB Data) ->
DAO Tier (actually executes DB calls)
When I write the service tier JUnits, and when it calls DAO ...
3
votes
1answer
161 views
Is there canonical jUnit reference documentation?
I can't seem to find any kind of complete reference for jUnit. The only way I've managed to find to know about all the features in jUnit is to check out all the release notes for it.
For example ...