QTools  6.6.0
qutest_dsl.py File Reference

QUTest unit testing harness support for Python scripting. More...

Go to the source code of this file.

Namespaces

 qutest_dsl
 

Functions

def test (title, opt=0)
 start a new test More...
 
def skip (nTests=9999)
 skip the tests following this command. More...
 
def expect (match)
 defines an expectation for the current test More...
 
def glb_filter (*args)
 Set the Global-Filter in the Target. More...
 
def loc_filter (obj_kind, obj_id)
 Set the Local Filter in the Target. More...
 
def current_obj (obj_kind, obj_id)
 Set the Current-Object in the Target. More...
 
def query_curr (obj_kind)
 query the current object in the Target More...
 
def tick (tick_rate=0)
 trigger system clock tick in the Target More...
 
def expect_pause ()
 defines expectation for a Test Pause More...
 
def continue_test ()
 sends the CONTINUE packet to the Target to continue a test More...
 
def command (cmdId, param1=0, param2=0, param3=0)
 executes a given command in the Target More...
 
def init (signal=0, params=None)
 take the top-most initial transition in the current SM object in the Target More...
 
def dispatch (signal, params=None)
 dispatch a given event in the current SM object in the Target More...
 
def post (signal, params=None)
 post a given event to the current AO object in the Target More...
 
def publish (signal, params=None)
 publish a given event to subscribers in the Target More...
 
def probe (func, data)
 sends a Test-Probe to the Target More...
 
def peek (offset, size, num)
 peeks data into the Target More...
 
def poke (offset, size, data)
 pokes data into the Target. More...
 
def fill (offset, size, num, item=0)
 fills data into the Target. More...
 
def pack (format, v1, v2)
 packs data into binary string to be sent to QSPY. More...
 
def on_reset ()
 callback function invoked after each Target reset More...
 
def on_setup ()
 callback function invoked at the beginning of each test More...
 
def on_teardown ()
 callback function invoked at the end of each test More...
 

Variables

int VERSION = 637
 current version of the Python QUTest interface More...
 

Detailed Description

QUTest unit testing harness support for Python scripting.

Description
The Python module "qutest.py" defines a small Domain Specific Language (DSL) for writing test scripts in Python. This script also implements a console-based ("headless") front-end to the QSPY back-and for running such user tests.
Usage
python qutest.py [test-scripts] [host_exe] [host[:udp_port]] [tcp_port]

Definition in file qutest_dsl.py.