Software Testing Blogs: Load Testing, Unit Testing, Functional Testing
In this blog post, Nicolas Frankel explains how to perform unit testing on a database using DBUnit, Spring and TestNG. DbUnit is a JUnit extension for database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent tool to avoid the issues that can occur when one test case corrupts the database and causes subsequent tests to fail. DbUnit has also the ability to export and import your database data to and from XML datasets.
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.
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++.
Adobe Shadow is a new tool currently developed by Adobe that provides developers a way to inspect and debug from their desktops wirelessly and synchronously across multiple devices. The Adobe Shadow desktop application listens for changes in a URL location in the browser. When a change occurs, it pushes the new URL out to all wirelessly connected devices immediately so the changed content is seen on the devices immediately. In this blog post, Holly Schinsky provides step-by-step instructions on how to use Adobe Shadow to inspect and debug your mobile code.
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.
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.
This is a series of three posts by Nick Olson about the topic of unit testing your code your when you are writing a javascript client application with a .NET backend. The first post is an introduction that defines the context and presents the tools that will be used. The second post provides the code to test the javascript using KnockoutJS and Qunit. The third post explains how see the javascript unit tests results when you are inside Visual Studio. This is achieved using a browser automation tool walled Watin and a data-driven unit test in C#.