ISWIM For Testing
  – A Model Driven
      Approach

        Tony Clark

      tony.clark@tvu.ac.uk
http://itcentre.tvu.ac.uk/~clark




                                   1
Overview
• A Requirement for Constraints:
  – Telecomms
  – Aerospace
  – Business Migration
  – Information Systems, SOA
• ISWIM Constraint Representation
• ISWIM for testing
• Conclusion
                                    2
Modelling with Constraints




                             3
Telecomms




            4
Network Models




Check configurations based
on properties of devices and
network components.


                                5
Aerospace



          Message Bus




Integrated Modular Avionics (IMA)
                                    6
IMA Models



             Check configurations
             of IMA components
             that must satisfy
             requirements of
             navigation modes.




                              7
Payload Configurations




                         8
Business Processes




                     9
Restructuring A Company
                                   Restructure
                                   Company

           Produce                                          Implement
           Plans                                            Plans
                          Develop            Ditch
Produce                                                              Reorganize
                          Plans              Unprofitable
BizRep                                                               products
          Produce                   Produce Customers
          Restructuring             Operating
          Plan                      Plan



                                                 Check sequences of company
                                                 snapshots – do they satisfy the
                                                 business goals?



                          © Xactium Ltd. 2007                             10
Web Services and SOA




        © Ltd. 2007    11
Information Systems




      © Xactium Ltd. 2007   12
ISWIM Constraint Representation




                              13
Constraints
• What not to be: OCL, Java.
• Visual language (why?), with examples:
  – Simple state.
  – Variables.
  – And/Or/Not
  – Quantification
  – Predicates.


                                           14
Snapshots
• Objects, slots and links.
• Context must be given:
  – Parameters
  – Root object
  – Self in state machine.
  – Observations in goals.
• Conjunction of contents.
• Negation.
                              15
Snapshots as Constraints




not c.business_report.terminal and
c.restructuring_plan.addresses = c.business_report



                                                     16
Sharing via Identifiers
 (separation of concerns)




                            17
Negation




… but not ...




                           18
Unknowns Tied Together




      … same as …



                         19
Links Over Collections




                         20
Universal Quantification




                           21
Existential Quantification




                             22
Snapshot Checking Machine




                            23
Syntax Model




               24
An Execution Machine




       © Xactium Ltd. 2007   25
Machine Transitions




                      26
Auxiliary Machine Defs




                         27
An Implementation –
ISWIM for Model Driven Testing




                                 28
Testing Architecture
                 C

                                                            A
                     Model             Interface
                                                                Program
                 (XMF-Mosaic)              (XML)

                                       B



           E
                                D
 Display             Test                                       Testing
Test Cases           Cases                                      Engine
                      (XML)
  (HTML)
                                                            G


                                                                          H
               Test cases include:
  F            • Static Scenarios                                Test
                                               Display
               • Dynamic Scenarios              Test            Reports
                                                                  (XML)
Program        • Invariants                    Reports
               • Pre/Post Conditions               (HTML)

               • State Machines                                               29
                                                     I
A sales system keeps info on customers, accounts and their orders.
                                                                               30
Customer ids (CID) are unique, but custotheir mer information may be distributed.
Model Browser
A model is constructed that shows the
structure and behaviour of the
application.

The model could be extracted from
an implementation or could be
constructed by hand or could be
constructed from another modelling
tool.

The example shows the classes
extracted from a Java application.




                                        31
Test Specification

         Each class may have:

         • Static scenarios defining typical
         configurations of instances. These may
         be positive and negative examples.
         • Invariants defining conditions that
         must hold true at all times.

         Each operation may have specifications
         defining:
         • Precondition defining an expectation of
         the method.
         • Postcondition defining a corresponding
         guarantee if the precondition is satisfied.

                                                32
Static Scenarios
               A static scenario defines a collection of
               objects that conforms to the model.

               The tool will support the construction of
               the scenarios by completing slots and
               links where possible.

               Types of values can be checked by the
               tool.

               The scenario represents an
               implementation independent definition of
               application data.

               It might represent a correct, or an illegal,
