tags:

views:

121

answers:

7

This question is marked as a community wiki, and is subjective, but please don't close it, I think its a good question, and I would like to know what the development community have to say about testing.

I've been a developer for over 10 years, and I've yet to work in a company that has a dedicated testing department. Over the years I've seen the attitude towards testing get steadily worse, lately management are after quick results, and quick deployment, and there are lots of teams out there that simply forget the science of development, and omit serious testing.

The end result is - management is satisfied with the speed of development initially, the app might even run stable in production for a while, but after that something is bound to snap. Depending on the complexity of the app, a lot could go wrong, and sometimes all at once. In most cases, these issues are environment driven making them hard to isolate and fix. The client is the entity who is ultimately taking on the role as stress testing, because like it or not, someone eventually HAS to test the app.

During this phase, management feels let down by the developer. The developer feels management didn't listen in the first place to the pleas for significant testing, and the customer looses faith in the software. Once order is eventually restored, if the product survives this. The developer is ultimately the one who gets blamed for not outputting a stable product, and for now going way over budget in man days, because the developer spent 2-3 times more on testing the app (eventually).

Is this view point realistic? Does anyone else feel this strain? Should developers be taking professional courses in testing? Why is testing being left behind? Or is this just my bad fortune to have had this experience over the last 10 years of my career.

Any thoughts welcome. Please don't close the question.

+8  A: 

In my opinion developers should never test, since they test "does it work?".

A test engineer on the other hand, tests if something "does not work", which is a very important difference in my opinion.

So let other people do the testing, test engineers preferably or otherwise functional analysts, support engineers, project managers, etc...

Gerrie Schenck
I'd go further and claim that no developer can satisfactorily test his or her own creations. Testing is like being nasty to small children -- much easier (for most of us) if they are someone else's.
High Performance Mark
Whole-heartedly agree. It'd be like trying to mark your own exam! If you know what you've done, you know what to examine, and you miss the things that you didn't see coming and tripped over.
Andy Shellam
You answered great, after posting the question, I started reading the art of testing. Clearly developers shouldn't test, its even recommended you completely outsource testing. However reality check... I'll be the one doing the testing, my hope is I can learn to step out of my developer shoes and take on the role of a professional tester. Results won't be as good, but given the mindset of smaller companies, I don't expect them to take testing seriously any time soon.
JL
+2  A: 

Personally, everything I write is unit-tested if it has any significance. Once it passes that kind of testing, I usually pass it on to friends and ask them to use it. It's always the end-user who does some sort of unexpected action which breaks things, or finds that the interface you designed which was oh-so-intuitive to you is really quite complex.

Many managers really do need to focus more on testing. I personally am appalled at some of the code goes out the door without proper testing. In fact, I can think of multiple applications I use from various companies that could've used a nice unit test, let alone usability testing.

I supposed for companies it boils down to, does it cost less to have dedicated people for testing, or to fix the inevitable problems later and get a product out the door?

Xorlev
+1  A: 

I've only worked in one organization that had dedicated testers - and that was in 1983.

Use TDD and it won't be an issue - plus your development cycles will accelerate.

For example, this week I wrote 3 automated acceptance tests for a complex application. Manually performing these tests takes about 4 hours. The automated tests run in under 3 minutes. I ran the tests over 50 times today, shaking out bugs both small and large.

End result: the application is good to go to the end-users, and the team has high confidence in its capabilities. Plus the automated tests saved about 200 man-hours of manual testing just today. They'll save even more as regression tests as future enhancements are made.

Some people claim that TDD imposes extra overhead, which is true in only the most myopic of perspectives. Writing the test scripts took about 2 hours. Fixing the twenty bugs that they found took the rest of the work day. Without the tests, I'd still be doing manual testing trying to track down (at best!) the second bug.

Steven A. Lowe
Unit tests can only say "This function behaves as the developer thinks it should", not "This program behaves as specified in the spec". While TDD is good to create stable source code it is in no way a full replacement for real testing. On another note: Programmers tend to write their tests in a way that they don't fail providing only valid input, they often don't catch many types of bugs that appear due to invalid input. Ofc ymmv.
dbemerlin
Note, Test Driven Development is a design methodology for developers; it does not replace integration, system or UAT testing, which should be done by a separate test team, for the reasons already noted. -1 for confusing TDD with testing.
MagicAndi
@[MagicAndi]: extend the TDD philosophy through to acceptance testing, and there is no confusion; it's just a matter of scale.
Steven A. Lowe
@[dbemerlin]: see comment to MagicAndi. There is no compelling reason to stop the TDD process with unit testing.
Steven A. Lowe
+2  A: 

Like so many others here (so far you have all been too ashamed to admit it) but I have users to test my software. I have read that this is not best practice, but I'm not sure that the management have.

High Performance Mark
Since this post, I have been reading "The art of testing". +1 for honesty. I think ultimately there is no getting around that users will eventually find bugs. I am trying to find a practical solution to minimizing the users testing efforts so to speak.
JL
Well yes, you are on the path of virtue, but down here in the mud where I live and work ... I just thought I'd take the opportunity of your good question to unburden some of my shame
High Performance Mark
+2  A: 

The last two companies I have worked for had dedicated professional testers who do both manual testing and write automated test scripts. The testers did not simply test the product at the end of the development cycle (when it is usually too late to make significant changes) but were involved from the beginning converting requirements into test cases and testing each feature as it was developed. The testers were not a separate department, but an integral part of the development teams and worked with the programmers on a daily basis.

The difference between this and the companies I have worked at without dedicated testers is huge. Without the testers I think development at both companies would have ground to a halt long ago.

Unit testing is important too but developers test that the code does things right, not that it does the right thing.

Dave Kirby
+1  A: 

In ours, we have dedicated testers. However, for the developer it is implied that he does his own informal testing first before submitting to the tester for a more formal testing.

KeithDB
+1  A: 

In the company i work for:
The programmers tests everything => If it compiles keep it (as development is mostly done live so it's not necessary to push changes to live environment), if it doesn't fix it until it does. Oh, and unit tests are not used as they take up too much time.

Later Bugs are usually found by the users and/or the project manager who checks if the project looks ok but has too much to do to do in-depth testing.

I currently fix parts of projects that have never worked at all which haven't been noticed/reported for a year.

dbemerlin