Tutorials and resources on how to apply unit testing in software testing
Why so few organizations maintain unit tests for their in-house applications? This article discusses the two assertions that unit testing saves money by discovering bugs earlier and that it reduces the number of bug in the application. Despites the provocative title, the article provides some evidence that unit testing can play a critical role to help delivering applications. Its goal is to challenge the premise that writing unit tests is always a wise practice in all contexts. The conclusion is that you can not rely on a general acceptance of the myth that unit testing is a universal panacea, but you need to focus unit testing on aspects of development where it is most effective and be prepared to actively justify its use.
eXtreme programming is an Agile software development methodologies. It involves extremely short incremental release cycles, early and frequent testing, heavy use of design refactoring, and pair programming. This article proposes a process model called “ordered incremental testing” where guidance on test order is provided. Testing is conducted iteratively with very short iteration cycles as a single class is developed. Although early and frequent testing is very important, there is little guidance about specifics of the testing process.
This video presents the basics for getting OCUnit/SenTest set up on new and existing projects, including running those tests from the command line. For the fans of Rspec style specs, it presents briefly Kiwi, which wraps the built in testing framework with a block-based syntax.
Js-test-driver is an open source JavaScript unit tests runner written in Java. The project was started at Google and is under active development. This article provides a step by step process on how to JSTestDriver to write tests for Javascript. This article starts with an overview of the tool architecture before explaining its configuration, how to run js-test-driver from the command line and how to run it from Eclipse. The main part shows how to write tests and presents the most important features of js-test-drivers. Debugging of tests in Firefox and Chrome is also discussed.
The Unit Testing and Mocking Tools Directory presents a list of unit testing and mocking tools, both open source and commercial, for the main programming languages (Java, .NET, ruby, etc). It contains also a list of resources associated to this topic. Visit http://www.unittestingtools.com/
This tutorial explores the principles of parameterized unit testing with Microsoft Pex 2010. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications that automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of your methods, which you can save as a small test suite with high code coverage.
In the context of Java unit testing, a sleeping snail is a test that’s sluggish and takes (relatively speaking) forever to run because it relies on Thread#sleep and arbitrarily long waits to allow threads to execute before performing assertions or continuing with the workflow under test. In this article, based on chapter 5 of Unit Testing in Java, author Lasse Koskela explains this code smell and the appropriate deodorant with an example