Difference between revisions of "Running Tests"

From STRIDE Wiki
Jump to: navigation, search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
Stride executes tests using a runner controlled by a host computer that is physically connected to the target via a configurable communication channel (TCP/IP or serial port). The application software is required to be running, including the Stride runtime, to connect to the Stride Runner.
+
Tests are executed using the [[STRIDE Runner | Stride Runner]] controlled by a host computer that is physically connected to the target via a configurable communication channel (TCP/IP or serial port). The application software is required to be running, including the [[STRIDE Runtime | Stride Runtime]], enabling a ''connection'' between the ''Runner'' and ''Runtime''.  
  
 
'''Block diagram'''
 
'''Block diagram'''
  
  
[[Image:Running_Tests.jpg|500px|Connection Block Diagram]]  
+
[[Image:Running_Tests.jpg|400px|Connection Block Diagram]]  
  
  
'''Invoking the Runner (aka <tt>[[STRIDE_Runner|stride]]</tt>) from a console'''
+
'''Invoking the Runner (aka <tt>stride</tt>) from a console'''
  
 
   stride --database="%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb" --device=TCP:localhost:8000 --run="*"
 
   stride --database="%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb" --device=TCP:localhost:8000 --run="*"
Line 33: Line 33:
  
 
;database file
 
;database file
: This is the .sidb file that is created by the [[Build Tools]] during the target build process. This file contains meta-information used to run tests.
+
: This is the .sidb file that is created by the ''Stride Compiler'' during the target build process. This file contains meta-information used to run tests.
  
 
;device parameters
 
;device parameters
Line 39: Line 39:
  
 
;tests to run
 
;tests to run
: A set of [[Test Modules Overview|script tests]] or [[Test Units|native target-based tests]] (Test Units) compiled in the database. You may also optionally specify named hierarchical suites in which to put the results of the tests you designate.
+
: A set of [[Test Unit| Test Units]] compiled in the database. You may also optionally specify named hierarchical suites in which to put the results of the tests you designate.
  
  
Line 49: Line 49:
  
 
;local xml file
 
;local xml file
: Detailed results are written to a local xml file. By default, this file is written to the directory where the input STRIDE database file is located and given the same name as the database file with an extension of ".xml". If you open this file in a web browser, an xsl transform is automatically downloaded and applied before rendering.
+
: Detailed results are written to a local xml file. By default, this file is written to the directory where the input Stride database file is located and given the same name as the database file with an extension of ".xml". If you open this file in a web browser, an xsl transform is automatically downloaded and applied before rendering.
  
 
Optionally, you may also publish the results to [http://www.testspace.com Test Space] upon test completion.
 
Optionally, you may also publish the results to [http://www.testspace.com Test Space] upon test completion.
 
== Reference ==
 
Reference to the [[STRIDE_Runner| Stride Runner]] article.
 

Revision as of 09:52, 6 July 2015

Tests are executed using the Stride Runner controlled by a host computer that is physically connected to the target via a configurable communication channel (TCP/IP or serial port). The application software is required to be running, including the Stride Runtime, enabling a connection between the Runner and Runtime.

Block diagram


Connection Block Diagram


Invoking the Runner (aka stride) from a console

 stride --database="%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb" --device=TCP:localhost:8000 --run="*"

or for Linux/FreeBSD

 stride --database="$STRIDE_DIR%/SDK/Posix/out/TestApp.sidb" --device=TCP:localhost:8000 --run="*"

Option files can be helpful (i.e. my.opt)

 --database "%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb"
 --device TCP:localhost:8000
 stride --options_file my.opt --run "*"


Reviewing your Results

Example Report


Input

In order to run tests, you must provide the following information to stride.exe:

database file
This is the .sidb file that is created by the Stride Compiler during the target build process. This file contains meta-information used to run tests.
device parameters
This tells stride.exe how to connect to the target.
tests to run
A set of Test Units compiled in the database. You may also optionally specify named hierarchical suites in which to put the results of the tests you designate.


Output

Upon test completion, test output is always written as follows:

console output
A quick summary of results is written to standard output. Test counts are shown for the categories of passed, failed, in progress, and not in use
local xml file
Detailed results are written to a local xml file. By default, this file is written to the directory where the input Stride database file is located and given the same name as the database file with an extension of ".xml". If you open this file in a web browser, an xsl transform is automatically downloaded and applied before rendering.

Optionally, you may also publish the results to Test Space upon test completion.