Navigation Menu

Skip to content

Commit

Permalink
6.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
QL committed Sep 17, 2018
1 parent cd78c26 commit 93655c7
Show file tree
Hide file tree
Showing 28 changed files with 7,523 additions and 154 deletions.
2 changes: 1 addition & 1 deletion doxygen/Doxyfile
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QTools"
PROJECT_NUMBER = "6.3.4"
PROJECT_NUMBER = "6.3.5"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Doxyfile-CHM
Expand Up @@ -5,7 +5,7 @@
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "QTools"
PROJECT_NUMBER = "6.3.4"
PROJECT_NUMBER = "6.3.5"
PROJECT_BRIEF =
PROJECT_LOGO = images/header_logo_ql.png
OUTPUT_DIRECTORY =
Expand Down
13 changes: 13 additions & 0 deletions doxygen/history.dox
@@ -1,6 +1,19 @@
/**
@page history Revision History

@section qtools_6_3_5 Version 6.3.5, 2018-09-17
The main purpose of this release is to improve the @ref qutest "QUTest" support for Python scripting. Specifically, this release contains @ref qtools_qspypy "qspypy 2.0.1" with improved qutest.expect() implementation, so that it more closely matches the behavior of the expect() directive from Tcl scripting. The modified qutest.expect() compares correctly the `%timestamp` fields (as opposed to ignoring them) and also handles special character sequences '?', '*', and [chars] (like the Tcl `string match` command).

@note
If you already have the previous version of @ref qtools_qspypy "qspypy", you need to re-install it by means of the following command:@n
@n
`pip install %%QTOOLS%\qspy`


Also, this release modifies the @ref qspy "QSPY host utility" to automatically add a @ref qspy_dict "User Dictionary" entry for `QUTEST_ON_POST` @ref qs_app "application-specific trace record". This modification matches changes in QP/C/C++ 6.3.5.


------------------------------------------------------
@section qtools_6_3_4 Version 6.3.4, 2018-08-16
This release adds the official support for writing QUTest test scripts in Python.
Also, this release fixes some minor typos in error messages generated by QSpy.
Expand Down
Binary file modified doxygen/images/test_sprintf.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doxygen/img/file_py.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions doxygen/img/img.htm
Expand Up @@ -16,6 +16,7 @@
<img src="file_h.png">
<img src="file_c.png">
<img src="file_cpp.png">
<img src="file_py.png">
<img src="file_tcl.png">
<img src="file_wish.png">
<img src="folder.png">
Expand Down
2 changes: 1 addition & 1 deletion doxygen/main.dox
Expand Up @@ -112,7 +112,7 @@ Training and consulting services are also available from Quantum Leaps. Please r

@image html logo_ql_TM.jpg

Copyright &copy; 2002-2017 Quantum Leaps, LLC. All Rights Reserved.@n
Copyright &copy; 2002-2018 Quantum Leaps, LLC. All Rights Reserved.@n

@next{start}
*/
12 changes: 6 additions & 6 deletions doxygen/make.bat
@@ -1,12 +1,12 @@
@echo off
:: ==========================================================================
:: Product: QTools script for generating Doxygen documentation
:: Last Updated for Version: 6.3.4
:: Date of the Last Update: 2018-08-16
:: Last Updated for Version: 6.3.5
:: Date of the Last Update: 2018-09-16
::
:: Q u a n t u m L e a P s
:: ---------------------------
:: innovating embedded systems
:: Q u a n t u m L e a P s
:: ------------------------
:: Modern Embedded Software
::
:: Copyright (C) 2005-2018 Quantum Leaps, LLC. All rights reserved.
::
Expand Down Expand Up @@ -38,7 +38,7 @@ echo usage:
echo make
echo make -CHM

set VERSION=6.3.4
set VERSION=6.3.5

set DOXHOME="C:\tools\doxygen\bin"

Expand Down
26 changes: 17 additions & 9 deletions doxygen/qutest.dox
Expand Up @@ -12,7 +12,7 @@ Even though QUTest&trade; has been primarily designed for testing of <a href="ht

<div class="separate"></div>
@subsection qutest_how How it works?
In a nutshell, working with QUTest&trade; is similar to "debugging with printf", where you instrument the code with the `printf` statements (or `sprintf` or similar). You then run the code with a controlled set of inputs, and examine the produced output from the `printf`s to determine whether the code under test operates correctly. The main differences from using `printf`s are (1) that the much more efficient @ref qpspy "QP/Spy" is used instead and (2) that both generating the inputs and the checking of the test outputs are **automated**.
In a nutshell, working with QUTest&trade; is similar to "debugging with printf", where you instrument the code with the `printf` statements (or `sprintf` or similar). You then run the code with a controlled set of inputs, and examine the produced output from the `printf`s to determine whether the code under test operates correctly. The main differences from using `printf`s are: (1) that the much more efficient @ref qpspy "QP/Spy" is used instead and (2) that both generating the inputs and the checking of the test outputs are **automated**.

