QTools  6.9.4
Collection of Host-Based Tools
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 include (fname)
 include python code in a test script More...
 
def test_file ()
 get the test file name with path More...
 
def test_dir ()
 get the test directory (relative to the current directory) More...
 
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)
 Send the QS Global Filter to the Target. More...
 
def loc_filter (*args)
 Send the Local Filter to the Target. More...
 
def ao_filter (obj_id)
 Updates the Local Filter for a given AO 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 expect_run ()
 defines expectation for calling QF_run()/QF::run() 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 in 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 last_rec ()
 returns last record received from the target as string. 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 = 694
 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 <path>/qutest.py [-x] [test-scripts] [host_exe] [host[:udp_port]] [tcp_port]

or

qutest [-x] [test-scripts] [host_exe] [host[:udp_port]] [tcp_port]


Product: QUTest Python scripting (requires Python 3.3+) Last updated for version 6.9.4 Last updated on 2021-05-31

               Q u a n t u m  L e a P s
               ------------------------
               Modern Embedded Software

Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.

This program is open source software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Alternatively, this program may be distributed and modified under the terms of Quantum Leaps commercial licenses, which expressly supersede the GNU General Public License and are specifically designed for licensees interested in retaining the proprietary status of their code.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <www.gnu.org/licenses/>.

Contact information: <www.state-machine.com/licensing>

<info@state-machine.com>

Definition in file qutest_dsl.py.