News for hackers. Stuff that matters.

Ask HN: How do you test your app?

Hey guys, how much time you all spend in writing unit test cases?<p>In early stage startups, since application design under goes changes with each iteration, unit test cases needs changes. And it gets harder to keep unit test cases consistent with the code with iterations. Suggestions?<p>Do you think is it OK to burn few initial customers? (if some use cases have not been tested, few customers will face problems)<p>Thoughts?
( 5 comments | 13 points | on HN )
Re:Ask HN: How do you test your app? by 3wetwetw on Wednesday February 08, 2012 @02:07AM (#3565543)
Typemock is discussing that in today's webinar (10:00 AM ET and 15:00 in the UK) about tools and practices to help with unit testing - http://bitly.com/z3uPOi

The best thing is to make sure you're using tools that are flexible and scalable. Also, decide what to test. You don't test basic logic like 1+1=2.

Unit tests are intended to catch a specific type of bugs but not all errors. It's not usability testing. If you're not doing TDD (ideally) at least you can test legacy code and strive for high code coverage

Re:Ask HN: How do you test your app? by crcastle on Monday February 06, 2012 @03:28AM (#3556674)
I test my app with people.

Scripting out unit tests, integration tests, feature tests, regression tests is good, but there's always going to be stuff you miss. I'm not saying you have to hire a full-time tester, but get your friends, family, or other people good at breaking stuff to test your app. You'll be amazed how some people will use (i.e. break) your app in a way you never considered.

Re:Ask HN: How do you test your app? by rsanchez1 on Monday February 06, 2012 @03:38AM (#3556686)
Agree with this. Unit tests and other tests will catch errors in your code, but testing with people will show how your app really handles your audience. I try to use my apps as much as I can, and ask friends, family, fellow developers, etc. to test as well.
Re:Ask HN: How do you test your app? by shubber on Monday February 06, 2012 @03:28PM (#3559043)
We've recently started do a lot more acceptance testing in browser, writing unit/integration tests in response to bugs. The acceptance tests are slower, for sure, but the do cut "deploy and wait for bug reports" out of the dev cycle a lot more often.
Re:Ask HN: How do you test your app? by tomstuart on Monday February 06, 2012 @02:55AM (#3556619)
You might find this Bob Martin post interesting: http://blog.8thlight.com/uncle-bob/2012/01/11/Flipping-the-B...