testdriven.com Wrangling quality out of chaos

Posts Tagged ‘How-to’

Testing Dynamic Elements – Having a Plan B

10.25.2009 · Posted in Links

Duncan Thomas Blogs about how to handle Dynamic Elements with LiquidTest, “In this blog post I will explain a small but important feature with an example. This feature is a small check box you see at the bottom of your browser when recording a test with LiquidTest, called Dynamic Element.”

Responsibility Driven Design with Mock Objects

09.07.2009 · Posted in Links

Responsibility driven design is an approach that helps you shift focus from object state to interactions and responsibilities. This article shows how test driven development with mock objects facilitates responsibility driven design and drives you towards a more cohesive, loosely coupled design. Examples in Java.

Behavior Driven Database Development

01.12.2009 · Posted in Links

This article shows how the behavior driven development can be applied to database development and how it can be used to develop and design databases in an iterative and incremental way, writing code and test in the same time.

A New xUnit Test Pattern

10.11.2008 · Posted in Links

This article describes a xUnit pattern called ‘Own Library Interface’, which enables TDD for classes which seem not testable before. Especially TDD beginners can benefit from this pattern.

Acceptance TDD Explained

08.19.2008 · Posted in Links

Acceptance test-driven development is what helps developers build high-quality software that fulfills the business’s needs as reliably as TDD helps ensure the software’s technical quality.

BugHuntress QA Lab. Mobile usability testing: problems and solutions

03.29.2008 · Posted in Links

High-quality usability of mobile applications can be a winning competitive advantage in the today’s software market.

Nonetheless, BugHuntress QA Lab experience in independent software testing showed that high-quality user interfaces occurred in about 70% of desktop applications, while a similar number for mobile applications is about 40%.

This article covers the following topics:
– What usability is in brief;
– Basic standards of the user interface;
– Mobile standards;
– Mobile interface peculiarity: left-handed mode; speed vs. satisfaction; landscape mode;
– General problems of mobile usability;
– Successful solutions;
– Automation of usability testing;
– Independent usability testing services.

Measuring Integrated Progress on Agile Software Development Projects

10.30.2007 · Posted in Links

Earned Value Management (EVM) is a well known project management technique which measures the integration of technical performance, cost and schedule against planned performance within a given project. The result is a simple set of metrics providing early warnings of performance issues, allowing for timely and appropriate adjustments. In addition, EVM improves the definition of project scope, and provides valuable metrics for communicating progress to stakeholders. The information generated helps to keep the project team focused on making progress. AgileEVM is a light-weight, and easy to use adaptation of the traditional EVM techniques which provides the benefits of traditional EVM in Agile projects.

Test Driven Development with Visual Studio for Database Professionals

10.24.2007 · Posted in Links

For many years now, developers have had the upper hand when it comes to Test-Driven Development. No matter the language, there was a handy toolset to use – NUnit, JUnit, and xUnits for Perl, Python, Ruby, Delphi, and many others. But when it came time to implement the logic in the database, the options were few. Many people turned to developing their own unit testing solution – if they did unit tests at all.

Author: Cory Foy
Published: InfoQ, October 18, 2007

Unit testing the data access layer

10.23.2007 · Posted in Links

Unit testing can be difficult sometimes. In some cases, you need to refactor your code-under-test to make it more testable; in other cases, you need to apply some special techniques into your test code so that it can do what you want; and in the worst cases, you can’t think of any such techniques nor are able to refactor the production code and thus, don’t write any test at all. It’s in my experience working with many teams applying unit testing that they often have troubles writing tests for the data access layer (DAL), the UI layer, and multi-threading code, mostly because they are not aware of the techniques for doing that. That is not surprisingly difficult to understand though, business logic is much more intuitive and straight-forward to be tested and every single article or book out there will have examples writing test for the business logic firstly.

Author: Buu Nguyen
Published: September 30, 2007

A Tale of Two Epiphanies: TDD and Mocking

10.23.2007 · Posted in Links

I’ve been a big believer in unit testing for years now, but was never serious about test-driven development (TDD) until a few months ago. It sounded like an interesting idea, but I didn’t understand why TDD practitioner were so zealous about writing the tests first. Why did it matter? I thought it was to ensure that some project manager doesn’t try to shave some time off the project by cutting the unit tests. Then I started doing some reading about TDD, poking around, asking questions, and trying it out myself. I discovered the real reason for writing tests first is that TDD isn’t about testing code, it’s about designing code.

Author: James Kovacs
Blogged: September 9, 2006

Test Driven Thread Safety

09.20.2007 · Posted in Links

How do you write a test that fails because of lacking thread safety? Well, in this case I could start up some threads, make sure that they used the collection methods simultaneously and then assert that only one thread was allowed to do so at a time.

That turned out to be more easy to think than to code.