SomeContacts   configuration.

               The scenario can be exported in XML and
               recreated as implementation data. 33
Example Invariant


For any sales system,

With a contacts database,

For each known person p,

It is not the case,

That the customer id value is
EMPTY.

                                   NoEmptyCID

                                                34
Another Invariant
For any sales system,

With a contacts
database,

For each known
person p1,

With an id x,

It is not the case that,

There is a known
person p2,

With the id x,

Where p1 and p2 are                           35
                              AllCIDsUnique
different people.
addContact(String id,String info)




  Pre-condition       Post-condition
                                       36
placeOrder(String id,int items)




           post-condition
                                  37
Export as XML




   © Xactium Ltd. 2007   38
Modify Source (or use class loader)
public class SalesSystem {

    ContactsDB contactsDB = new ContactsDB();
    OrderSystem orderSystem = new OrderSystem();

    public void addContact(String CID,String info) {

        JTest test = JTest.startCall("test/SalesSystem","addContact",this,CID,info);

        if(legal(CID)) contactsDB.addContact(CID,info);

        test.endCall(null);

    }

    public void placeOrder(String CID,int amount) {

        JTest test = JTest.startCall("test/SalesSystem","placeOrder",this,CID,amount);

        orderSystem.placeOrder(CID,amount);

        test.endCall(null);
    }
}                                                                                39
A Test Harness
public static void main(String[] args) {

    SalesSystem sales =
     (SalesSystem)JTest.build("test/SalesSystem", "SomeContacts");

    JTest.startRecording("C:/testResults.xml");

    JTest.checkInv("test/SalesSystem", sales);
    sales.addContact("PERSON1","Fred is a sales manager.");
    System.out.println();


    sales.placeOrder("PERSON1",10);

    JTest.stopRecording();
}


                                                              40
Test Results




  © Xactium Ltd. 2007   41
Conclusion
• Constraints occur everywhere in modelling
• Constraints can be expressed as snapshots
  (ISWIM).
• Constraints can be executed in various
  ways to suit the solution.
• ISWIM-constraints can be implemented as
  a tool for model driven testing.

                                         42

More Related Content

PDF
Close Encounters in MDD: when models meet code
PDF
Queuing model based load testing of large enterprise applications
PDF
Using Model Driven Development to Easily Manage Variations in Software Define...
PDF
Adopting Agile Tools & Methods In A Legacy Context
PPT
Scm InteroperabilitäT PraxislöSung In Der Simulation Dargestellt
PPTX
Lesson2 software process_contd2
PPTX
Formalizing homogeneous language embeddings
Close Encounters in MDD: when models meet code
Queuing model based load testing of large enterprise applications
Using Model Driven Development to Easily Manage Variations in Software Define...
Adopting Agile Tools & Methods In A Legacy Context
Scm InteroperabilitäT PraxislöSung In Der Simulation Dargestellt
Lesson2 software process_contd2
Formalizing homogeneous language embeddings

Viewers also liked (8)

PPT
UML01
PPT
Iswim for testing
PDF
Code gen 09 kiss results
PPTX
Kiss at oopsla 09
PDF
Dsl tutorial
PDF
Onward presentation.en
PPTX
Leap isec 2011
PPT
Filmstrip testing
UML01
Iswim for testing
Code gen 09 kiss results
Kiss at oopsla 09
Dsl tutorial
Onward presentation.en
Leap isec 2011
Filmstrip testing
Ad

Similar to Iswim for testing (20)

PPT
Iswim for testing
PDF
Best practices for building and deploying predictive models over big data pre...
PDF
Finance Trading in The Cloud - AWS Michigan Meetup
PDF
Developing and Visualizing Live Model Queries
PDF
Test automation
PDF
Simulink Stateflow workshop
PDF
Project P erts2012
PDF
Accelerated test case - Anish bhanu
PDF
RDz for DevOps Webcast Series: Implementing Continuous Integration with RDz
PDF
Rit 8.5.0 virtualization training slides
PDF
Service Testing & Virtualization in an Enterprise Environments
PDF
Close encounters in MDD: when Models meet Code
PPTX
Tips for Developing and Testing IBM HATS Applications
PDF
External should that be a microservice
PDF
Methodology of enterprise application capacity planning by real life examples
PPTX
RapidMiner: Performance Validation And Visualization
PPTX
RapidMiner: Performance Validation And Visualization
KEY
AngularJS for designers and developers
PDF
01.egovFrame Training Book II
PPTX
Coding Naked
Iswim for testing
Best practices for building and deploying predictive models over big data pre...
Finance Trading in The Cloud - AWS Michigan Meetup
Developing and Visualizing Live Model Queries
Test automation
Simulink Stateflow workshop
Project P erts2012
Accelerated test case - Anish bhanu
RDz for DevOps Webcast Series: Implementing Continuous Integration with RDz
Rit 8.5.0 virtualization training slides
Service Testing & Virtualization in an Enterprise Environments
Close encounters in MDD: when Models meet Code
Tips for Developing and Testing IBM HATS Applications
External should that be a microservice
Methodology of enterprise application capacity planning by real life examples
RapidMiner: Performance Validation And Visualization
RapidMiner: Performance Validation And Visualization
AngularJS for designers and developers
01.egovFrame Training Book II
Coding Naked
Ad

More from ClarkTony (18)

PDF
The Uncertain Enterprise
PDF
Actors for Behavioural Simulation
PDF
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
PDF
LEAP A Language for Architecture Design, Simulation and Analysis
PDF
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
PDF
Context Aware Reactive Applications
PDF
Model Slicing
PDF
Patterns 200711
PDF
Kings 120711
PPTX
Mcms and ids sig
PPTX
Ocl 09
PPTX
Scam 08
PPTX
Reverse engineering and theory building v3
PDF
Hcse pres
PPTX
Dsm as theory building
PDF
Dsl overview
PPTX
Cg 2011
PPTX
Ast 09
The Uncertain Enterprise
Actors for Behavioural Simulation
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
LEAP A Language for Architecture Design, Simulation and Analysis
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
Context Aware Reactive Applications
Model Slicing
Patterns 200711
Kings 120711
Mcms and ids sig
Ocl 09
Scam 08
Reverse engineering and theory building v3
Hcse pres
Dsm as theory building
Dsl overview
Cg 2011
Ast 09

Recently uploaded (20)

PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
4 layer Arch & Reference Arch of IoT.pdf
DOCX
search engine optimization ppt fir known well about this
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
Training Program for knowledge in solar cell and solar industry
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PPTX
Microsoft User Copilot Training Slide Deck
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Advancing precision in air quality forecasting through machine learning integ...
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Enhancing plagiarism detection using data pre-processing and machine learning...
giants, standing on the shoulders of - by Daniel Stenberg
4 layer Arch & Reference Arch of IoT.pdf
search engine optimization ppt fir known well about this
sustainability-14-14877-v2.pddhzftheheeeee
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Comparative analysis of machine learning models for fake news detection in so...
Flame analysis and combustion estimation using large language and vision assi...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Basics of Cloud Computing - Cloud Ecosystem
Training Program for knowledge in solar cell and solar industry
MuleSoft-Compete-Deck for midddleware integrations
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
The influence of sentiment analysis in enhancing early warning system model f...
Microsoft User Copilot Training Slide Deck
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...

