2
votes
3answers
209 views

how and should I 'unit test' an entire package?

I'm still learning to be good about doing unit level testing, as I've always been a little sloppy about only doing functional testing in the past, so I want to double check I'm doing this 'right'. I ...
0
votes
0answers
33 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
1answer
181 views

Is it worth the time to run static analysis tools (e.g. Findbugs) on test classes? [closed]

How likely is it for a bug that can be discovered by a static analysis tool (namely Findbugs) in test classes mask a real bug in the actual code? Is this a realistic scenario? Is it really worth the ...
3
votes
3answers
380 views

Effective way to estimate dead code removal?

I've been working in an application with about 100k LOCs and basically We have been reworking features to comply with a new architecture based on a new technology stack. This work is almost finished ...
1
vote
1answer
290 views

Unit Testing Wrapper (Facade?) Method

I have to write unit tests for some classes my group is developing. The classes are fairly simple, and I'm not sure how to best test them. public class MyObjectRegistry { private ...
4
votes
4answers
2k views

How to test the data access layer?

I have a DAO method that utilizes Spring for JDBC access. It calculates a seller's success rate of selling an item. Here is the code: public BigDecimal getSellingSuccessRate(long seller_id) { ...
2
votes
2answers
135 views

Where should tests' log files go?

My application has a rather non-trivial, yet standard, log configuration. It includes a console appender and a rolling size-based file appender. When I'm running the tests, thru the IDE or with ...
0
votes
1answer
75 views

Test Doubles : Do they go in “source packages” or “test packages”?

I've got a couple of data access objects (DefaultPersonServices.class, DefaultAddressServices.class) which is responsible for various CRUD operations in a database. A few different classes use these ...
2
votes
3answers
198 views

How do I limit the resources available to a program?

I'm delving into multi-threaded programming with Java, but I'm finding it hard to test my program for bugs. My computer simply has too many resources and cores, making it hard to see how my program ...
3
votes
2answers
258 views

What are the different meanings of 'fixture'?

I have some difficulty understanding the concept of "fixture". I know what a test suite is, a test case, a test run, but what exactly is a "fixture"? A parameterized test case? It seems to me that ...
3
votes
2answers
644 views

Testing Java as Groovy

We're looking into improving our testing process for some of our applications, and the idea that's been put forward it to write unit tests in Groovy and automatically run them with Maven. The first ...
-2
votes
2answers
426 views

How can I test database access methods in Java? [closed]

I want to write a test for a method that accesses a database such as following. public class MyClass{ public String getAddress(Int id){ String query = "Select * from Address where ...
14
votes
4answers
3k views

What is the correct way to handle debug output in Java?

As my current Java projects grow bigger and bigger, I feel a likewise growing need to insert debug output in several points of my code. To enable or disable this feature appropriately, depending on ...
7
votes
3answers
476 views

How do I hire testers by giving them a buggy app for testing their efficiency?

My boss wants to recruit testers based on their testing efficiency (number of bugs identified). So, he's shortlisted 5 people and I need to give them an app full of bugs and see how they fare in ...
8
votes
11answers
7k views

Why is using System.out.println() so bad? [closed]

Of course, it is very good use to use a logging framework for the error messages or warnings. But sometimes I use System.out.println() if I want to try something new in a short time. Is it really so ...
1
vote
2answers
288 views

Recognizing text fields according to their label value

I have an application who has text fields (not select, not checkbox or other types) where an user can enter some value, like this: ISBN and E-Mail are the label of each input. Now I have to ...
4
votes
3answers
297 views

When module calling gets ugly

Has this ever happened to you? You've got a suite of well designed, single-responsibility modules, covered by unit tests. In any higher-level function you code, you are (95% of the code) simply ...
41
votes
6answers
5k views

How to deal with static utility classes when designing for testability

We are trying to design our system to be testable and in most parts developed using TDD. Currently we are trying to solve the following problem: In various places it is necessary for us to use static ...
36
votes
14answers
2k views

If you had two projects with the same specification and only one was developed using TDD how could you tell?

I was asked this question in an interview and it has been bugging me ever since. You have two projects, both with the same specification but only one of these projects was developed using Test ...
4
votes
2answers
179 views

Need to test .properties one by one in every possibility?

For example, there are some key-value configuration in .properties file. Such like someFeatureEnable=true. It must be bool type value which will be parsed by framework, in my case it's typical Java ...
7
votes
3answers
2k views

How could I make automatic tests for GUI?

How can I check automatically what is seen and what not? Or at least, how can I organize some partly automatic tests? IDE: Eclipse (could use also IntelliJ Idea if necessary) Testing tool: Junit ...
3
votes
3answers
595 views

On the effectiveness of unit testing

EDIT: I think that no one really understood the question. I think that this is partly my fault as well, so I hop it gets better now. The thing is, I am perfectly aware of the existence of mocking ...
9
votes
5answers
2k views

Test-driven development and improving white box testing skills

I am an entry level Java Programmer straight out of school. I have good knowledge and experience with J2SE. Can anyone advise me on how to improve or tune my skills towards being a Java white box ...
2
votes
3answers
365 views

Testing web applications written in java

How do you test the web applications (both server side and client side code)? The testing method has to work irrespective of the framework used (struts, spring web mvc) etc. I am using Java for the ...
0
votes
1answer
122 views

Testing activities carried out in an OO development project

Does anyone know the testing activities carried out in an Object-Oriented development project that uses an incremental approach to development and delivery?
9
votes
2answers
1k views

design pattern for unit testing? [duplicate]

I am beginner in developing test cases, and want to follow good patterns for developing test cases rather than following some person or company's specific ideas. Some people don't make test cases and ...
5
votes
3answers
320 views

Should a unit/integration test that may result in an infinite loop have a clear assertion?

Unit: A multithreaded unit reads data of a queue and processes it, sending it off to another queue. When the last item is processed (null value found) the process stops. Test: Place a set of known ...
5
votes
1answer
1k views

Have you tried Chronon the Java “Time Travelling Debugger” — if so, is it worth trying and why? [closed]

First heard about it from Google Tech Talks, back 2009 when it was called Silver Bullet: http://www.youtube.com/watch?v=LpfmKIxusZY It's now called, Chronon... http://chrononsystems.com/ "Sounds" ...