is an object-oriented approach to ProgrammerTest
s pioneered in KentBeck
's 1994 TestingFramework
package for Smalltalk, later renamed SUnit (SmalltalkUnit
). Beck's approach and code have since been adopted and ported to numerous other environments and languages.
Have an object (TestCase
) manage the execution of a single test. Each test should be isolated from the others, so it creates all its data before executing and destroys it when it's done (setUp() and tearDown()). Composites of tests (TestSuite
) allow many tests to be run together. Passing a CollectingParameter
) to the tests as they run allows the collection of statistics. That's the framework - three objects (TestCase
There are simpler ways of running automated tests, and many, many more complicated ways, but this architecture seems to hit a sweet spot.
See also TestingFrameworks
- for MockObject
generation frameworks, http://en.wikipedia.org/wiki/XUnit
- http://www.xprogramming.com/testfram.htm Simple Smalltalk Testing: With Patterns KentBeck (reprint of the October 1994 *Smalltalk Report* article)
- Chapter 30 "Simple Smalltalk Testing", in Kent Beck's Guide to Better Smalltalk by KentBeck, Donald G. Firesmith (Editor), Cambridge University Press, December 1998, ISBN 9780521644372
Source code RegressionTesting libraries, by language:
(see also a similar list at http://xprogramming.com/software
Multi-Language Testing Frameworks:
For the DotNet platform (a grouping)
- TetWorks - (aka TET) Open Group multi-lingual test framework
* Tellurium - Automated Web Testing Framework - http://code.google.com/p/aost/
For the ZopeApplicationServer:
Works in all languages:
Automated Test Generation:
Model-Based Tesing (MBT):
"lint" Type "Smell Detectors":
How do I do test-then-code with C in embedded systems? Is there anywhere I can go where people are discussing this? I'm getting the idea that it's possible - even on simple PIC or AVR processors. Has anyone tried it?
You've cobbled up an equivalent under Bourne shells with functions. Contact me for details. One trick I found useful has been to put unit tests (for shell files to be sourced) after a "am I being sourced" guard, and run the unit tests if being executed. - JosephBeckenbaumer?
. -- KFrede
I need an EmailUnit?
... pop, smtp, imap, ... DavidEscala
As some of our test suites get large, we need to speed up our tests so we can run them quickly. ToplinkInMemory
allows us to stub out the database so that we can continue to run all tests before checking in! -- TedOgrady
One of the pieces of information that is demonstrably missing about xUnit lore is when
the first version of sUnit came into existence. It can't be any later than 1995, I'd expect, since that's when C3 happened, and thus, XP came into being. I'm pretty sure sUnit existed at least at that time. But, did it exist even before then? If so, when? -- SamuelFalvo?
I would appreciate it if folks (or that Shark thingie :) ) would stop removing my updates to CUT, a unit testing package that I
wrote. Thank you. :) -- SamuelFalvo?