Tutorials and resources on how to apply unit testing in software testing

Fakes: Isolating Unit Tests

September 12, 2012 0

Replace any .NET method with your own delegate! “Fakes” is a new framework in Visual Studio 11 for test stubs and detours in .NET. Fakes may be used to detour any .NET method, even in tough situations like static methods, non-virtual methods, private methods, constructors, etc… If you’ve been a user of Moles, Fakes is a lot like Moles but different so come and learn about the changes coming ahead too.

JavaScript Unit Testing with QUnit and JS Test Driver in Eclipse

September 12, 2012 0

Bradley Braithwaite shares in his blog a step by step process to perform JavaScript unit testing in the Eclipse IDE with QUnit and JS Test Driver. QUnit is a powerful, easy-to-use, JavaScript test suite. It’s used by the jQuery project to test its code and plugins but is capable of testing any generic JavaScript. The goal of Js Test Driver is to build a JavaScript test runner that easily integrates with continuous builds systems and allows running tests on multiple browsers quickly to ease TDD style development. Starting from the opening of the Eclipse IDE to writing the tests, everything is explained with code examples. Bradley adds also at the end some productivity improvement tips like code template or avoiding the browser. He also recommends using a tool like JSLint or JSHint to manage code quality. JSLitmus is recommended to profile JavaScript code for performance tuning.

Using Visual Studio 2012 to Test Windows 8 Applications

August 30, 2012 0

In this blog post, Rui Sun and Andre Hamilton explore some Visual Studio 2012 capabilities that will make it easier to test and verify Windows 8 applications. Visual Studio 2012 has a simulator that reduces your need to have physical devices of every form factor at your disposal for testing. You can launch your application in the simulator directly from within the Visual Studio through the debugging action. Then you can interact with your application using the mouse or using simulated touch on your development computer with gestures like swipe, pinch to zoom and rotation. Visual Studio also provides a unit test library project for Windows 8 applications written in C#, VB.net or C++.

Automated Test-Driven Development with PHP

August 27, 2012 0

There are solutions which provide the ability to automatically run your tests as you code. This tutorial shows how to use a Ruby gem, called watchr to monitor your code and automatically run the appropriate tests whenever you save your work. This is how you can automated Test-Driven Development (TDD) on your PHP code. The watchr gem is an executable program written in Ruby, and it wraps around features found in an operating system’s file system to provide the ability to watch for changes made to a specific file or folder. The tutorial provides a step by step approach on how to use it and integrate it in your PHP coding activities.

New Visual Studio 2012 Unit Testing Experience

August 22, 2012 0

The new Visual Studio 2012 tries to improve the developer unit testing experience, particularly for agile teams. The entire unit testing framework has been made extensible, which will allow you to use testing frameworks such as xUnit.net and NUnit in addition to the unit testing framework built into Visual Studio. This talk presents the history of unit testing in Visual Studio and then takes you through the product, showing off the new unit testing features.

Unit Testing MySQL with utMySQL

August 20, 2012 0

This blog post explains how to perform unit testing of MySQL stored procedures. A stored routine is a set of SQL statements that can be stored in the server. Once this has been done, clients don’t need to keep reissuing the individual statements but can refer to the stored routine instead. To perform unit testing on stored procedures, you can use utMySQL, an open source unit test framework for MySQL stored procedures. This post provides a step by step process on how to create the test code in utMySQL which is also a stored procedure, run it and verify the results.

Spring MVC Views Unit Testing

August 15, 2012 0

This blog post by Stuart Gunter shares some best practices to perform unit testing on Spring MVC views. The concept follows a BDD style to write unit tests that leverages the MVC pattern in much the same way as the real application, but exploits the power of standard unit testing practices like mocking, assertions and verification. This is achieved with the open source software testing tool TestNG and using the infrastructure provided by Spring through its integration testing features in order to execute the unit test. The post shows the code, also available on GitHub, used to do this. It also explains the design decisions that supports this approach.

1 14 15 16 17 18 27