The process of testing embedded code with QUTest&trade; involves the following components:

Expand Down Expand Up @@ -45,7 +45,10 @@ Unlike other existing unit testing harnesses for embedded systems (e.g., <a href

- The QUTest&trade; approach is more **intuitive for embedded developers**, because it is conceptually like automated "debugging by printf" that most embedded developers use extensively. As it turns out, this approach also simplifies the development of all sorts of <a href="https://martinfowler.com/bliki/TestDouble.html" target="_blank" class="extern">test doubles</a>, including <a href="https://en.wikipedia.org/wiki/Mock_object" target="_blank" class="extern">mocks</a>, *without breaking encapsulation* of the CUT.

- QUTest&trade; is a unique test harness on the embedded market that supports **scripting**. QUTest @ref qtest_script "test scripts" run on the Host, which skips compilation and uploading the code to the Target and thus shortens the TDD micro-cycle. (NOTE: QUTest&trade; supports *test scripts* written either in [TCL](https://en.wikipedia.org/wiki/Tcl) or [Python](https://docs.pytest.org)).
- QUTest&trade; is a unique test harness on the embedded market that supports **scripting**. QUTest @ref qtest_script "test scripts" run on the Host, which skips compilation and uploading the code to the Target and thus shortens the TDD micro-cycle.

> **NOTE:** QUTest&trade; supports *test scripts* written either in [Tcl](https://en.wikipedia.org/wiki/Tcl) or [Python](https://docs.pytest.org)</span>.


- QUTest&trade; supports **resetting the Target** for each individual test, if needed. This goes far beyond providing test `setup()` and `teardown()` functions that other test fixtures offer (and of course QUTest supports as well). Clean reset of the Target avoids erroneous tests that implicitly rely on side effects from previously executed code. This is particularly important for embedded systems and for state machines, so that each test can start from a known reset condition.

Expand All @@ -58,25 +61,30 @@ Unlike other existing unit testing harnesses for embedded systems (e.g., <a href
- QUTest&trade; @ref qqtest_fixture "test fixtures" can be based on the actual **application code**. For example you can reuse the same `main()` function in a *test fixture* and in your final application. This means that you can either grow your *test fixture* into a final application through TDD, or you can more easily add unit tests to an existing application.

@note
Even though QUTest&trade; is particularly suitable for running tests on deeply embedded targets, it also fully supports running *the same* tests on your @ref qutest_host "host computer". In fact, running the tests as much as possible on the host and thus avoiding the target-hardware bottleneck is the highly recommended best-practice of embedded TDD. QUTest&trade; supports **fully-automated** unit testing, both on the embedded target and on the host computer.
Even though QUTest&trade; is particularly suitable for running tests on deeply embedded targets, it also fully supports running *the same* tests on your **host computer**. In fact, running the tests as much as possible on the host and thus avoiding the target-hardware bottleneck is the highly recommended best-practice of embedded TDD. QUTest&trade; supports **fully-automated** unit testing, both on the embedded target and on the host computer.


<div class="separate"></div>
@subsection qutest_exa QUTest&trade; Examples
The QUTest&trade; examples are co-located with the QP frameworks to which they pertain.
@subsection qutest_inst Downloading and Installing QUTest&trade;
QUTest&trade; is automatically installed as part of the @ref install "QTools&trade; Collection".

- QUTest&trade; examples for the <a href="https://state-machine.com/qpc" target="_blank" class="extern"><strong>QP/C framework</strong></a> are located in the QP/C installation directory, in the sub-directory <span class="img folder">`qpc\examples\qutest`</span>.
- QUTest&trade; examples for the <a href="https://state-machine.com/qpcpp" target="_blank" class="extern"><strong>QP/C++ framework</strong></a> are located in the QP/C++ installation directory, in the sub-directory <span class="img folder">`qpcpp\examples\qutest`</span>
@note
If you wish to write your @ref qutest_script "test scripts" in <span class="img file_tcl">Tcl</span>, you need to make sure that your Tcl interpreter @ref qtools_tcl "supports UDP sockets".@n

@note
If you wish to write your @ref qutest_script "test scripts" in <span class="img file_py">Python</span>, you need to @ref qtools_qspypy "enable support for Python scripting".


@subpage qutest_rtc "&nbsp;"
@subpage qutest_tut "&nbsp;"
@subpage qutest_rtc "&nbsp;"
@subpage qutest_fixture "&nbsp;"
@subpage qutest_script "&nbsp;"

@next{qutest_rtc}

@next{qutest_tut}
*/

/*###########################################################################*/
/*! @page qutest_rtc Run-to-Completion Processing

@tableofcontents
Expand Down

0 comments on commit 93655c7

Please sign in to comment.