Tutorials and resources on how to apply unit testing in software testing
In my previous column PHP Unit Testing with PHPUnit,I showed how to set up PHPUnit and how to run a few simple tests. You should be able to test any function or method now that doesn’t rely on making calls out to other methods or functions – which is of course very few, as most applications are a complex combination of methods and, in PHP’s case, functions.
Pex is a Visual Studio 2010 Power Tools that help Unit Testing .NET applications. Pex 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. Microsoft Code Digger is a Visual Studio 2012 that analyzes possible execution paths through your .NET code. The result is a table where each row shows a unique behavior of your code. The table helps you understand the behavior of the code, and it may also uncover hidden bugs.
Venus.js in an open source software testing tool developed by LinkedIn that allows you to organize and run your entire JS testing system with a single tool using Node.js. Venus eliminates repetitive tasks and friction points and lets you focus on writing tests instead of running them.
When you need to perform unit testing in an independent way, you use mock objects. Mock objects are simulated objects that mimic the behavior of real objects in controlled ways. In this excerpt of their book “Pragmatic Unit Testing in C# with NUnit”, Andy Hunt, Dave Thomas and Matt Hargett explain how to avoid coupling when you build your C# unit tests.
PHPUnit is an open source unit testing software framework for software written in the PHP programming language. Created by Sebastian Bergmann, PHPUnit is one of the xUnit family of frameworks that originated with Kent Beck’s SUnit. This article will explore PHPUnit specifically as a way to introduce the basics of automated unit testing. You’ll need a basic grasp of the PHP programming language to proceed!
What is the difference between “Test First” software development and “Test Driven Development (TDD)”? In this blog post, Daniel Lindner provides his opinion about this topic and discusses his issues with Test Driven Development and how he thought he could train to apply it properly.
This chapter from the “Hitchhiker’s Guide to Python” provides recommendations on how to perform unit tests in Python and presents the unitest and doctest modules. It also lists the tools that are available to perform unit testing in Python.