April 15, 2007

Model-Based Test Engine Benefits

Posted by Ben Simo

A Model-Based Test Engine (MBTE) is a test automation framework that generates and executes tests based on a behavioral model. Instead of performing scripted test cases, a MBTE generates tests from the model during execution. Instead of implementing models in code, a MBTE can process models defined in tables. Both human testers and computers can understand models defined in tables. A MBTE can be built on top of most existing GUI test automation tools. Combining good automation framework practices with Model-Based Testing (MBT) can transform some common test automation pitfalls to benefits.

Implementing a MBTE can produce the following:

  1. Simplified automation creation and maintenance.
  2. Simplified test result analysis.
  3. Automatic handling of application changes and bugs.
  4. Generate and execute new tests – and find new bugs.

More to come...

  Edit

2 Comments:

May 08, 2007  
Shrini Kulkarni wrote:

Ben,

I have a quick question ...

Can a webservice be modelled as a "model" I mean Finite state machine ?

You must have heard James saying "testers use models all the time - most of them are not formal models - ones that can not be expressed in terms of mathematical expresssions such as graphs"

I agree with James' contention and think that Model based testing (A big misnomer in itself) should be called something ike "Mathematical Model based" testing.

I am still carving for more examples to show how narrow is the concept of "MBT" as it is being "sold" in the industry and where MBT is NOT applicable..

shrini

May 09, 2007  
Ben Simo wrote:

Can a webservice be modelled as a "model" I mean Finite state machine ?

Perhaps. It depends on whether or not there is something in the behavior of that service that can be modeled in quantifiable terms.

In addition to pass/fail criteria, think of more heuristic-type things that automation (model-based or not) can do for you.

Harry Robinson gives the example of testing the driving directions for Google maps. There is no automated way to confirm whether or not the directions are correct. The only true way to test the directions is to have people in cars try to drive them. However, Harry uses automation to get directions, reverse the directions, and then compare the results of the two. Any results with a difference more than a specified threshold are reported as "suspicious" for review by manual testers. This automation does not report "pass" or "fail", but helps direct the attention of manual testers.

You must have heard James saying "testers use models all the time - most of them are not formal models - ones that can not be expressed in terms of mathematical expresssions such as graphs"

I agree with this. However, I believe that formal models can be used to help us confirm parts of our more complex mental models.

Any test automation is a model of real cognitive testing. I believe that model-based automation combined with a good framework can often be better than the more-common approaches to automation.

I am still carving for more examples to show how narrow is the concept of "MBT" as it is being "sold" in the industry and where MBT is NOT applicable..

I think that a narrow view of MBT is prevalent. I believe that automated MBT can be used in many more situations than I currently see it being used. I also admit that it is not aways the best solution for a problem.

Ben