STRIDE Runner: Difference between revisions

From STRIDE Wiki
Jump to navigation Jump to search
No edit summary
 
(61 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Overview ==
__NOTOC__
The '''stride''' executable (a.k.a. STRIDE Runner) runs target-based tests from a host computer and optionally uploads results to [[STRIDE Test Space]]. The program also can be used to list the names of all Test Units that exist in a STRIDE database file.
The '''stride''' executable (a.k.a. Stride Runner) runs script or native target-based tests from a desktop (Windows, Linux or FreeBSD) host computer and optionally uploads results to [http://www.testspace.com Testspace].  


The stride executable is available to run on Windows and on Linux x86.
stride [<i>options</i>] [<i>TU...</i>]


== Running Tests ==
Each command line option that accepts an argument should be entered with a space between the option and its corresponding argument; i.e.
You may specify either '''built-in diagnostics''' or '''user tests''' to be run.
stride -o argument --option1 argument1
 
The built-in diagnostics are useful to validate a new installation. See [[Test_Integration#Running_STRIDE_Diagnostics | Running Diagnostics]] for details.
 
User tests comprise either sample tests provided by S2 Technologies or tests that you create.


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


;database file
;database file
Line 18: Line 14:


;device parameters
;device parameters
: This tells stride.exe how to connect to the target.
: This tells how to connect to the target.


;tests to run
;tests to run
: Unless you are running the diagnostic tests (using the <tt>--diagnostics</tt> option), you must specify the Test Units that you want to run. You may also optionally specify named hierarchical suites in which to put the results of the Test Units you designate.
: A set of Test Units and or Test Scripts.  


=== Default Behavior ===
== Running ==
By default, all Test Units in the specified database are run, and the all results are put into the root suite. It is not necessary to explicitly specify Test Units unless you want to override the default behavior.
By default, no tests are run. You need to explicitly list them using the <tt>--run</tt> option.


=== Test Unit Run Order ===
=== Order ===
If implicitly specified by a wildcard, Test Units are run in the order in which their corresponding SCL pragmas were seen by the [[s2scompile|STRIDE compiler]].
When explicitly specified, Tests are run in the order in which they are given on the command line.


If explicitly specified, Test Units are run in the order in which they are given on the command line.
It is possible to run all Test Units by explicitly specifying a wildcard (*). In that case they are run in alphabetical order.


=== Test Unit Specification Rules ===
=== Rules ===


* Test Units are specified by name or wildcard and grouped together within parentheses, i.e. "(" and ")"
* Test Units are specified by name or wildcard
* When specifying more than one Test Unit in a group, each Test Unit name (or wildcard) must be delimited by a comma.
* Scripts are specified by relative or absolute file name
* The output of each Test Unit group is placed within a hierarchy of named suites. (The root suite does not have a name.)
* Tests (scripts or test units) are grouped together within curly braces, i.e. "{" and "}"
* The suite into which a Test Unit group is placed is specified immediately before the group, e.g. ''suitepath''(''testunitgroup'')
* When specifying more than one Test in a group, each Test instance must be delimited by a semicolon.
* When a Test accepts parameters they are passed following the Test name in parentheses comma separated, i.e. "<tt>myTest(param1, param2)</tt>"
* The output of each Test group is placed within a hierarchy of named suites. (The root suite does not have a name.)
* The suite into which a Test group is placed is specified immediately before the group, e.g. ''<tt>suitepath</tt>''<tt>{</tt>''<tt>testunitgroup</tt>''<tt>}</tt>
* Hierarchical suite paths are delimited by "/" (forward slash) and are always specified starting from the root.
* Hierarchical suite paths are delimited by "/" (forward slash) and are always specified starting from the root.
* If the same Test Unit is specified to be run more than once, and one or more results are to be written to the same suite, the each conflicting Test Unit name is appended with an incrementing count in the form of "(n)". For example: Results from three runs of TestUnit "myTU" are all written to the root suite. The Test Units will be reported with the names "myTU" "myTU(1)" and "myTU(2)".
* If the same Test is specified to be run more than once, and one or more results are to be written to the same suite, the each conflicting Test name is appended with an incrementing count in the form of "(n)". For example: Results from three runs of TestUnit "myTest" are all written to the root suite. The Tests will be reported with the names "myTest" "myTest(1)" and "myTest(2)".


==== Wildcard Matching ====
==== Wildcard Matching ====
Line 46: Line 45:
* '''<code>-</code>''' (hyphen) matches all remaining Test Units (useful when putting Test Units into suites)  
* '''<code>-</code>''' (hyphen) matches all remaining Test Units (useful when putting Test Units into suites)  


==== Test Unit Specification Examples ====
==== Examples ====


;<code><-r omitted></code>
;<code>-r "/{*}"</code>
: Default behavior: run all Test Units and put results into the root-level suite.
: Run all Test Units and put results into the root-level suite.


;<code>-r /(*)</code>
;<code>-r "/Suite{*}"</code>
: Same as above: run all Test Units and put results into the root-level suite.
: Run all tests and put results into a suite named "Suite" that is a child of the root suite.


;<code>-r /Suite(*)</code>
;<code>-r "/{Test1;Test2;Test3}"</code>
: Run all tests and put results into a suite named "Suite" that is a child of the root suite.
: Run the Tests named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite.


;<code>-r /(TU1,TU2,TU3)</code>
;<code>-r "/{Test1;Test2;Test3}" -r "/SecondPass{Test1}"</code>
: Run the Test Units named "TU1", "TU2", and "TU3" in the designated order; put results into the root suite.
: Run the Tests named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite. Then run the Test Unit named "Test1" again and put the results into a suite named "SecondPass".


;<code>-r /(TU1,TU2,TU3) -r /SecondPass(TU1)</code>
;<code>-r "/{Test1;Test2;Test3}" -r "/Remaining{-}"</code>
: Run the Test Units named "TU1", "TU2", and "TU3" in the designated order; put results into the root suite. Then run the Test Unit named "TU1" again and put the results into a suite named "SecondPass".
: Run the Test Units named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite. Then run all remaining Test Units and put the results into a suite named "Remaining".


;<code>-r /(TU1,TU2,TU3) -r /Remaining(-)</code>
;<code>-r "/Suite1/Suite2{TestA; TestB}"</code>
: Run the Test Units named "TU1", "TU2", and "TU3" in the designated order; put results into the root suite. Then run all remaining Test Units and put the results into a suite named "Remaining".
: Run the Tests named "TestA" and "TestB", and put the results into a suite named "Suite2" that is a child of a suite named "Suite1" that is a child of the root. Note that we must enclose the specification in quotes since the specification contains a space.


;<code>-r "/Suite1/Suite2(TUa, TUb)"</code>
;<code>-r "/{TestA(29); TestB(5.67, \"some text\")}"</code>
: Run the Test Units named "TUa" and "TUb", and put the results into a suite named "Suite2" that is a child of a suite named "Suite1" that is a child of the root. Note that we must enclose the specification in quotes since the specification contains a space.
: Run the Tests named "TestA" with parameter 29 and "TestB" with parameters 5.67 and "some text", and put the results into the root suite. Note that we must enclose the specification in quotes since the specification contains spaces and embedded quotes (which needs to be escaped using backslash).


;<code>-r "TUx TUy TUz"</code>
;<code>-r "TestX; TestY; TestZ"</code>
: This is a special convenience syntax. If the suite and grouping parentheses are omitted, the app runs the the named Test Units and puts their results put into the root suite.
: This is a special convenience syntax. If the suite and grouping braces are omitted, the app runs the the named Test Units and puts their results put into the root suite.


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


Line 79: Line 78:


;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 in the current directory, named as '''"testresult.xml"'''. In addition a '''"testresult.html"''' is generated that could be open in a web browser of your choice.  
 
Optionally, you may also publish the results to your [[STRIDE Test Space]] upon test completion.
 
;Test Space
: Results are uploaded using your Test Space URL and login credentials. You must specify the testspace name and project name when using this option.
 
== Syntax ==
    stride [<i>options</i>]
 
Each command line option that accepts an argument should be entered with a space between the option and its corresponding arguement; i.e.
stride -o argument --option1 argument1


Any warnings or errors that occur during execution are written to the standard output device.
;Testspace
: Optionally, you may also publish the results to your [http://www.testspace.com Testspace] upon test completion. Results are uploaded using your Testspace URL and login credentials. You must specify the a destination Testspace project and space names.


== Options ==
= Options =
{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffcc;"   
{| border="1" cellspacing="0" cellpadding="10" style="align:left;background-color:#ffffcc;"   
!width="200pt"|'''Option'''
!width="200pt"|'''Option'''
!width="500pt"|'''Description'''
!width="500pt"|'''Description'''
|-  
|-  
| '''--version'''
| '''--database''' [ -d ] ''arg''
| Prints version information to the console.
| Specifies the name of an existing STRIDE database (.sidb) file that will be used for test execution.
|-  
 
| '''--database'''  ''arg''
This can be a relative or absolute path. If the path contains one or more spaces, it must be enclosed in quotes. Under Windows, both DOS and [http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention UNC names] are accepted.
| Specifies the name of an existing STRIDE database (.sidb) file that will be used for test execution. This can be a relative or absolute path. If the path contains one or more spaces, it must be enclosed in quotes.
 
As a path delimiter you may use either the forward slash or backslash character. (Forward slashes are typically preferred due to the standard use of the backslash as an escape character.)
|-  
|-  
| '''--device''' ''arg''
| '''--device''' ''arg''
| Specifies the parameters to be used to connect to the target device (i.e. TCP:''host'':''port'' or COM''port'':''rate'':''mode''). For example:  
| Specifies the parameters to be used to connect to the target device (i.e. TCP:''host'':''port'' or COM''port'':''rate'':''mode''). For example:  
* TCP:localhost:8000  
* <code>TCP:localhost:8000</code>
* COM7:28800:8N1
* <code>COM7:28800:8N1</code>
*/dev/ttyS2:57600:8N1  
* <code>/dev/ttyS2:57600:8N1</code>
|-
|-
| '''--timeout''' ''arg'' (=0)
| '''--timeout''' ''arg'' (=0)
| Specifies a watchdog timeout (in seconds) per single test execution step.  
| Specifies a watchdog timeout (in seconds) per single test function or test method.  
Default value is 0. (0 = infinite timeout)
Default value is 0. (0 = infinite timeout)
|-
|-
| '''-r''' [ --run ] ''arg'' (=/(*))
| '''--run''' [ -r ] ''arg''
| Specifies a list of Test Units to execute and their order of execution with optional report grouping by suite. You may specify this option many times on the command line to include multiple groupings in a single test. A named Test Suite may be specifed more than once to run it multiple times. See [[#Input|Input]] section above for more details.
| Specifies a list of Test Units or Scripts to execute and their order of execution with optional report grouping by suite. You may specify this option many times on the command line to include multiple groupings in a single test. A named Test Suite may be specified more than once to run it multiple times. See [[#Input|Input]] section above for more details.
Default value is all Test Units.
Any nameless positional option is treated as this option.
 
|-
| '''--trace''' [ -t ] ''arg'' (=txt)
| Specifies if and how to trace on target instrumentation (functions, messages and test points/logs). <br/>
The following types of tracing formats are supported:
* <code>"txt"</code> - single-entry-per-line plain text file
* <code>"yml"</code> - [http://en.wikipedia.org/wiki/Yaml YAML] formated file
* <code>"-"</code> - interactive single-entry-per-line plain text
With the exception of the interactive type all others are attached as an annotation to the output file.<br/>
Default value is "txt".
|-
| '''--trace_timeout''' ''arg''
| Specifies a trace timeout (in seconds).
|-
|-
| '''-u''' [ --upload ] ''arg'' (=all)]
| '''--upload''' [ -u ] ''arg'' (=start)
| Specifies if and how to upload the results to [[STRIDE Test Space]]. Arg specifies type of upload; <br/>
| Specifies if and how to upload the results to Testspace. Arg specifies type of upload; <br/>
The following types of uploads are supported:
The following types of uploads are supported:
* "all" - This causes a new result set to be created and marked complete. This is the most commonly needed upload type, so it is the default behavior. The remaining upload types are used to aggregate results of multiple executions into a single result set.
* <code>"full"</code> - This causes a new result set to be created and marked complete.  
* "start" - This is used to create a new result set and mark it incomplete. An upload of this type should be followed by zero or more uploads that add results and one final upload that finishes the result set.
* <code>"start"</code> - This is used to create a new result set and mark it incomplete. An upload of this type should be followed by zero or more uploads that add results and one final upload that finishes the result set.
* "add" - This is used to add more data to an existing incomplete result set. The result set will still be marked incomplete after this upload type.
* <code>"add"</code> - This is used to add more data to an existing incomplete result set. The result set will still be marked incomplete after this upload type.
* "finish" - This is used to add more data to an existing incomplete result set and mark it complete. This is the last step in creating a result set from multiple executions.
* <code>"finish"</code> - This is used to add more data to an existing incomplete result set and mark it complete. This is the last step in creating a result set from multiple executions.
Default value is "all".  
Default value is "start".  
|-
|-
| '''--testspace''' ''arg''
| '''--testspace''' ''arg''
| Specifies the root STRIDE Test Space URL and credentials. (i.e. <nowiki>https://user:pwd@mycompany.stridetestspace.com</nowiki>)
| Specifies the Testspace URL to which the results will be uploaded, expressed in the following form: <br/>
|-
<code><nowiki>user:pwd@<domain>.testspace.com/<project>/<space></nowiki></code> <br/>
| '''--project''' ''arg''
Where 'domain' is your organization's subdomain, and 'project' and 'space' are the names of related project and space.  
| Specifies the name of the STRIDE Test Space project to which the results will be uploaded
|-
| '''--space''' ''arg''
| Specifies the name of the STRIDE Test Space project's test space.
|-
|-
| '''--name''' ''arg''
| '''--result''' ''arg''
| Specifies the name to be given to the result set uploaded to STRIDE Test Space. If this option is omitted, a default name of "Sequence_''n''" is used where n is an auto-incremented integer.
| Name of the output XML result file and optionally, when uploading, the result set name along with folder path (default "root").
The following ways to specify are supported:
* <code>"myfile.xml"</code> - set both, output XML result file and result set name, to be the same.
* <code>"myname|"</code> - set the result set name only, use the default "testresult.xml" as output XML result file.
* <code>"|myfile.xml"</code> - set the output XML result file only, let Testspace to choose the result set name.
* <code>"myname|myfile.xml"</code> - set both, result set name and output XML result file, to be different names.
* <code>"myname/path/to/folder|myfile.xml"</code> - set both, result set name and output XML result file, to be different and upload under an explicit folder path.
* <code>"/path/to/folder|myfile.xml"</code> - set the output XML result file, let Testspace to choose the result set name but upload under an explicit folder path.
Default value is "testresult.xml".  
|-
|-
| '''--list'''
| '''--list'''
| Lists all Test Units in the specified STRIDE database to standard out.
| Lists all Test Units and intercepted Functions in the specified Stride database to standard out.
|-
|-
| '''--diagnostics'''
| '''--diagnostics'''
| Performs a set of built-in diagnostic tests on the target. See [[Sandbox Evaluation]] for test details.
| Performs a set of built-in diagnostic tests on the target. See [[Build_Integration#Running_Diagnostics|Running Diagnostics]] for details.
|-
| '''--log_level''' ''arg'' (=warn)
| Controls the target source [[Test Log |Test Logs]] level. <br/>
The following levels are supported:
* <code>"all"</code> - enables all logging
* <code>"info"</code> - enables only INFO and higher
* <code>"warn"</code> - enables only WARN and higher
* <code>"err"</code> - enables only ERROR and higher
* <code>"off"</code> - disables all logging
Default value is "warn".  
|-
|-
| '''-o''' [ --output ] ''arg''
| '''--options_file''' ''arg''
| Specifies the local file to which test results will be written.<br>
| Specifies a file from which the program reads command line options. The format is the same as the command line except that options may be split across multiple lines. Lines in an options file that begin with the character '#' are ignored.
Default output file is given the same name as the input database file (with the <tt>.sidb</tt> file extension replaced by <tt>.xml</tt>), and is written to the input database file's directory.
|-
| '''--version'''
| Prints version information to the console.
|-
|-
| '''-O''' [--options_file] ''arg''
| '''--dry'''
| Specifies a file from which the program reads command line options. The format is the same as the command line except that options may be split across multiple lines.
| Dry run, just validate the input without device connection or test execution.
|}
|}


== Environment Variables ==
The following environment variables are recognized by the application and their values used as shown if set. <ref>For details, see [http://support.microsoft.com/kb/310519 How to Manage Environment Variables in Windows XP] and [http://stackoverflow.com/questions/234742/setting-environment-variables-in-linux-using-bash Setting Environment Variables in Linux Using bash].</ref> Any value specifed by an environment variable will be overridden if the corresponding value is specified on the command line.
;STRIDE_DEVICE
: specifies the <tt>--device</tt> argument
;STRIDE_TESTSPACE_URL
: specifies the <tt>--testspace</tt> argument
;STRIDE_TESTSPACE_PROJECT
: specifies the <tt>--project</tt> argument
;STRIDE_TESTSPACE_SPACE
: specifies the <tt>--space</tt> argument
Setting up environment variable for static options will streamline the use of stride.


=== Using a Proxy ===
=== Using a Proxy ===
Line 173: Line 177:


Symptoms of needing to specify a proxy is the following errors:
Symptoms of needing to specify a proxy is the following errors:
<pre>
<pre>
Activation error: 132 Unable to connect to <nowiki>http://activation.s2technologies.com</nowiki> Cannot connect to specified URL (-132)
Unable to proceed. Invalid testspace address or credentials. Couldn't access the specified company.  
Failed performing request: [7] Couldn't connect to server
</pre>
</pre>
<pre>
<pre>
Line 180: Line 186:
</pre>
</pre>


The environment variables are set with the value ''name'':''port'' corresponding to your proxy server. For example, on Windows:
Define the environment variables in format '''<tt><nowiki>host:port</nowiki></tt>'''  where ''host'':''port'' corresponding to your proxy server. For example, on Windows:
  > set HTTP_PROXY=myproxy:8765
  > set HTTP_PROXY=myproxy:8765
would instruct the stride runner to use the proxy named <tt>myproxy</tt> on port <tt>8765</tt> to communicate via HTTP protocol.
> set HTTPS_PROXY=myproxy:8765
 
would instruct the stride runner to use the proxy named <tt>myproxy</tt> on port <tt>8765</tt> to communicate via HTTP and HTTPS protocols.
== License Activation ==
 
The stride executable requires a valid license to run. For more information, see [[Activating Your STRIDE License]].
 
== Examples ==
Refer to [[Running Test Units]] for additional examples.
 
== Notes ==
<references/>
[[Category:Test Units]]
 


[[Category:Reference]]
If your proxy requires authentication use the format '''<tt><nowiki>username:password@host:port</nowiki></tt>''' where ''username'' and ''password'' are your credentials.

Latest revision as of 17:20, 2 April 2018

The stride executable (a.k.a. Stride Runner) runs script or native target-based tests from a desktop (Windows, Linux or FreeBSD) host computer and optionally uploads results to Testspace.

stride [options] [TU...]

Each command line option that accepts an argument should be entered with a space between the option and its corresponding argument; i.e.

stride -o argument --option1 argument1

Input

In order to run tests, you must provide the following information to Runner:

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.
device parameters
This tells how to connect to the target.
tests to run
A set of Test Units and or Test Scripts.

Running

By default, no tests are run. You need to explicitly list them using the --run option.

Order

When explicitly specified, Tests are run in the order in which they are given on the command line.

It is possible to run all Test Units by explicitly specifying a wildcard (*). In that case they are run in alphabetical order.

Rules

  • Test Units are specified by name or wildcard
  • Scripts are specified by relative or absolute file name
  • Tests (scripts or test units) are grouped together within curly braces, i.e. "{" and "}"
  • When specifying more than one Test in a group, each Test instance must be delimited by a semicolon.
  • When a Test accepts parameters they are passed following the Test name in parentheses comma separated, i.e. "myTest(param1, param2)"
  • The output of each Test group is placed within a hierarchy of named suites. (The root suite does not have a name.)
  • The suite into which a Test group is placed is specified immediately before the group, e.g. suitepath{testunitgroup}
  • Hierarchical suite paths are delimited by "/" (forward slash) and are always specified starting from the root.
  • If the same Test is specified to be run more than once, and one or more results are to be written to the same suite, the each conflicting Test name is appended with an incrementing count in the form of "(n)". For example: Results from three runs of TestUnit "myTest" are all written to the root suite. The Tests will be reported with the names "myTest" "myTest(1)" and "myTest(2)".

Wildcard Matching

The following wildcard characters are recognized in Test Unit specifications:

  • * (asterisk) matches all Test Units
  • - (hyphen) matches all remaining Test Units (useful when putting Test Units into suites)

Examples

-r "/{*}"
Run all Test Units and put results into the root-level suite.
-r "/Suite{*}"
Run all tests and put results into a suite named "Suite" that is a child of the root suite.
-r "/{Test1;Test2;Test3}"
Run the Tests named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite.
-r "/{Test1;Test2;Test3}" -r "/SecondPass{Test1}"
Run the Tests named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite. Then run the Test Unit named "Test1" again and put the results into a suite named "SecondPass".
-r "/{Test1;Test2;Test3}" -r "/Remaining{-}"
Run the Test Units named "Test1", "Test2", and "Test3" in the designated order; put results into the root suite. Then run all remaining Test Units and put the results into a suite named "Remaining".
-r "/Suite1/Suite2{TestA; TestB}"
Run the Tests named "TestA" and "TestB", and put the results into a suite named "Suite2" that is a child of a suite named "Suite1" that is a child of the root. Note that we must enclose the specification in quotes since the specification contains a space.
-r "/{TestA(29); TestB(5.67, \"some text\")}"
Run the Tests named "TestA" with parameter 29 and "TestB" with parameters 5.67 and "some text", and put the results into the root suite. Note that we must enclose the specification in quotes since the specification contains spaces and embedded quotes (which needs to be escaped using backslash).
-r "TestX; TestY; TestZ"
This is a special convenience syntax. If the suite and grouping braces are omitted, the app runs the the named Test Units and puts their results put into the root suite.

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 in the current directory, named as "testresult.xml". In addition a "testresult.html" is generated that could be open in a web browser of your choice.
Testspace
Optionally, you may also publish the results to your Testspace upon test completion. Results are uploaded using your Testspace URL and login credentials. You must specify the a destination Testspace project and space names.

Options

Option Description
--database [ -d ] arg Specifies the name of an existing STRIDE database (.sidb) file that will be used for test execution.

This can be a relative or absolute path. If the path contains one or more spaces, it must be enclosed in quotes. Under Windows, both DOS and UNC names are accepted.

As a path delimiter you may use either the forward slash or backslash character. (Forward slashes are typically preferred due to the standard use of the backslash as an escape character.)

--device arg Specifies the parameters to be used to connect to the target device (i.e. TCP:host:port or COMport:rate:mode). For example:
  • TCP:localhost:8000
  • COM7:28800:8N1
  • /dev/ttyS2:57600:8N1
--timeout arg (=0) Specifies a watchdog timeout (in seconds) per single test function or test method.

Default value is 0. (0 = infinite timeout)

--run [ -r ] arg Specifies a list of Test Units or Scripts to execute and their order of execution with optional report grouping by suite. You may specify this option many times on the command line to include multiple groupings in a single test. A named Test Suite may be specified more than once to run it multiple times. See Input section above for more details.

Any nameless positional option is treated as this option.

--trace [ -t ] arg (=txt) Specifies if and how to trace on target instrumentation (functions, messages and test points/logs).

The following types of tracing formats are supported:

  • "txt" - single-entry-per-line plain text file
  • "yml" - YAML formated file
  • "-" - interactive single-entry-per-line plain text

With the exception of the interactive type all others are attached as an annotation to the output file.
Default value is "txt".

--trace_timeout arg Specifies a trace timeout (in seconds).
--upload [ -u ] arg (=start) Specifies if and how to upload the results to Testspace. Arg specifies type of upload;

The following types of uploads are supported:

  • "full" - This causes a new result set to be created and marked complete.
  • "start" - This is used to create a new result set and mark it incomplete. An upload of this type should be followed by zero or more uploads that add results and one final upload that finishes the result set.
  • "add" - This is used to add more data to an existing incomplete result set. The result set will still be marked incomplete after this upload type.
  • "finish" - This is used to add more data to an existing incomplete result set and mark it complete. This is the last step in creating a result set from multiple executions.

Default value is "start".

--testspace arg Specifies the Testspace URL to which the results will be uploaded, expressed in the following form:

user:pwd@<domain>.testspace.com/<project>/<space>
Where 'domain' is your organization's subdomain, and 'project' and 'space' are the names of related project and space.

--result arg Name of the output XML result file and optionally, when uploading, the result set name along with folder path (default "root").

The following ways to specify are supported:

  • "myfile.xml" - set both, output XML result file and result set name, to be the same.
  • "myname|" - set the result set name only, use the default "testresult.xml" as output XML result file.
  • "|myfile.xml" - set the output XML result file only, let Testspace to choose the result set name.
  • "myname|myfile.xml" - set both, result set name and output XML result file, to be different names.
  • "myname/path/to/folder|myfile.xml" - set both, result set name and output XML result file, to be different and upload under an explicit folder path.
  • "/path/to/folder|myfile.xml" - set the output XML result file, let Testspace to choose the result set name but upload under an explicit folder path.

Default value is "testresult.xml".

--list Lists all Test Units and intercepted Functions in the specified Stride database to standard out.
--diagnostics Performs a set of built-in diagnostic tests on the target. See Running Diagnostics for details.
--log_level arg (=warn) Controls the target source Test Logs level.

The following levels are supported:

  • "all" - enables all logging
  • "info" - enables only INFO and higher
  • "warn" - enables only WARN and higher
  • "err" - enables only ERROR and higher
  • "off" - disables all logging

Default value is "warn".

--options_file arg Specifies a file from which the program reads command line options. The format is the same as the command line except that options may be split across multiple lines. Lines in an options file that begin with the character '#' are ignored.
--version Prints version information to the console.
--dry Dry run, just validate the input without device connection or test execution.


Using a Proxy

If you access the Internet via an HTTP proxy, you must set the environment variables HTTP_PROXY and HTTPS_PROXY to specify the name and port of the proxy server.

Symptoms of needing to specify a proxy is the following errors:

Unable to proceed. Invalid testspace address or credentials. Couldn't access the specified company. 
Failed performing request: [7] Couldn't connect to server
Unable to proceed. Failed performing request: [6] Couldn’t resolve host name

Define the environment variables in format host:port where host:port corresponding to your proxy server. For example, on Windows:

> set HTTP_PROXY=myproxy:8765
> set HTTPS_PROXY=myproxy:8765

would instruct the stride runner to use the proxy named myproxy on port 8765 to communicate via HTTP and HTTPS protocols.

If your proxy requires authentication use the format username:password@host:port where username and password are your credentials.