During development, how much testing is the right amount for a website to do?
-
What are people's opinions of the amount of unit tests, functional tests, integration tests, or their opinions on test driven development?
-
Answer:
Unit testing isn't something you do because "it's the right thing", you do it because you save time. For any piece of code, think about the time you'll be spending writing it and modifying it over the next 6 months. In many cases, you'll clearly want to write unit tests (eg, writing data structures). One thing to keep in mind is that testing is usually easiest if you do it early on. If you try to bolt on testing later, you'll often need to refactor.
Ben Maurer at Quora Visit the source
Other answers
I think it depends on what kind of software you're writing and for whom. I've worked on projects where we did all of the above with CI and on projects that did absolutely no testing. I'll probably be crucified for saying this, but if you're building a consumer web product and doing multiple releases a day, often it's acceptable for users to help you find non-critical bugs and functional testing won't be as important. You might only write functional tests for your API, for example, which you can't afford to have break or the core functionality for your product. I like unit tests to verify "business logic." These are especially important if you aren't using constraints in your database (or your data store doesn't support them) for data integrity. In addition to this, one of the biggest benefits I get from writing unit tests is that it helps me design better interfaces for my objects. Writing regression tests tends to yield a big payoff as well, since the same pieces of functionality always seem prone to error. Like everything else, you'll have to weigh the tradeoffs. I'd err on the side of testing, especially if you have more than a couple developers on the product because you'll quickly realize large time savings fixing bugs. On the other hand, if you're a sole developer working on a small consumer web project and you want to move fast, you might be OK with incurring what amounts to technical debt.
Ben Weiner
A point rarely raised up but nevertheless important is: don't test blindly ! One thing we should do is to define the test strategy at the begining. Not all kind of software need the same amount of tests (depending on how critical they are) and not all parts of the software need the same attention. I know from experience that some parts of the software required good deal of attention and they are sometimes parts not anticipated by developers. For instance: installers ! Installers are the first contact of the users with the software, it should behave correctly any time under every conditions ! On the other hand some web pages deep inside the navigation tree will not require spending too much time on testing. It may crash under unexpected condition but it would be unreasonable to spend too much effort here. In short: build up a strategy and adapt your testing effort to the context !
Christophe Addinquy
Related Q & A:
- How to add links on the fly in a website?Best solution by Yahoo! Answers
- How much do you charge for advertising on a website?Best solution by Yahoo! Answers
- How much should I charge for ads on my website??Best solution by Yahoo! Answers
- How much does it cost to start up a high quality website like Myspace and Facebook?Best solution by Yahoo! Answers
- How much do you get paid for making a website?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.