Integration Watch: Testing via models



Email    print   
April 15, 2010 —  (Page 1 of 3)
For the past several months, I’ve been discussing alternatives to unit tests for both designing and validating software. In a pair of columns in particular, I discussed using functional test tools for designing the code implementation.

One commenter on those columns inquired, “Why functional tests?” This is a valid question. Unit tests are simply too low-level. They test too little. And many small tests taken together tell you only that the individual grains of code work correctly. They say nothing about whether the functionality works in the large, nor whether it’s anything the customer asked for.

Functional tests should reflect a function specified in the requirements or in some kind of feature repository (these days, defect trackers fill this function all too often). Using functional tests correctly orients the design and code to the goal, namely delivering what the user wants.

Higher-level tests, such as user acceptance tests, are too coarse for my taste. One feature that a user might demand could have multiple parts consisting of dramatically different actions. For example, suppose a user acceptance test is at sub-second response time. This will surely require numerous optimizations. A single UAT of the response time will tell me whether I’ve succeeded overall, but is no use in designing and validating the individual changes I’ve made.

This view is not universally accepted. Ken Pugh, who gave one of the keynotes at the recent Enterprise Software Development Conference in California (produced by SD Times publisher BZ Media), told me in the after-party that when he sits down to write code, he always starts with a UAT as the defining goal for what he’ll work on. I trust Ken when he says this, but I don’t see how I could apply this. Much of my development work is simply not a broad-brush endeavor. It frequently includes small maintenance efforts, or optimization, and so on. These tasks rarely can be encapsulated in a UAT.

But the user orientation that Pugh finds in his approach, and that I echo in functional tests, is a key differentiator from the mainstream TDD orientation. There are approaches to testing that take the core concept of serving the user even further. Principal among these is model-based testing (MBT). I realize I tread dangerous ground here; the idea of using models is as appetizing to most readers as a tablespoon of brewer’s yeast or cod liver oil. And yet, there is much to recommend it.



Related Search Term(s): testing

Pages 1 2 3 


Share this link: http://sdt.bz/34264
 
Most Read Latest News Blog Resources


Comments


04/16/2010 09:46:39 AM EST

Great article. Thanks for the information. Another tool that I've looked into is http://testoptimal.com/. An integrated approach to testing web applications using model based testing.

United StatesRob


04/19/2010 11:15:56 AM EST

As you suggest, we agree in principle, but probably not precisely in terminology. There are acceptance tests that are specified the user and there are acceptance tests specified by developers. For the response time example you mentioned, the acceptance test specified by the user might be the response time from a button press to a result display. The overall programmer designer could subdivide this test into developer acceptance tests for the network time and for the server time. As you suggest, the server time test helps validate whether the system is responding within the time, but the test does not help in figuring out how to make the server deliver quickly. The tests below this point are definitely functional tests. The gray area is whether the server time test should be called a functional test or an acceptance test.

United StatesKen Pugh


04/25/2010 09:58:27 PM EST

As Rob pointed out, another MBT tool is TestOptimal. It's a simple yet effective MBT tool for testing web applications. Check out this 4-part tutorial by Ray Vizzone of Recommended Testing Labs: "Model-Based Testing for Web Applications with TestOptimal", http://blog.testlabs.com/2009/10/model-based-testing-for-web.html.

United StatesYaxiong


Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
Not so fast when it comes to testing in the cloud
Developers face outsourcing, virtual lab management and mobile devices as obstacles Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

Bloomberg opens its API
Bloomberg's APIs could lead to a future standard for accessing market data.
02/01/2012 04:41 PM EST

The case for piracy
In the aftermath of SOPA and PIPA, some copyright holders have begun to embrace piracy as inevitable...and even beneficial.
01/30/2012 02:39 PM EST

Tablet sales boom, but applications lag
The installed base of tablet computers and e-book readers is growing rapidly, but no killer app has yet emerged -- hint, hint.
01/28/2012 05:48 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb