MISTA
MISTA (Model-Based Integration and System Test Automation) is a multi paradigm, general purpose model based testing tool. It allows the user to generated model based tests using eFSM's, Pre/Post Contracts, or Functional Nets(a superset of Petri Nets). It generates test code for a variety of test automation systems including but not limited to JUnit, NUnit, Robot Framework and Selenium. The evaluation version available at the authors site is significantly more powerful than some of the full commercial offerings I've tried.
Recently functionality has been added for both online and on-the-fly testing, allowing for testing non-deterministic systems.
Tutorials
To-Do
Basic workflow, beginning to end. (video)- Of places, transitions and arcs.
- Robot Framework video
- Petri-nets in general
- Online/On-the-fly testing
- Modelling for real world applications, use the login page example?
- MBT design for testing games/non-deterministic systems.
- Log Based testing.
Basic Workflow Script
=== Completed, Link when MISTA 1.0 is released ==
- Prelude:
- What this is:
- ISTA Workflow to generate tests for Selenium IDE
- Requirements:
- Goals:
- Determine the basic properties of the SUT
- Extract the necessary Selenium commands / controls for the test
- Design the model in ISTA
- Connect the model to the SUT
- Generate and run the code Selenium code
- The SUT:
- lightswitch.html
- In Firefox:
- The SUT:
- A simple lightswitch program.
- Initial state is On
- The state flips when the button is clicked.
- map the controls
- Open selenium IDE with tools > selenium IDE
- Turn on 'record'
- Note the "open" command
- Click the button to generate the click command
- Right-click the light label and get the "assertText" command
- In ISTA:
- design the model
- Set the places for "On" and "Off" state
- Set the transitions "TurnOn" and "TurnOff"
- Connect them with arcs
- set the initial state (arguably part of step 1)
- INIT On
- map the events
- map the states
- set the setup, navigating to the page under test (Copy and paste the 'open' row from selenium)
- generate and save the code
- In Firefox:
- Open the code file.
- Run the test suite.
Robot Framework Script
It might make sense to do the RF script in two parts:
Mapping a real world application (ish)
SUT: Login page
Model: Successful Login, Bad User
Learn:
- Add INIT states with other values, tuples & strings
- Inhibitor arc
- Goals
- Verification, transition and goal reachability
Steps: Review the SUT
- Walk through a successful login
- A Bad User login
Construct Model:
- Very Basic Login
- Login Page (Place)
- Login Success (Place)
- Login (Transition)
- Add Guard for User1
- Add User2
Mapping a model to Robot Framework
- Use the basic script as a base, assume the viewer is familiar with both RF and the Selenium library.
- How to change the syntax and add new keywords.
- Labelling Goals