1 / 16

A Quick Intro to Model-Based Testing

A Quick Intro to Model-Based Testing. Harry Robinson, harryr@microsoft.com Test Architect Microsoft Engineering Excellence Group. Traditional Automated Testing. Imagine that this projector is the software you are testing. Traditional Automated Testing.

ffurlong
Download Presentation

A Quick Intro to Model-Based Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Quick Intro to Model-Based Testing Harry Robinson, harryr@microsoft.com Test Architect Microsoft Engineering Excellence Group

  2. Traditional Automated Testing Imagine that this projector is the software you are testing.

  3. Traditional Automated Testing Typically, testers automate by creating static scripts.

  4. Traditional Automated Testing Given enough time, these scripts will cover the behavior.

  5. Traditional Automated Testing But what happens when the software’s behavior changes?

  6. So What’s a Model? • A model is a description of a system’s behavior. • Models are simpler than the systems they describe. • Models help us understand and predict the system’s behavior.

  7. Model-Based Testing Now, imagine that the top projector is your model.

  8. Model-Based Testing The model generates tests to cover the behavior.

  9. Model-Based Testing … and when the behavior changes…

  10. Model-Based Testing … so do the tests.

  11. Model System AbstractTests Executable Tests Model Based Testing – Overview • “Model-based testing is black box testing process for derivation of test cases from a model that describe functional aspects of the system under test and executing those test cases.” is a partial description of can be derived from can be run against see: Practical Model Based Testing- A Tools Approach, Mark Utting & Bruno Legeard are abstract versions of

  12. Model Based Testing Approach • Five Main Steps • Model the SUT • Generate abstract tests from the model. • Concretize the abstract tests to make them executable • Execute the tests on the SUT and assign verdicts. • Analyze the test results. see: Practical Model Based Testing- A Tools Approach, Mark Utting & Bruno Legeard

  13. Why Does Model-Based Testing Work? system under test complexity model speed “… I think that less than 10 percent of most programs’ code is specific to the application. Furthermore, that 10 percent is often the easiest 10 percent. Therefore, it is not unreasonable to build a model program to use as an oracle.” –Boris Beizer, Black Box Testing, p.63

  14. Benefits of Model-Based Testing • Easy test case maintenance • don’t reuse just test execution but also test generation! • Reduced costs -> more tests • Early bug detection and Increased bug count • Time savings • Start automated testing from Version 0.1

  15. Obstacles to Model-Based Testing • Skill set • Need testers who can build/use a model • Comfort factor • Creating a model and understanding how it is traversed to generate tests can be technical. • Expectations • Models can be a significant upfront investment • MBT will never catch all the bugs • Metrics • Bad metrics: bug counts, number of test cases • Better metrics: spec coverage, code coverage

  16. To Learn More • Model-based testing website: www.model-based-testing.org • Books: “Black-Box Testing : Techniques for Functional Testing of Software and Systems”by Boris Beizer “Testing Object-Oriented Systems: Models, Patterns, and Tools” by Robert Binder • A real model-based testing tool: • SpecExplorer

More Related