TestOptimal ProMBT

advertisement
TestOptimal
ProMBT - IDE
TestOptimal LLC
Hani Achkar
The TestOptimal ProMBT IDE is a feature rich and
complete model-based test development, deployment
and execution environment. This document provides a
brief overview of some of the key aspects of this
application.
TestOptimal ProMBT - IDE
Contents
Introduction ............................................................................................................................................ 3
Navigating the IDE............................................................................................................................... 3
IDE Panes......................................................................................................................................... 3
Re-size Bars ..................................................................................................................................... 4
Menu Bar ............................................................................................................................................ 4
File ................................................................................................................................................... 4
Run .................................................................................................................................................. 5
Log ................................................................................................................................................... 5
Report ............................................................................................................................................. 5
Help ................................................................................................................................................. 6
Design pane......................................................................................................................................... 6
File Filter.......................................................................................................................................... 6
FileList Tab....................................................................................................................................... 6
Model Tab ....................................................................................................................................... 6
Runs Tab .......................................................................................................................................... 6
Screens Tab ..................................................................................................................................... 6
Design Pane controls....................................................................................................................... 6
Attributes pane ................................................................................................................................... 7
Property Tab ................................................................................................................................... 7
Graph Tab........................................................................................................................................ 7
Graph Tab Controls ......................................................................................................................... 7
Monitor Tab .................................................................................................................................... 7
Stats Tab.......................................................................................................................................... 7
Attr Pane controls ........................................................................................................................... 7
Code pane ........................................................................................................................................... 8
mScript Tab ..................................................................................................................................... 8
Code Assist ...................................................................................................................................... 8
mScript Viewer Tab ......................................................................................................................... 9
Dataset Tab ..................................................................................................................................... 9
Code Pane controls ....................................................................................................................... 10
IDE
Page 1
TestOptimal ProMBT - IDE
Info pane ........................................................................................................................................... 10
Vars Tab......................................................................................................................................... 10
SeqTrace Tab ................................................................................................................................. 10
UI Map Tab .................................................................................................................................... 10
Info Pane controls ......................................................................................................................... 10
Sidebar .............................................................................................................................................. 11
IDE
Page 2
TestOptimal ProMBT - IDE
Introduction
The TestOptimal IDE is hosted by a web browser on localhost:8888 via http://localhost:8888, the
port number can be changed, but by default it is 8888. The two most popular web browsers to use
with TestOptimal are Internet Explorer 7 or 8 and Firefox 3. Although any of the major bowsers
currently available are suited. It is recommended that for the purpose of professional testing that
Firefox be the browser of choice to host the IDE. The reasons for this are very basic, in respect of
testing browser based applications Firefox provides a wealth of add-ons which are essential for
spying out HTML elements and Xpaths which are essential for interacting with web applications.
Outside of using TestOptimal to test web applications any web browser may be used to host
TestOptimal.
Navigating the IDE
IDE Panes
In a clockwise fashion around the IDE notice that the IDE is comprised of four (4) panes:
1.
2.
3.
4.
IDE
Design
Attr (attributes)
Code
Info
Page 3
TestOptimal ProMBT - IDE
Atop the Design and Attr panes there is also a menu bar and to the extreme right of this an
identification tab that indicates the type of license installed and its currency, in the event the license
is expired the word Expired will appear, for trial licenses Trial will appear, for fully licensed verions
the ProMBT or Runtime may appear.
Re-size Bars
The IDE panes are resizable via the re-size bars. You can identify these by the fact that they have an
orange tip. There are two (2) vertical re-size panes, between the Design and Attr panes and
between the Code and Info panes as well as one horizontal paned which separates the Design and
Attr panes from the Code and Info panes.
It is exceedingly easy to use the re0size panes. Click the mouse left button on the orange tip of the
re-size bar. Yu will note that asoon as you have done that the screen goes a transparent blue color.
You can release the mouse button. Move the mouse to the desired position and note that the
orange tip follows the mouse cursor. When you have reached the desired position once more click
the mouse left button and the re-size bar will be fixed to that location. You can reset the screen to
default setting
Menu Bar
File
When highlighted (in orange) indicates that changes have been made and are pending. I not saved
(File -> Save) these changes will be lost when the model is closed.
New Model
Provides for creating a new model
New Folder
Provides for creating a folder – cannot as yet move models between folders from within TestOptimal
(this is coming) but may create models within folders
Save
Permits save operations on model changes and imports (model and mScript, but not datasets –
these are automatically saved)
Rename
Permits to rename a model
Backup permits a manual time stamped save to a model
Restore
Allows restoration of models to the last back-up version taken by TestOptimal
Archive
Provides for the archiving of models for execution through a RunTimeMBT server or the
development environment such as the ProMBT IDE– archived models cannot be amended
IDE
Page 4
TestOptimal ProMBT - IDE
Close
Provides for closing an active and open model
Import
Provides for importing supported model file formats
Reports
Brings up the model reports
LogOff
Provides for users to log off a session – not recommended in non-enterprise versions such as named
user licensed versions
Run
Provides similar controls as the side bar apart from the graph generation controls (see sidebar)
Log
IDE Log
Contains error messages sent to the TestOptimal console as well as IDE Log messages – useful in
debugging.
mScript Log
Provides all user logged messages during a run plus all system generated exception and error
messages raised during a run and is useful during debugging post execution
Server Log
Provides for all MBT server transactions and is useful during debugging post execution
SeleniumRC Log
Provides a record of all transactions and errors generated by the Selenium server when a browser is
launched for execution and is useful during debugging post execution
White
Not yet available for use – this is in internal Alpha phase.
Report
Report List
Provides a record of all reports generated by the current model
TestCase Report
This is an auto-generated test case script arising from a model execution with either Test Case
Generation – HTML or Test Case Generation – Excel selected
Model Report
This an HTML based report for sharing the model with others who do not have TestOptimal licenses
and acts a viable medium for review and discussion.
Update Report List
This simply brings up to date the report list.
IDE
Page 5
TestOptimal ProMBT - IDE
Help
Wiki
A link to the TestOptimal Wiki
Forum
A link to TestOptimal Google Groups TestOptimal forum
Support
A link to TestOptimal support
Config
The TestOptimal configuration page
About
TestOptimal version
Reset Layout
To be used if the IDE gets confused and the layout becomes unreadable for any reason – returns the
IDE view to “normal”
Design pane
File Filter
A case insensitive model search tool.
FileList Tab
Contains:
1. Folders
2. Models
3. Archived Models
Model Tab
Model structural view
Runs Tab
Repository of Stats from automation executions
Screens Tab
Repository of all snap screens captured during execution in automation mode for current MBT
Model
Design Pane controls
1. Refresh
2. Reset panes
3. Maximize to top half of screen
4. Maximize to full screen
IDE
Page 6
TestOptimal ProMBT - IDE
Attributes pane
Property Tab
Contains dependent of which elements of a model are selected in the Design -> Model tab:
1.
2.
3.
4.
5.
SCXML Model settings
MBT execution settings
mCase settings
State settings
Transition Settings
Graph Tab
EFSM View of the model
Graph Tab Controls
1. Find/Scroll to State or Transition by tags or name control
2. Find/Scroll to previous State or Transition control
3. Find/Scroll to next State or Transition control
4. Mark States and Transitions with similar tags control
5. Clear all highlights control
6. Set execution mode to normal (non-debug) radio button
(set by
default)
7. Set execution mode to debug radio button (manual set by user or
system when debug controls from side bar used)
8. Set execution mode to breakpoint (allows pauses during execution at
set mScript or Transition SCXML set breakpoints)
9. Set execution mode to mark
Monitor Tab
Provides numerous metrics in ProMBT versions regarding the execution of the model
Stats Tab
Contains:
1. Stat Desc field provides an editable field to enter the name of the current run’s stats, by
default set to “Current MBT Execution”, this can and should be changed to something more
meaningful to the user:
2. Save control saves the current MBT Execution Stats to the Runs tab in the Design pane
3. Publish control sets the execution stats results within the Report List (see Report menu)
ready for printing, saving as PDF etc.
4. Provides numerous metrics and individualized reports on tag status (Pass or fail), load time
per page and exceptions raised by level.
Attr Pane controls
i.
Refresh
ii.
Reset panes
IDE
Page 7
TestOptimal ProMBT - IDE
iii.
iv.
Maximize to top half of screen
Maximize to full screen
Code pane
mScript Tab
mScript Editor
Provides an integrated mScript Editor for writing and editing the mScript code that drives the
models.
Edit Assist Drop Down List
When a State or Transition is selected in the Model from the Design Model Tab then the mScript
editor provides information regarding the model and brings up a drop down list (set to “Trans Action
(each traversal) by default). This makes the coding very easy as you only have to enter your mScript
here to have it correctly situated within the model. You can change this control to set Assert via
“Trans Verify” which will insure that every action has the assertions set and associated correctly.
Acknowledging mScript Changes - OK
The OK control is necessary as upon changes being made to the mScript the OK button sets these
changes to memory. This allows for experimentation without committing changes permanently. If
the changes are acceptable and desired they may be further permanently saved by use of the Save
option under the File menu.
mScript Error Detection Via Compile
When mScript has been added and OK’d via the OK button the Compile controls (if selected) checks
for and flags any errors in the code, ordinarily, however, errors in mScript are flagged by being
highlighted before and during the code entry stages.
Cancelling mScript Changes
The Cancel control results in any changes made to mScript that have not been permanently
committed to be ignored.
Code Assist
Ctrl/alt + space
This returns a code assist pane that provides ready to use system and
plugin mScript methods –mouse over reflects the intent of the mScript
method
Ctrl/alt + R
This returns a pane referencing all integrated requirements –mouse over the
requirement tag returns the text of the requirement as a tool tip style
readout the intent of the mScript method
IDE
Page 8
TestOptimal ProMBT - IDE
Ctrl/alt + U
This returns a pane referencing all referenced UI elements by UIID, these
may be reviewed in the UI Map Tab within the Info pane.
Ctrl/alt + P
This returns a code assist pane that provides ready to use plugin mScript
methods –mouse over reflects the intent of the mScript method
Ctrl/alt + S
This returns a code assist pane that provides ready to use system mScript
methods –mouse over reflects the intent of the mScript method
Ctrl/alt + M
This returns a code assist pane that provides ready to macro mScript
methods, these are entire code snippets that achieve particular end results
–mouse over reflects the intent of the mScript method
Set breakpoint on mScript line
BY clicking on the line number adjacent to an action script or an assert
script place break point at that line. Highlights the line number in orange
to indicate breakpoint set. Only works with mScript which is an action or
assert. Click again on set break point removes this break point.
mScript Viewer Tab
Presents the mScript in a HTML page
Dataset Tab
Provides a mechanism to propose a dataset (transition by transition) and further provides
combinatorial tools to arrange the data in accordance with several combinatorial generators. The
dataset name must first be entered at the associated transition in the Data Set field for this to work.
This is a required preliminary step. Only one dataset per transition is allowed.
Delete control
Permits selected field from the dataset to be deleted.
Add Control
The Add control permits fields to be added to the dataset. The dataset is automatically saved in the
dataset folder of the model folder.
Pairwise Combinatorial Generation
The PairWise control generates pair-wise (all pairs) combinatorial arrangement for the field values
entered into the DataSet Fields of the dataset
This is generally held as the most efficient
and pragmatic setting for testing purposes – covers about 90% of all meaningful combinations where
errors are likely to occur (covers all possible interactions of any two fields)
3-Wise Combinatorial Generation
The 3-Wise control provides 3-Wise combinatorial generation for the field values entered into the
DataSet Fields
. (covers all possible interaction of any three fields). May result in large
numbers of combinations which in the end may not provide much more value to PairWise – Select
judiciously.
IDE
Page 9
TestOptimal ProMBT - IDE
4-Wise Combinatorial Generation
The 4-Wise control provides 4-Wise combinatorial generation for the field values entered into the
DataSet Fields
. (covers all possible interaction of any four fields). May result in large numbers
of combinations which in the end may not provide much more value to PairWise – Select judiciously.
Full Combinatorial Generation
The Full control provides for “FULL” combinatorics, which dependent on the number of variables,
may result in extremely large numbers of combinations. (covers all possible combinations).
May result in extremely large numbers of combinations which in the end may not provide much
more value to PairWise – Select judiciously.
Code Pane controls
i.
Refresh
ii.
Reset panes
iii.
iv.
Maximize to bottom half of screen
Maximize to full screen
Info pane
Vars Tab
The Vars Tab provides a dynamic view of the values of all user and systems variables as the models
execute. This is an exceptionally useful tool to use during debugging sessions
User Check Vars Check Box
The User check box permits display of all user set Variables, checked by default
unchecked
may be
Sys Vars Check Box
The Sys check box permits display of all System set Variables, checked by default
unchecked
may be
SeqTrace Tab
i.
Provides a readout of the actual execution as it occurs and shows which states are were
occupied which transitions fired and which new states were occupied as a result.
ii.
Provides a means to generate a Traversal graph via the Traversal Graph control
UI Map Tab
The UI Map provides for a mapping layer between the mScript and the AUT
Info Pane controls
i.
Refresh
ii.
Reset panes
iii.
iv.
IDE
Maximize to bottom half of screen
Maximize to full screen
Page 10
TestOptimal ProMBT - IDE
Sidebar
The sidebar controls are generally self-explanatory:
IDE
Page 11
Download