views:

361

answers:

12

If you had to do without one or the other in a software project, which would you pick? I've had plenty of projects in which the client or PM thought they could get away without one or the other. We always paid the price.

+5  A: 

I'd say you could go without Testing rather than Requirements. If you don't have requirements, how do you know what you're developing?

If the programmers are good enough, they should be able to catch most of the egregious errors that testing would find.

David
You're thinking of traditional testing. I don't think it is the best method for reducing error rates. Switching to TDD has been shown to reduce defect rates by 65-90%.
tvanfosson
If you go without Testing, how do you know what you developed? :-)
Bill Karwin
I don't want to downvote an opinion, but I really disagree with the sentiment that somehow good programmers can make up for the lack of testing. Just think how much better they would be with testing.
tvanfosson
@Buzzer - I totally agree. But given the trade-off, I'd say it's probably more expensive to realize you've built the wrong thing vs. finding bugs in the correctly-targeted product.
David
TDD doesn't help you pickup on poor user experience or (in some cases) performance issues.
RobS
Why do you need to know what you are developing if it is not going to work? The difference in between a broken CD player and a broken DVD player is pretty moot.
soru
+6  A: 

If you mean "formal requirements", I can and easily do without those. I would much prefer a living, breathing customer who can tell me what they want over a rigid, out-of-date document. Having switched to TDD, I wouldn't ever want to go back to a "no test" environment. I choose informal requirements -- stories, on-site customer, and customer-written acceptance tests -- over formal requirements and no tests.

tvanfosson
+7  A: 

Turn this around and repeat after me: "Tests are requirements." :-)

Hristo Deshev
+1  A: 

I would say requirements because there always seems to be some level of "feature creep" from the client when you are developing software. Testing is one of the crucial pieces in the SDLC.

Michael Kniskern
Of course there is feature creep. The client doesn't know what they really want until you have actually written something that they can see. This is the reason to deliver early and deliver often -- help the customer figure out what they really want by delivering software they can start using.
tvanfosson
It's also the reason why a requirements document is pretty much useless if you care more about delivering what the customer wants than about keeping the customer from asking for things that weren't specified.
tvanfosson
+3  A: 

You have to test against the requirements, so if you don't have requirements you can't do testing. So if you have to pick one, you can only pick requirements.

But not doing testing is a path to failure. Guaranteed.

Stewart Johnson
Agreed. But I read the question as a formal requirements document since it obviously doesn't make sense to start writing code if you have no idea of what you want to program at all.
tvanfosson
+1  A: 

Requirements and testing are important for most projects but if you really have to pick, you should go with requirements. One of the advantages of picking requirements over testing is that, you might save some development time since the developers know what they have to build, and if the development is done with extra time in hand, you can allocate that time for testing :)

hmm
+1  A: 

tests (feature and integration) are more important than requirements; if you can specify the tests then you have also specified the requirements, at least implictly

comments are also the developer documentation, with unit tests being the how-to 'quickstart' examples ;-)

Steven A. Lowe
+1  A: 

Not sure if the requirements are referred to as an artefact or as a process. Although it is possible to skip requirements as artefact especially for smaller teams and still deliver a product, skipping requirements as process is out of question. Requirements as artefact let you model the system at cost lower than building the entire thing, do feasibility, estimates, and for a larger and more disperse team to cut communication overheads and have a common ground under the feet. Neglect the requirements and you get louse estimates (regardless if you plan a lot up front or just do a short sprint), poor idea of feasibility and possibly very inefficient communication and a lot of miscommunication.

Requirements as a process on the other hand is going to exist regardless if it is formally acknowledged or not. You cannot really exclude it, you can pretend requirements process does not exist or integrate into the design, coding, testing or into stages as late as pilot and maintenance. Obviously treating the process in this way mean it will not get fair amount of attention and resource. Consequences normally range from delivering something that is ultimately useless to having to fix the now obvious shortcomings of the product later in the development cycle or even discovering the real requirements once the product fails in the field, increasing the cost of development, defaulting on the deadlines, ruining team’s good name, destroying user confidence etc.

Testing usually boils down to validation and verification, more recently testing technology improvements let automated testing to be used as a solid tool for achieving greater efficiency in debugging and reducing time necessary for regression testing. Validation is making sure that the team has built the right product, i.e. scoped requirements are correct, not contradictory and there are no gaps. Verification on the other hand is making sure that the product is built right: no technical defects, accidental errors etc.

As we can see testing provides a safety net in the scenario where requirements were neglected. Normally as the team starts testing they need to refine their understanding of requirements and as a result modify the software. Since both requirement artefacts and software itself just represent different levels of fidelity in modelling a solution for a real life problem, and software as a model is order of magnitude more precise the testing of application evaluates requirements as well (regardless if they are implicit or explicit, formally analysed or informally communicated).

Normally the alternative to testing is to let users report a substantially larger amount of defects and shortcomings and try and fix them as part of maintenance (meaning later in product lifecycle), increasing the cost of every fix.

So requirements versus testing? Fire the manager. Ok, skip requirements if you want the project schedule slip during the testing phase and get yourself into the mess of building not what users need, skip the testing if you just need to show utter disrespect to your users.

Totophil
+2  A: 
MadKeithV
+1  A: 

Without requirements you don't need testing since what you end up with is exactly what was spec'd

meade
+! Wittilly put
LeonixSolutions
+2  A: 

If I were asked to choose between requirements or testing I would choose to polish up my resume. You really can’t do without either in any projects because the basic project lifecycle is:

  1. Define Needs/Goals (AKA Requirements)
  2. Design & Build to the requirements
  3. Verify that you built to spec (to requirements.)

If you dont have success criteria and goals that are verifiable (and then are verified) how can you insure that you are going to succeed? And if you dont have a chance to succeed, why start the project?

liquidray
+1 for polishing the resume
LeonixSolutions
A: 

There are categories of software that can be developed perfectly well without requirements, at least anything more than a vaguely expressed idea the length of an email.

Thing is, if you have a specific client, and a project manager, it is unlikely your software is in one of them. It's unlikely someone is specifically paying you to, say, 'make me a fun game involving a juggling monkey'.

The only category of software that can be developed without testing is failware: where your company has managed to sucker some customer into paying whether or not the software works (or if you have a really dumb customer, pay more if it doesn't work, in support and maintenance).

That's probably more likely: contracts structured so that success is less profitable than failure are still fairly common. If you think that's the case, and you want to develop working software, then consider switching to a job where your interests and your bosses are less opposed.

soru