Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search
 

Phillip McCleod

(1,837 posts)
5. well i love academic questions..
Wed Mar 27, 2013, 08:30 PM
Mar 2013

unit tests have been around for a while. see, http://en.wikipedia.org/wiki/Unit_testing for a detailed description. basically to answer your question, 'yes, sort of..'

the tests have to be programmed. for instance, say you have a 'submit' button that's supposed to pass some POST data. you write unit tests for each little bit of functionality that needs to be verified. so say you expect the string 'Hello World' in the POST data in the example. you would 'assert' that the POST data equals 'Hello World'. if it does the unit passes the test (returns 'true'). if not then FAIL.

obviously this example is simplistic. it makes it very handy if you have a complex chain of events where bugs can get lost, because you can run and re-run a set of tests and get a big red 'FAIL' in one part of the code, narrowing down debugging by a bazillion percent.

they do take time to write, but best practices says, 'yeah, and..?'

Recommendations

0 members have recommended this reply (displayed in chronological order):

Latest Discussions»Retired Forums»Website, DB, & Software Developers»Has anyone used 3rd party...»Reply #5