eEcho blog

A journey of a thousand miles starts with a single step.

Archive for the ‘Testing’ Category

IEEE Software Test Documentation, a summary

IEEE standard 829-1998 covers test plans in section 4, test designs in section 5, test cases in section 6, test logs in section 9, test incident reports in section 10, test summary reports in section 11, and other matherial that I have decided not to summarise in the other sections.
Beware. This is only a summary. […]

Testing: A Sample Test Plan

http://it.toolbox.com/blogs/enterprise-solutions/testing-a-sample-test-plan-3283
Craig Borysowich (Chief Technology Tactician) posted 2/24/2005 |
If you decide to use the 10 step process for developing a test plan, I have provided a fairly comprehensive description of the tasks and events involved. But, I thought that having an example of a test plan created using the process may clarify some questions […]

Testing Overview

Purpose of Testing
Testing accomplishes a variety of things, but most importantly it measures the quality of the software you are developing. This view presupposes there are defects in your software waiting to be discovered and this view is rarely disproved or even disputed.
Several factors contribute to the importance of making testing a high priority of […]

Static Code Analizers for Python

www.doughellmann.com/articles/CompletelyDifferent-2008-03-linters/
Old-school developers remember lint, the static code analysis tool for C programs. There are several similar programs available for Python, and they can all help you clean up your act.
This month we continue examining Python development tools you have told me you can’t live without. A fair number of you have mentioned that you use […]

JUnit Automated Testing links

One of the core features of GWT is testability, which means we can easily test our applications using a set of tried-and-true testing tools. Testability for GWT applications breaks down into the three following types of testing components:
* Standard JUnit TestCases
* GWTTestCases (subclasses of the JUnit TestCase)
[…]

Testing Methodologies Using Google Web Toolkit

Sumit Chandel, Google Developer Relations
March 2009
This article is a direct adaptation of Daniel Wellman’s excellent article, “Google Web Toolkit: Writing Ajax Applications Test-First”, published in Better Software magazine (November 2008).
One of the core features of GWT is testability, which means we can easily test our applications using a set of tried-and-true testing tools. Testability for […]

Test-Driven Development in Python

http://www.oreillynet.com/pub/a/python/2004/12/02/tdd_pyunit.html
by Jason Diamond
12/02/2004
* Introduction
* Python’s unittest Module
* Motivation
* Sample Input
* Getting Started
* Baby Steps
* Refactoring
* Conclusion
Introduction
Test-driven development is not about testing. Test-driven development […]

Creational Patterns

A creational pattern provides a particular instantiation mechanism. It can be a
particular object factory or even a class factory.
This is an important pattern in compiled languages such as C, since it is harder to
generate types on-demand at run time.
But this feature is built-in in Python, for instance the type built-in, which lets you
define a new […]

Darach’s Challenge

Darach Ennis has thrown down a gauntlet for extending the reach of TDD. He says:
There are a lot of fallacies blowing around various engineering organizations and amongst various engineers that this book could help to dispel and some of these are:
* […]

How does TDD relate to the practices of Extreme Programming?

Some reviewers of this book were concerned that by my writing a book exclusively about TDD, folks will take it as an excuse to ignore the rest of the advice in Extreme Programming (XP). For example, if you test drive, do you still need to pair? Here is a brief summary of how the rest […]

Who is TDD intended for?

Every programming practice encodes a value system, explicitly or implicitly. TDD is no different. If you’re happy slamming some code together that more or less works and you’re happy never looking at the result again, TDD is not for you. TDD rests on a charmingly naïve geekoid assumption that if you write better code, you’ll […]

When should you delete tests?

More tests are better, but if two tests are redundant with respect to each other, should you keep them both around? That depends on two criteria.
* The first criterion for your tests is confidence. Never delete a test if it reduces your confidence in the behavior […]

How do you know if you have good tests?

The tests are a canary in a coal mine revealing by their distress the presence of evil design vapors. Here are some attributes of tests that suggest a design in trouble.
* Long setup code— If you have to spend a hundred lines creating the objects for […]

What don’t you have to test?

The simple answer, supplied by Phlip is, “Write tests until fear is transformed into boredom.” This is a feedback loop, however, and it requires that you find the answer yourself. Because you came to this book for answers, not questions (in which case you’re already reading the wrong section, but enough of the self-referential literary […]

One to Many

How do you implement an operation that works with collections of objects? Implement it without the collections first, then make it work with collections.
For example, suppose we are writing a function to sum an array of numbers. We can start with one:
public void testSum() {
   assertEquals(5, sum(5));
}
private int sum(int value) {
return value;
}
(I am […]

Obvious Implementation

How do you implement simple operations? Just implement them.
Fake It and Triangulation are teensy-weensy tiny steps. Sometimes you are sure you know how to implement an operation. Go ahead. For example, would I really use Fake It to implement something as simple as plus()? Not usually. I would just type in the Obvious Implementation. If […]

Triangulate

How do you most conservatively drive abstraction with tests? Abstract only when you have two or more examples.
Here’s such a situation. Suppose we want to write a function that will return the sum of two integers. We write:

public void testSum() {
   assertEquals(4, plus(3, 1));
}
private int plus(int augend, int addend) {
   return 4;
}
If we are triangulating to the […]

Fake It (’Til You Make It)

What is your first implementation once you have a broken test? Return a constant. Once you have the test running, gradually transform the constant into an expression using variables.
A simple example occurred in our implementation of xUnit:
return “1 run, 0 failed”
became:
return "%d run, 0 failed" % self.runCount

became:
return "%d run, %d failed" % (self.runCount , self […]

Broken Test

How do you leave a programming session when you’re programming alone? Leave the last test broken.
Richard Gabriel taught me the trick of finishing a writing session in midsentence. When you sit back down, you look at the half-sentence and you have to figure out what you were thinking when you wrote it. Once you have […]

Crash Test Dummy

How do you test error code that is unlikely to be invoked? Invoke it anyway with a special object that throws an exception instead of doing real work.
Code that isn’t tested doesn’t work. This seems to be the safe assumption. What do you do with all those odd error conditions, then? Do you have to […]