Studio:AutoScript: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 95: Line 95:
|-
|-
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.Constants.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>)
[[#Ascript.Constants.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
 
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Retrieves the constant at the given index.<br>
| valign="top" | Retrieves the constant at the given index.<br>
Line 142: Line 141:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| valign="top" align="left" width="150" |  
| valign="top" align="left" width="150" |  
[[#Ascript.TestUnits.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>)
[[#Ascript.TestUnits.Item|object]]&nbsp;'''Item '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''


| valign="top" | Method<br>
| valign="top" | Method<br>
Line 161: Line 160:
|-
|-
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| width="150" bgcolor="#66ff99" | '''Member'''<br>
| bgcolor="#66ff99" | '''Type'''<br>
| width="100" bgcolor="#66ff99" | '''Type'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
Line 183: Line 182:
| bgcolor="#66ff99" | '''Description'''<br>
| bgcolor="#66ff99" | '''Description'''<br>
|-
|-
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]] '''Add'''(<br>&nbsp;&nbsp;&nbsp; [[#Ascript.Timers.Item|object]]&nbsp;timerObject<br>)  
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]] '''Add''' (<br>&nbsp;&nbsp;&nbsp; [[#Ascript.Timers.Item|object]]&nbsp;timerObject<br>''')'''
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Adds a new timer object.
| valign="top" align="left" | Adds a new timer object.
|-
|-
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]]&nbsp;Item'''(<br>'''&nbsp;&nbsp;&nbsp; integer index<br>''')'''
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]]&nbsp;Item'''(<br>'''&nbsp;&nbsp;&nbsp; integer index<br>''')'''  
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Retrieves the Timer object for the given index.
| valign="top" align="left" | Retrieves the Timer object for the given index.
|-
|-
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]] '''Remove '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>)
| valign="top" align="left" width="150" | [[#Ascript.Timers.Item|object]] '''Remove '''(<br>&nbsp;&nbsp;&nbsp; integer index<br>''')'''
| valign="top" | Method<br>
| valign="top" | Method<br>
| valign="top" | Removes the timer at the given index.<br>
| valign="top" | Removes the timer at the given index.<br>
Line 224: Line 223:
| valign="top" align="left" | Contains true if the timer is periodic.
| valign="top" align="left" | Contains true if the timer is periodic.
|-
|-
| valign="top" align="left" width="150" | '''void Start&nbsp;'''()
| valign="top" align="left" width="150" | '''void Start&nbsp;()'''
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Starts the timer.
| valign="top" align="left" | Starts the timer.
|-
|-
| valign="top" align="left" width="150" | '''void Stop&nbsp;'''()
| valign="top" align="left" width="150" | '''void Stop&nbsp;()'''  
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Method<br>
| valign="top" align="left" | Stops the timer.
| valign="top" align="left" | Stops the timer.
|}
|}

Revision as of 19:29, 3 July 2008

 

Introduction 

Ascript is the definitive hierarchy of methods, objects, and properties provided by Autosense. While Autosense helps the user find the script methods/data desired in a script, Ascript is the definitive source of what is available from STRIDE when using Autosense.

Automation API

Ascript

When creating a script, the user types in Ascript followed by dot '.' to get Autosense to display. The user may select methods to be used within his script. The user may access property data within his script. this API is the definitive API for Autosense. The following table outlines the main objects and collections available to the user.

Member
Type
Description
Arguments Collection Collection of arguments.
Constants Collection Collection of constants.
Database Object  Database settings.
Functions Collection Collection of functions.
Messages Collection Collection of messages.
Test Units Collection Collection of test units.
Timers Collection Collection of timers.


Ascript.Arguments

Arguments is a collection of arguments contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the argument at the given index.



Ascript.Arguments.Item

An individual argument is accessed from the collection using the item(#) interface.

Member
Type
Description
Value  Property,
Read-only,
String
The argument value.


Ascript.Constants

Constants is a collection of constants contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the constant at the given index.



Ascript.Constants.Item

An individual constant is accessed from the collection using the item(#) interface.

Member
Type
Description
Value  Property,
Read-only,
String
The value of the constant.


Ascript.Database

Database is an object containing properties related to the database managed by Ascript.

Member
Type
Description
Path
Property,
Read-only,
String
The path to the database.



Ascript.TestUnits

TestUnits is a collection of test units contained and managed through Ascript.

Member
Type
Description

object Item (
    integer index
)

Method
Retrieves the test unit at the given index.



Ascript.TestUnits.Item

An individual test unit is accessed from the collection using the item(#) interface.

Member
Type
Description
void Run()  Method Method to run the test unit.
Suite  Property,
object
The test unit test suite.


Ascript.Timers

Timers is a collection of timers contained and managed through Ascript.

Member
Type
Description
object Add (
    object timerObject
)
Method
Adds a new timer object.
object Item(
    integer index
)
Method
Retrieves the Timer object for the given index.
object Remove (
    integer index
)
Method
Removes the timer at the given index.



Ascript.Timers.Item

An individual timer is accessed from the collection using the item(#) interface.

Member
Type
Description
Active Property,
Read-only,
bool
Contains true if timer is actively running.
Id Property,
Read-only,
long
Contains timer identifier.
Duration Property,
long
Timer duration in milliseconds.
Periodic Property,
bool 
Contains true if the timer is periodic.
void Start () Method
Starts the timer.
void Stop () Method
Stops the timer.