Introduces the two problems and their solution.

Author: The Vertical Slice
Published: September 14, 2007

Using testing frameworks with Groovy

09.19.2007 · Posted in Links

Groovy is great for Agile development in general and testing in particular because:

* it has built-in support for the JUnit testing framework
* it has built-in mocking capabilities
* it provides a very expressive language in which to write tests which can utilise Closure syntax and Groovy’s other features which support the creation of testing domain specific languages (DSLs)
* it can easily leverage Java testing frameworks and IDE support
* its built-in AntBuilder support makes it easy to set up integration tests

This page explores testing features of Groovy and some other testing frameworks that you may sometimes wish to use to complement Groovy’s built-in capabilities.

An Agile Tool Selection Strategy for Web Testing Tools

07.27.2007 · Posted in Links

Selecting a test automation tool has always been a daunting task. Let’s face it, just the thought of automating tests can be daunting! To avoid that deer-in-the-headlights feeling, consider taking an ‘agile’ approach to selecting web testing tools. Plan an automation strategy before you consider the possible tool solutions. Start simple, and make changes based on your evolving situation. Here are some ideas based on experiences with different agile (and not so agile!) development teams. Even if your team doesn’t use agile development practices, you’ll get some useful tips.

What’s Wrong With Agile Methods

07.27.2007 · Posted in Links

Current agile methods could benefit from using a more quantified approach across the entire implementation process (that is, throughout development, production and delivery). The main benefits of adopting such an approach include improved communication of the requirements and, better support for feedback and progress tracking.

This article first discusses the benefits of quantification, then outlines a proposed approach (Planguage) and, finally describes an example of its successful use.

Mocking the Embedded World: Test-Driven Development, Continuous Integration, and Design Patterns

07.27.2007 · Posted in Links

Despite a prevalent industry perception to the contrary, the agile practices of Test-Driven Development and Continuous Integration can be successfully applied to embedded software. We present here a holistic set of practices, platform independent tools, and a new design pattern (Model Conductor Hardware – MCH) that together produce: good design from tests programmed first, logic decoupled from hardware, and systems testable under automation. Ultimately, this approach yields an order of magnitude or more reduction in software flaws, predictable progress, and measurable velocity for data-driven project management. We use the approach discussed herein for real-world production systems and have included a full C-based sample project to illustrate it.

Mock Object Testing With EasyMock 2

04.26.2007 · Posted in Links

As well as being an introduction to Mock Object testing using EasyMock, this article goes into detail on some of the framework’s features. Features a downloadable project containing the examples used in the article.

TDD with Selenium and Castle

03.14.2007 · Posted in Links

Test Driven Development samples are mostly based on very simple unit tests. The challenge is often how to use TDD in a larger application. It will be demonstrated in this tutorial how to build a web application using test first principles using Selenium and Castle.

Author: Dan Bunea
Published: InfoQ, February 20, 2007

Continuous Integration with PHP

03.14.2007 · Posted in Links

Large development projects can be difficult to manage. With multiple developers committing source code to one source tree, there are going to be times when code breaks and will not work. Running automated builds and tests on code can drastically reduce the time and effort developers spend fixing issues by catching them early. This process is called continuous integration. This article provides an overview of how to implement continuous integration in a PHP project using tools written in PHP.

Author: Chad Files
Published: Linux.com, March 12, 2007

Java Reference Guide: Continuous Integration

01.24.2007 · Posted in Links

I’ve recently had a lot of discussions about the notion of Test-Driven Development and Continuous Integration and how they can be used together to achieve superior code quality and performance. We have discussed a key facet of Test-Driven Development in the Enterprise Java Testing section of the Java Reference Guide, namely defining unit test cases with JUnit, but I thought this was a good opportunity to discuss how it can be integrated into a Continuous Integration framework to perform these tests on each developer commit.

Author: Steven Haines
Last updated: informit.com, January 12, 2007

Continuous Integration Using Team Foundation Build

01.18.2007 · Posted in Links

Organizations always need a repeatable and reliable method to create a regularly available public build. In my previous organizations, I used in-house tools.—I even used a continuous integration build type. I just did not know at that time that it had a name!

What is continuous integration? Continuous integration is the process of generating a build whenever a programmer checks code into the source control server. When you use this process, it is a good idea to have a dedicated build server where you can synchronize and compile the sources, and run unit tests.

Software development life cycle processes evolved over time. Development teams realized the importance of having periodic builds. It started with a weekly build. Then it grew tighter when "nightlies" began, and tighter still with "hourlies." As the benefits of frequent builds became more obvious, organizations wanted more builds. And now we have continuous integration. But nightlies still exist. Many organizations still count on them to get a formal, reliable build.

Authors: Khushboo Sharan, Kishore M. N.
Published: MSDN, January 2006