Gunnar Kudrjavets

Paranoia is a virtue

Having majority of the tests implemented before feature is added to the code base

One of the things we’re currently trying to do is to align development and test processes and schedules more closely. The fuzzy description of initial problem statement is the following: “Whenever the implementation of some feature is added to the code base then at the same time majority of tests for this feature must be also implemented and some specific criteria about the quality of the feature must be met.”

However unclear this requirement may be it immediately raises a number of questions and implications for the entire software development process. Let’s look at some of them:

  1. Testability. For now let’s use the simplistic model where we define a software product as just a set of features. To meet this requirement above we need to focus more than ever on testability of every individual feature. The features need to be designed so that there’ll be way of testing them in isolation. It definitely won’t be possible in every single case, but the alternative with lots of interdependencies is very frightening. No more you can check in the interface IFoo and say that you can use it, but it won’t possible to properly test it before IBar is implemented two weeks from now. Of course mock objects will help us tremendously.
  2. Psychological impact. The well-known software development models like the waterfall model and spiral model have very clear distinction between development and testing. Now the development and testing will become a gray area where it’s very hard to formally determine when some feature is actually done. As everything unknown and new is usually frightening for people then there’ll be probably lots of problems with skepticism targeting this approach.
  3. Collective responsibility. No more it’s “Feature F is coded, so development is done and ball is now in test organization's court, go and test it.” The completeness of feature set becomes a responsibility of the entire team and developments vs. test attitude should be fading.
  4. Exact metrics. How do we explicitly specify that desired amount of testing is done? Is it number of test cases (extremely bad measurement)? Is it specific percentage of code coverage (I don’t like this one also)? Is it some percentage of use cases automated? Is it all priority 1 and priority 2 test cases automated (how much priorities should we have?)? Is it some collective gut feeling which tells that feature is tested and it is "good enough"?
  5. Impact on morale. If getting both product and test code implemented is a collective responsibility then Alice and Bob as developers may think that automating these API test cases isn’t what they signed up for and collective mutiny against this approach may take place ;-)
  6. Office moves. Very frequent interaction between development and test team will be required to accomplish the end goal properly. Should we start planning for office moves and try to make sure that people working on the same feature set have their offices located nearby. Please, no communal workspace ;-)
  7. Impact on the entire testing process. Are the test plans even necessary anymore or should the test code be the only documentation? What about manual test cases? Should we try to automate everything which is possible no matter what the cost is?

This list can go on with number of additional questions but it’s wise to stop here because I don’t have currently answers, just questions. Now I need to go and talk with some smart people and figure out how to solve these problems or get the confirmation to the fact that I'm just overreacting ;-)

Now playing: Depeche Mode, "Behind the Wheel [Remix]".

Comments

bysza said:

Good post :)
Ad. 1. High cohesion, loose coupling - this is a way to go. You're right: testability of requirements is essential, but not always possible.
Ad. 2. For sure. Eduction comes into play. ;)
Ad. 3. I think that collaborative approach is the best one. It's good to have great developers that test their code, but in bigger systems there has to be someone testing features from a higher perspective, where developers can't reach, since they develop only a part of the solution. Therefore fading of test team is not a good approach.
Ad. 4. I'd say that percentage of high impact use cases tested is a good metric of overall module quality.
We should be focused on critical functionality and 100% cover these use cases. We minimize the risk of big system failure and it helps us to better allocate our resources.
Ad. 5. Eduction comes again into play. ;)
Ad. 6. We say big NO to open space! ;)
Ad. 7. Your last question was a rhethorical one, right? ;)
Test code as only documentation is a bad thing to do.
People communicate in natural language and describe things in this way. Introduction of formal notations for user requirements complicates things.
Eg. UML diagrams are very good as documentation of technical system architecture, but not for requirements. ;)
I'd be hard for a new team member to smoothly acquire knowledge about the system from tests only.
Furthermore, analysts don't write user requirements as tests, so we'd have a clash here. ;)
# September 27, 2004 9:51 AM

TrackBack said:

# September 29, 2004 6:14 AM

Reeves said:

Good Day. The excellence of a gift lies in its appropriateness rather than in its value. Help me! Can not find sites on the: Martex baby bedding. I found only this - <a href="baby-bedding.net/.../">lady bug baby bedding</a>. Bedding, listen mainly that the meyer et al. Some legal parents still are the innocent regions set into the system which know as states to each league, bedding. Thanks for the help :o, Reeves from Luxembourg.

# March 28, 2010 9:13 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)