Iswim for testing

  • 1. ISWIM For Testing – A Model Driven Approach Tony Clark [email protected] http://itcentre.tvu.ac.uk/~clark 1
  • 2. Overview • A Requirement for Constraints: – Telecomms – Aerospace – Business Migration – Information Systems, SOA • ISWIM Constraint Representation • ISWIM for testing • Conclusion 2
  • 5. Network Models Check configurations based on properties of devices and network components. 5
  • 6. Aerospace Message Bus Integrated Modular Avionics (IMA) 6
  • 7. IMA Models Check configurations of IMA components that must satisfy requirements of navigation modes. 7
  • 10. Restructuring A Company Restructure Company Produce Implement Plans Plans Develop Ditch Produce Reorganize Plans Unprofitable BizRep products Produce Produce Customers Restructuring Operating Plan Plan Check sequences of company snapshots – do they satisfy the business goals? © Xactium Ltd. 2007 10
  • 11. Web Services and SOA © Ltd. 2007 11
  • 12. Information Systems © Xactium Ltd. 2007 12
  • 14. Constraints • What not to be: OCL, Java. • Visual language (why?), with examples: – Simple state. – Variables. – And/Or/Not – Quantification – Predicates. 14
  • 15. Snapshots • Objects, slots and links. • Context must be given: – Parameters – Root object – Self in state machine. – Observations in goals. • Conjunction of contents. • Negation. 15
  • 16. Snapshots as Constraints not c.business_report.terminal and c.restructuring_plan.addresses = c.business_report 16
  • 17. Sharing via Identifiers (separation of concerns) 17
  • 19. Unknowns Tied Together … same as … 19
  • 25. An Execution Machine © Xactium Ltd. 2007 25
  • 28. An Implementation – ISWIM for Model Driven Testing 28
  • 29. Testing Architecture C A Model Interface Program (XMF-Mosaic) (XML) B E D Display Test Testing Test Cases Cases Engine (XML) (HTML) G H Test cases include: F • Static Scenarios Test Display • Dynamic Scenarios Test Reports (XML) Program • Invariants Reports • Pre/Post Conditions (HTML) • State Machines 29 I
  • 30. A sales system keeps info on customers, accounts and their orders. 30 Customer ids (CID) are unique, but custotheir mer information may be distributed.
  • 31. Model Browser A model is constructed that shows the structure and behaviour of the application. The model could be extracted from an implementation or could be constructed by hand or could be constructed from another modelling tool. The example shows the classes extracted from a Java application. 31
  • 32. Test Specification Each class may have: • Static scenarios defining typical configurations of instances. These may be positive and negative examples. • Invariants defining conditions that must hold true at all times. Each operation may have specifications defining: • Precondition defining an expectation of the method. • Postcondition defining a corresponding guarantee if the precondition is satisfied. 32
  • 33. Static Scenarios A static scenario defines a collection of objects that conforms to the model. The tool will support the construction of the scenarios by completing slots and links where possible. Types of values can be checked by the tool. The scenario represents an implementation independent definition of application data. It might represent a correct, or an illegal, SomeContacts configuration. The scenario can be exported in XML and recreated as implementation data. 33
  • 34. Example Invariant For any sales system, With a contacts database, For each known person p, It is not the case, That the customer id value is EMPTY. NoEmptyCID 34
  • 35. Another Invariant For any sales system, With a contacts database, For each known person p1, With an id x, It is not the case that, There is a known person p2, With the id x, Where p1 and p2 are 35 AllCIDsUnique different people.
  • 36. addContact(String id,String info) Pre-condition Post-condition 36
  • 37. placeOrder(String id,int items) post-condition 37
  • 38. Export as XML © Xactium Ltd. 2007 38
  • 39. Modify Source (or use class loader) public class SalesSystem { ContactsDB contactsDB = new ContactsDB(); OrderSystem orderSystem = new OrderSystem(); public void addContact(String CID,String info) { JTest test = JTest.startCall("test/SalesSystem","addContact",this,CID,info); if(legal(CID)) contactsDB.addContact(CID,info); test.endCall(null); } public void placeOrder(String CID,int amount) { JTest test = JTest.startCall("test/SalesSystem","placeOrder",this,CID,amount); orderSystem.placeOrder(CID,amount); test.endCall(null); } } 39
  • 40. A Test Harness public static void main(String[] args) { SalesSystem sales = (SalesSystem)JTest.build("test/SalesSystem", "SomeContacts"); JTest.startRecording("C:/testResults.xml"); JTest.checkInv("test/SalesSystem", sales); sales.addContact("PERSON1","Fred is a sales manager."); System.out.println(); sales.placeOrder("PERSON1",10); JTest.stopRecording(); } 40
  • 41. Test Results © Xactium Ltd. 2007 41
  • 42. Conclusion • Constraints occur everywhere in modelling • Constraints can be expressed as snapshots (ISWIM). • Constraints can be executed in various ways to suit the solution. • ISWIM-constraints can be implemented as a tool for model driven testing. 42