23
votes
4answers
1k views

How to efficiently troubleshoot or test new code when hardware setup to reproduce bugs is difficult or impossible to obtain?

I work at a mid-sized company (150ish employees, ~10 size engineering team), and most of my projects involve interfacing with lab equipment (oscilloscopes, optical spectrum analyzers, etc) for the ...
0
votes
1answer
48 views

How to mark unit/integration tests when they do not apply for the current test configuration - Inconclusive or Passed?

In my test environment we are running the same set of integration (and sometimes unit) tests against different systems that have different capabilities. Some of the tests cannot be executed against ...
-1
votes
1answer
129 views

Making my code more robust [closed]

I have recently finished a piece of code that passed all tests. (Here is some idea what it does and Here is some actual code.) Problems began, however, when I run my code on the cloud with actual ...
5
votes
3answers
3k 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
4answers
170 views

How to use unit testing? [duplicate]

How to use unit testing? There are a lot of frameworks for different languages, which provide functionality of unit testing. There is a lot of information on how to use each of them technically. Just ...
2
votes
1answer
117 views

Testing MVC models when using SQL referential constraints

I have an MVC web app that's wired against PostgreSQL. The DB uses the full gamut of various referential constraints to ensure referential integrity, as opposed to say the Rails approach, where you ...
57
votes
11answers
6k views

Is it a bad practice to modify code strictly for testing purposes

I have a debate with a programmer colleague about whether it is a good or bad practice to modify a working piece of code only to make it testable (via unit tests for example). My opinion is that it ...
0
votes
1answer
194 views

Coping with test code becoming too complex [duplicate]

Our test automation team writes tons of automation tests for our WEB application, but it seems to me that their code is becoming way too complex and warrants that someone will test it as well. Is ...
17
votes
4answers
2k views

Why is test driven development missing from Joel's Test?

I was reading this blog by Joel Spolsky about 12 steps to better code. The absence of Test Driven Development really surprised me. So I want to throw the question to the Gurus. Is TDD not really worth ...
3
votes
2answers
184 views

Is deserializing complex objects instead of creating them a good idea, in test setup?

I'm writing tests for a component that takes very complex objects as input. These tests are mixes of tests against already existing components, and test-first tests for new features. Instead of ...
9
votes
11answers
8k 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 ...
3
votes
5answers
8k views

How to unit test a jsp file?

I'm developing a Java 6 EE application and I'm testing my jsp code with another one with a testing version of the function calls and code used in the original one but it seems loose and impractical. ...
4
votes
3answers
301 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 ...
4
votes
3answers
169 views

Is it more advantageous to write a program to test your code (ie a client) or just use the main portion of your program?

For instance if I had a program with a bunch of methods. public class Dog{ public boolean ishappy{..} public int weight{...} public static void main{ ...
10
votes
9answers
505 views

Coping with an unfixable endless project

We have a large (1200+ hours) website that has a lot of technical debt. This is mainly caused by the following (usual) reasons. Multiple programmers who come and go during development. Change of ...
3
votes
2answers
343 views

Why would you use built-in WebDev instead of local IIS

Since starting developing ASP.NET projects I find myself familiar just touching F5 for debugging. I think most of us are learned that way? From then and much later I learned to live with the spooky ...
6
votes
2answers
2k views

UI automation patterns and best practice for desktop applications

Background I'm currently automating some tests for a plugin for MS Office. We are creating Coded UI tests in VS 2010. I suppose I could use the "Coded UI test builder" tool, but it does not really ...