Testing Framework

TestingFramework is an object-oriented approach to ProgrammerTests 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 (TestCollector/TestResult) to the tests as they run allows the collection of statistics. That's the framework - three objects (TestCase, TestSuite, TestResult).

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, FrameworkForIntegratedTest, CategoryMockObjects - for MockObject generation frameworks, http://en.wikipedia.org/wiki/XUnit

Originated in

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) For HTTP:
        * Tellurium - Automated Web Testing Framework - http://code.google.com/p/aost/

For the ZopeApplicationServer: Works in all languages: Data Driven: Automated Test Generation: Model-Based Tesing (MBT): "lint" Type "Smell Detectors": PerformanceTests:

See also:

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?

see ExtremeProgrammingBareMachine.

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

See http://sourceforge.net/projects/smtpunit/ -- MarkusSrank

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?

CategoryTesting, CategoryFramework

View edit of October 13, 2014 or FindPage with title or text search