Model-Based Testing Using Spec Explorer Aditya Mathur Purdue University CS 49000 Software Testing Spring 2011 Material extracted mostly from: “Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer”, Margus Veanes, Colin Campbell, Wolfgang Grieskamp, Wolfram Schulte, Nikolai Tillmann, and Lev Nachmanson, Published by: Springer Verlag, Lecture Notes in Computer Science, Volume 4949, Pages 39-76, 2007.
34
Embed
Model-Based Testing Using Spec Explorer Aditya Mathur Purdue University CS 49000 Software Testing Spring 2011
Model-Based Testing Using Spec Explorer Aditya Mathur Purdue University CS 49000 Software Testing Spring 2011. M aterial extracted mostly from : - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Model-Based Testing UsingSpec Explorer
Aditya MathurPurdue University
CS 49000 Software TestingSpring 2011
Material extracted mostly from:“Model-Based Testing of Object-Oriented Reactive Systems with Spec Explorer”, Margus Veanes, Colin Campbell, Wolfgang Grieskamp, Wolfram Schulte, Nikolai Tillmann, and Lev Nachmanson, Published by: Springer Verlag, Lecture Notes in Computer Science, Volume 4949, Pages 39-76, 2007.
Spec Explorer 2
Objective
• The purpose of this presentation is to introduce modeling using the Spec Explorer tool from Microsoft.
• The example presented here is from a paper cited in the title slide.
• Familiarity with Chapter 3 of the textbook is assumed.
Spec Explorer 3
Model Based Conformance Testing
Requirements Implementation
Test harness(send inputs, receive outputs, and compare)
Model
Generate(manual)
Tests
Generate(automated)
Test outcome
Spec Explorer 4
Example: Chat Room
Chat Room
Client
Client
Client Client
Client
Spec Explorer 5
Chat Room: Operation
• Each client may post text messages.• Each message is delivered to all clients logged
into the chat room.• Pending messages from a client are delivered
in the order sent.• Messages from multiple senders are
interleaved arbitrarily.
Spec Explorer 6
Client status
// Client entered the chat room or notbool entered;
// Queue of messages sent by other clients but not received by this client
Map<Client,Seq<string>> unreceivedMsgs;
Spec Explorer 7
Client Actions: Creator
• Create a new instance of a client.• State changes so that
Empty message queues between the new client and the previously created clients.
Spec Explorer 8
Client Actions: Creator
// Create a client[Action] Client() { this.unreceivedMsgs = Map;foreach (Client c in enumof(Client), c != this){