<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.stridewiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marku</id>
	<title>STRIDE Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.stridewiki.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Marku"/>
	<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Special:Contributions/Marku"/>
	<updated>2026-04-27T09:36:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14615</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14615"/>
		<updated>2015-07-09T13:54:39Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;#color:#0067A5&amp;quot;&amp;gt; &amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt; Stride™ Wiki &amp;lt;/font&amp;gt; &amp;lt;/span&amp;gt; &lt;br /&gt;
__NOTOC__&lt;br /&gt;
Stride is a test framework for writing C/C++ test cases executing on a device. For an overview of Stride [[Stride Overview| &#039;&#039;&#039;click here&#039;&#039;&#039;]].&lt;br /&gt;
&lt;br /&gt;
== [[Test Implementation]] ==&lt;br /&gt;
* [[Test Unit]]&lt;br /&gt;
* [[Test Pragmas]]&lt;br /&gt;
* [[Test Macros]]&lt;br /&gt;
* [[Notes]]&lt;br /&gt;
* [[Parameterized_Test_Units | Parameters]]&lt;br /&gt;
* [[File Transfer Services | Remoting Files]]&lt;br /&gt;
* [[Test_Documentation_in_C/C%2B%2B | Documenting Tests]]&lt;br /&gt;
* [[Running Tests]]&lt;br /&gt;
* [[Runtime Test Services | Test Services]]&lt;br /&gt;
&lt;br /&gt;
== [[Test Doubles]] ==&lt;br /&gt;
* [[Test Double]]&lt;br /&gt;
* [[Scl function | Function Pragma]]&lt;br /&gt;
* [[Name Mangling]]&lt;br /&gt;
&lt;br /&gt;
== [[Test Points]] ==&lt;br /&gt;
* [[Test Point]]&lt;br /&gt;
* [[Expectations | Expectations]]&lt;br /&gt;
* [[Test_Point_Testing_in_C/C%2B%2B | Writing Tests]]&lt;br /&gt;
* [[Test Log | Test Logs]]&lt;br /&gt;
&lt;br /&gt;
== [[Testing with Perl]] ==&lt;br /&gt;
* [[Test Script]]&lt;br /&gt;
* [[Perl Script APIs | Test API]]&lt;br /&gt;
* [[Perl Script Snippets | Examples]]&lt;br /&gt;
&lt;br /&gt;
== [[Installation]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Framework Setup]]&lt;br /&gt;
* [[Windows SDK]]&lt;br /&gt;
* [[Posix SDK]]&lt;br /&gt;
* [[Runtime Integration]]&lt;br /&gt;
* [[Build Integration]]&lt;br /&gt;
* [[Sample Stride Target Settings | Build Target settings examples]]&lt;br /&gt;
* [[STRIDE Extensions for Visual Studio | Build with Visual Studio]]&lt;br /&gt;
&lt;br /&gt;
== [[Training]] == &lt;br /&gt;
* [[Stride Sandbox]]&lt;br /&gt;
* [[Training Overview]]&lt;br /&gt;
* [[Training Basics]]&lt;br /&gt;
* [[Training Advanced]]&lt;br /&gt;
* [[Training Perl]]&lt;br /&gt;
&lt;br /&gt;
== [[Reference]] ==&lt;br /&gt;
* [[STRIDE Runner| Runner]]&lt;br /&gt;
* [[STRIDE Build Tools | Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime | Runtime]]&lt;br /&gt;
* [[Platform Abstraction Layer | Platform Abstraction Layer (PAL)]]&lt;br /&gt;
* [[Intercept Module | Intercept Module (IM)]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
* [[Pragmas]]&lt;br /&gt;
* [[Release Notes]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Main_Page(old)&amp;diff=14614</id>
		<title>Main Page(old)</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Main_Page(old)&amp;diff=14614"/>
		<updated>2015-07-09T13:53:45Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;&amp;lt;span style=&amp;quot;#color:#0067A5&amp;quot;&amp;gt; &amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt; Welcome to the STRIDE™ Wiki &amp;lt;/font&amp;gt; &amp;lt;/span&amp;gt;   STRIDE™ has been designed specifically for &amp;#039;&amp;#039;&amp;#039;On-Target White-box Testing&amp;#039;&amp;#039;&amp;#039;. S...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;#color:#0067A5&amp;quot;&amp;gt; &amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt; Welcome to the STRIDE™ Wiki &amp;lt;/font&amp;gt; &amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
STRIDE™ has been designed specifically for &#039;&#039;&#039;On-Target White-box Testing&#039;&#039;&#039;. STRIDE™ is &#039;&#039;&#039;test infrastructure&#039;&#039;&#039; used by engineers to implement and execute [[Types_of_Testing_Supported_by_STRIDE | &#039;&#039;&#039;tests&#039;&#039;&#039;]] for validating embedded software executing On-Target. The STRIDE™ system consists of a [[STRIDE Overview | &#039;&#039;&#039;framework&#039;&#039;&#039;]] for testing and a [[STRIDE_Test_Space | &#039;&#039;&#039;hosted web application&#039;&#039;&#039;]] for storing and analyzing test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For an overview of STRIDE™ [[STRIDE Overview| PLEASE CLICK HERE]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:screen_icon.png]] [[STRIDE Overview Video | STRIDE Overview Screencast]]&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot; style=&amp;quot;border-right: rgb(187,204,204) 1px solid; border-top: rgb(187,204,204) 1px solid; vertical-align: top; border-left: rgb(187,204,204) 1px solid; border-bottom: rgb(187,204,204) 1px solid&amp;quot; cellspacing=&amp;quot;5&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Source Instrumentation | Instrumentation]] &lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Tests in Script| Tests in Script]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Test Units| Tests in C/C++]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Running Tests | Running Tests]] &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 1&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Source Instrumentation Overview | Overview]]&lt;br /&gt;
* [[Test Point (old) | Test Points]]&lt;br /&gt;
* [[Test Log | Test Logs]]&lt;br /&gt;
* [[Function_Capturing  | Functions]]&lt;br /&gt;
* [[Expectations | Expectations]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 2&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Modules Overview | Overview]]&lt;br /&gt;
* [[Perl Script APIs | Perl Script APIs]]&lt;br /&gt;
* [[Perl Script Snippets]]&lt;br /&gt;
* [[Script_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 3&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Units Overview | Overview]]&lt;br /&gt;
* [[Test Units]]&lt;br /&gt;
* [[Test Macros | Test Macros]]&lt;br /&gt;
* [[Test API | Test APIs]]&lt;br /&gt;
* [[C/C%2B%2B_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 4&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Running Tests (old) | Running Tests]]&lt;br /&gt;
* [[Listing Functions and Test Units|Listing Tests]]&lt;br /&gt;
* [[Tracing  | Tracing]]&lt;br /&gt;
* [[Organizing Tests into Suites | Organizing Tests]]&lt;br /&gt;
* [[Setting up your CI Environment | Setting up CI]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category: Test Space|Test Space]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Reference | Reference]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Installation | Installation]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Training | Training]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ROW 2 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 5&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[STRIDE_Test_Space|Overview]]&lt;br /&gt;
* [[User Administration]]&lt;br /&gt;
* [[Creating Test Spaces]]&lt;br /&gt;
* [[Uploading Test Results]]&lt;br /&gt;
* [[Notifications]]&lt;br /&gt;
* [[Reporting Entities]]&lt;br /&gt;
* [[Creating And Using Baselines | Using Baselines]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 6&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[STRIDE Runner]]&lt;br /&gt;
* [[STRIDE Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime]]&lt;br /&gt;
* [[STRIDE Off-Target Environment]]&lt;br /&gt;
* [[Platform Abstraction Layer]]&lt;br /&gt;
* [[Intercept Module]]&lt;br /&gt;
* [[Test Unit Pragmas]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 7&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Installation Overview | Overview]]&lt;br /&gt;
* [[Desktop Installation | Framework setup]]&lt;br /&gt;
* [[Runtime Integration]]&lt;br /&gt;
* [[Build Integration]]&lt;br /&gt;
* [[Stride Sandbox]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 8&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Training Getting Started | Getting Started]]&lt;br /&gt;
* [[Training Test Macros | Test Macros]]&lt;br /&gt;
* [[Training File IO | File IO]]&lt;br /&gt;
* [[Training Parameters | Parameters]]&lt;br /&gt;
* [[Training Fixturing | Fixturing]]&lt;br /&gt;
* [[Training Expectations | Test Points]]&lt;br /&gt;
* [[Training Doubling | Test Doubles]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click here for [[:Category:Release Notes| Release Notes]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Reference&amp;diff=14454</id>
		<title>Reference</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Reference&amp;diff=14454"/>
		<updated>2015-07-07T16:46:13Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[STRIDE Runner| Runner]]&lt;br /&gt;
* [[STRIDE Build Tools | Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime | Runtime]]&lt;br /&gt;
* [[Platform Abstraction Layer | Platform Abstraction Layer (PAL)]]&lt;br /&gt;
* [[Intercept Module | Intercept Module (IM)]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
* [[Pragmas]]&lt;br /&gt;
* [[Release Notes]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Release_Notes&amp;diff=14452</id>
		<title>Release Notes</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Release_Notes&amp;diff=14452"/>
		<updated>2015-07-07T16:45:20Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;__NOTOC__ This page documents the changes in STRIDE releases.  = 5.0.02x = The code name for this release is &amp;#039;&amp;#039;South Side&amp;#039;&amp;#039;. Released on Apr 21, 2015.   == Testspace integrati...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
This page documents the changes in STRIDE releases.&lt;br /&gt;
&lt;br /&gt;
= 5.0.02x =&lt;br /&gt;
The code name for this release is &#039;&#039;South Side&#039;&#039;. Released on Apr 21, 2015. &lt;br /&gt;
&lt;br /&gt;
== Testspace integration ==&lt;br /&gt;
Stride Runner integration with [http://help.testspace.com Testspace] has been highly improved.&lt;br /&gt;
&lt;br /&gt;
=== Fixes ===&lt;br /&gt;
&#039;&#039;This section describes defects which have been corrected in STRIDE and the customer tracking number associated with them, if any, in brackets [].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* [[s2scompile|STRIDE Compiler]] doesn&#039;t support Microsoft preprocessor specific &amp;quot;token-pasting&amp;quot;.&lt;br /&gt;
* [[STRIDE Runner]] fails on execute test modules with Perl 5.18. &lt;br /&gt;
&lt;br /&gt;
=== Tests in Scripts ===&lt;br /&gt;
* Added support for Perl version 5.20. &lt;br /&gt;
* Support for Perl versions 5.14 and older is not provided by default but is available on demand. &lt;br /&gt;
&lt;br /&gt;
=== Runtime ===&lt;br /&gt;
* STRIDE Host Release &#039;&#039;&#039;5.0.02x&#039;&#039;&#039; is compatible with the Runtime Version &#039;&#039;&#039;5.0.02&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;All of the Runtime files have been modified. It is recommended that you update them all.&#039;&#039;&lt;br /&gt;
* &#039;&#039;All [[Posix SDK]] files have been modified.&#039;&#039;&lt;br /&gt;
* &#039;&#039;All [[Windows SDK]] files have been modified.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Minor and Patch releases ==&lt;br /&gt;
&lt;br /&gt;
=== 5.0.02a ===&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* [[STRIDE Runner]] local generated result file incorrectly renders links in non-IE browsers. &lt;br /&gt;
* [[STRIDE Runner]] incorrectly merges result files with BOM.&lt;br /&gt;
* [[STRIDE Runner]] may error out in environments with multi-line variable values.&lt;br /&gt;
* [[STRIDE Runner]] may not upload results to Testspace in case of HTTP redirect.&lt;br /&gt;
* [[STRIDE Runner]] may crash on results upload in case the Testspace server returns an error.&lt;br /&gt;
* [[STRIDE Runner]] is not able to access Testspace Project/Space with white space in the name.&lt;br /&gt;
* [[STRIDE Runner]] may silently fail or return incorrect error code.&lt;br /&gt;
* [[STRIDE Runner]] times out on target connection when using a custom transport.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following [[Posix SDK]] files have been modified:&#039;&#039;&lt;br /&gt;
 palIO.c&lt;br /&gt;
 palOS.c&lt;br /&gt;
 stride.c&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following [[Windows SDK]] files have been modified:&#039;&#039;&lt;br /&gt;
 palIO.c&lt;br /&gt;
&lt;br /&gt;
= 5.0.01x = &lt;br /&gt;
&lt;br /&gt;
The code name of this release is&#039;&#039;Warm Waters&#039;&#039;. Released on Jun 3, 2014. &lt;br /&gt;
&lt;br /&gt;
== Testspace Schema execution ==&lt;br /&gt;
Now the [[STRIDE Runner]] allows execution of tests defined in a [http://help.testspace.com Testspace] schema.&lt;br /&gt;
&lt;br /&gt;
=== Input Parameters ===&lt;br /&gt;
Passing input parameters per test suite has been implemented. A new Test Class [[ Runtime_Test_Services#method_GetParam | method ]] and C [[ Runtime_Test_Services#srTestGetParam| function]] in the [[STRIDE Runtime]] allow accessing them by name.&lt;br /&gt;
&lt;br /&gt;
=== Interactive Mode ===&lt;br /&gt;
The [[File_Transfer_Services | File Transfer]] subsystem has been updated to allow remote (host) interactive prompt and process execution. In addition the [[STRIDE Runner]] now supports single test case execution.&lt;br /&gt;
&lt;br /&gt;
== Change Details ==&lt;br /&gt;
&lt;br /&gt;
=== Fixes ===&lt;br /&gt;
&#039;&#039;This section describes defects which have been corrected in STRIDE and the customer tracking number associated with them, if any, in brackets [].&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Handling of input payload in [[STRIDE Runner]] times slower compared to output.&lt;br /&gt;
* [[STRIDE Runner]] generates report with incorrect timestamps for kernel [[Test Log | Test Logs]].&lt;br /&gt;
* [[STRIDE Runner]] may generate a report xml with invalid file annotation content.&lt;br /&gt;
&lt;br /&gt;
=== Tests in Scripts ===&lt;br /&gt;
* Dynamic Test Suites are not supported no more.&lt;br /&gt;
&lt;br /&gt;
=== Tests in C/C++ ===&lt;br /&gt;
* Dynamic Test Suites are not supported no more.&lt;br /&gt;
* [[Test_Macros#Assertions|Test Assertion macro]] now by default (controlled via compiler define) throw exceptions.&lt;br /&gt;
* [[Test_Macros#Notes|Test Annotation macros]] and [[Test_Log|Test Log macros]] now by default (controlled via compiler define) support variadic arguments.&lt;br /&gt;
* Error handling has been improved.&lt;br /&gt;
&lt;br /&gt;
=== Runtime ===&lt;br /&gt;
* STRIDE Host Release &#039;&#039;&#039;5.0.01x&#039;&#039;&#039; is compatible with the Runtime Version &#039;&#039;&#039;5.0.01&#039;&#039;&#039;&lt;br /&gt;
* SLAP has been move in the core Runtime.&lt;br /&gt;
* &amp;lt;tt&amp;gt;srCOMPLEX_TARGET&amp;lt;/tt&amp;gt; is set by default now.&lt;br /&gt;
* &#039;&#039;All of the Runtime files have been modified. It is recommended that you update them all.&#039;&#039;&lt;br /&gt;
* &#039;&#039;All [[Posix SDK]] files have been modified.&#039;&#039;&lt;br /&gt;
* &#039;&#039;All [[Windows SDK]] files have been modified.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Minor and Patch releases ==&lt;br /&gt;
&lt;br /&gt;
=== 5.0.01a ===&lt;br /&gt;
&#039;&#039;New features and improvements:&#039;&#039; &lt;br /&gt;
* [[STRIDE Runner]] now can run executables (optionally in the background) and consume directly JUnit xml report. &lt;br /&gt;
* [[STRIDE Runner]] now reports overall suite duration.&lt;br /&gt;
* [[STRIDE Runner]] has been updated to handle common suite input defined in folder settings.&lt;br /&gt;
* [[STRIDE Runner]] now has improved error handling and supports &amp;quot;dry&amp;quot; run (for fast input validation).&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* Incremental &amp;quot;finish&amp;quot; upload via [[STRIDE Runner]] does not complete the result set.&lt;br /&gt;
&lt;br /&gt;
=== 5.0.01b ===&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* [[s2sinstrument|STRIDE Instrumentation Generator]] produces incorrect code for function callbacks in a 64-bit build.&lt;br /&gt;
* [[Perl_Script_APIs#Assertions|Perl Assertions]] error out with undefined input. &lt;br /&gt;
* [[STRIDE Runner]] does not honor timeout for executables and scripts.&lt;br /&gt;
* [[STRIDE Runner]] errors out in &amp;quot;dry&amp;quot; run with no database.&lt;br /&gt;
* [[STRIDE Extensions for Visual Studio]] error out when solution is opened from a UNC location. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following Runtime files have been modified:&#039;&#039;&lt;br /&gt;
 srcgutil.h&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following [[Windows SDK]] files have been modified:&#039;&#039;&lt;br /&gt;
 stride.props&lt;br /&gt;
 stride.targets&lt;br /&gt;
&lt;br /&gt;
=== 5.0.01c ===&lt;br /&gt;
&#039;&#039;New features and improvements:&#039;&#039; &lt;br /&gt;
* [[STRIDE Runner]] traversal of a [http://help.testspace.com Testspace] schema has been optimized.&lt;br /&gt;
* [[STRIDE Runner]] now shows the path to local report file and the URL to the uploaded Testspace results.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* [[s2scompile|STRIDE Compiler]] is unable to compile header files with forwardly declared enums.&lt;br /&gt;
* [[s2scompile|STRIDE Compiler]] calculates incorrect payload offset for user defined type arguments in a test class constructor.&lt;br /&gt;
* [[s2scompile|STRIDE Compiler]] errors out on enums with out of range values.&lt;br /&gt;
* [[STRIDE Runner]] is unable to explicitly run &amp;quot;disabled&amp;quot; folder/suite.&lt;br /&gt;
* [[STRIDE Runner]] creates empty xsl file on host with no internet connection.&lt;br /&gt;
* Static analysis of [[Windows SDK]] source results in a warning.&lt;br /&gt;
* [[STRIDE Runtime]] memory pool allocation returns misaligned pointers on 64-bit targets. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following Runtime files have been modified:&#039;&#039;&lt;br /&gt;
 srcfg.h&lt;br /&gt;
 srtest.h&lt;br /&gt;
 srmem.c&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following [[Windows SDK]] files have been modified:&#039;&#039;&lt;br /&gt;
 stride.c&lt;br /&gt;
&lt;br /&gt;
=== 5.0.01d ===&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* [[Windows SDK]] may deadlock on timer stop.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following [[Windows SDK]] files have been modified:&#039;&#039;&lt;br /&gt;
 palOS.c&lt;br /&gt;
&lt;br /&gt;
=== 5.0.01e ===&lt;br /&gt;
&#039;&#039;New features and improvements:&#039;&#039; &lt;br /&gt;
* [[STRIDE Runner]] now generates a result file that can directly open in any major browser. &lt;br /&gt;
* [[STRIDE Runner]] now can upload to a sub-folder in [http://help.testspace.com/ Testspace].&lt;br /&gt;
* A new set of [[STRIDE Runner]] Testspace folder settings is defined. Some older settings are deprecated.&lt;br /&gt;
* New [[Training]] samples are provided.&lt;br /&gt;
&#039;&#039;Defects corrected and the customer tracking number associated with them, if any, in brackets []:&#039;&#039; &lt;br /&gt;
* [[Test_Point_Testing_in_C/C%2B%2B#srTestPointCheck|srTestPointCheck]] with more expected than actual may never return&lt;br /&gt;
* A &amp;lt;code&amp;gt;[section]&amp;lt;/code&amp;gt; in Testspace schema &amp;quot;root&amp;quot; settings hides [[STRIDE Runner]] command line options.&lt;br /&gt;
* [[STRIDE Runner]] is unable to init/connect when running a Testspace schema sub-folder/suite&lt;br /&gt;
* [[STRIDE Runner]] mangles non-STRIDE test suite input&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;The following Runtime files have been modified:&#039;&#039;&lt;br /&gt;
 srtest.c&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Stride_Sandbox&amp;diff=14449</id>
		<title>Stride Sandbox</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Stride_Sandbox&amp;diff=14449"/>
		<updated>2015-07-07T16:31:43Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* SDK Makefile */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Stride&#039;s cross-platform capabilities make it possible to use Stride in a &#039;&#039;&#039;host-only&#039;&#039;&#039; configuration called the &#039;&#039;&#039;Sandbox&#039;&#039;&#039;. This environment facilitates &#039;&#039;self-training&#039;&#039;, &#039;&#039;evaluations&#039;&#039;, and &#039;&#039;trying stuff&#039;&#039;. It frees you from external hardware dependencies and provides for a rapid &#039;&#039;edit-build-test&#039;&#039; cycle.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Sandbox&#039;&#039;&#039; utilizes the framework&#039;s SDK that can be built and executed on the host system. When using the SDK Makefile a simulated target &#039;&#039;native application&#039;&#039; is generated, which we call a &#039;&#039;&#039;Test Application (TestApp)&#039;&#039;&#039;. The Stride Runner application executes on the same host and communicates with the &#039;&#039;&#039;TestApp&#039;&#039;&#039; process over a TCP/IP connection. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Sandbox&#039;&#039;&#039; requires the Stride framework package to be setup on your desktop. Refer to the [[Framework Setup | Framework Setup]] article for more information. It also requires that your desktop contains one of the following &#039;&#039;&#039;compilers&#039;&#039;&#039;:&lt;br /&gt;
* For Windows, Microsoft Visual Studio 2008 or later is required. If you don&#039;t already have Visual Studio, the free [http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express Visual C++ Express] can be used (download [http://www.microsoft.com/express/download/#webInstall here]). &amp;lt;i&amp;gt;In case you have [http://www.cygwin.com Cygwin] installed, the [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] could be used as an alternative.&amp;lt;/i&amp;gt;&lt;br /&gt;
* For Linux and FreeBSD, the [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] (included by default in almost all distros) is required.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
=== SDK Makefile ===&lt;br /&gt;
The SDK Makefile is set up by &#039;&#039;default&#039;&#039; so that all &amp;lt;tt&amp;gt;.c&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files found in the directory &amp;lt;tt&amp;gt;SDK\Windows\sample_src&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;SDK/Posix/sample_src&amp;lt;/tt&amp;gt; for Linux/FreeBSD) are included in the compile and link of the &#039;&#039;&#039;testapp&#039;&#039;&#039; target.&lt;br /&gt;
&lt;br /&gt;
Further--as a pre-compilation step--any &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files found in &amp;lt;tt&amp;gt;sample_src&amp;lt;/tt&amp;gt; are submitted to the [[STRIDE Build Tools]]. This will result in &lt;br /&gt;
* the detection of [[Test Pragmas| test pragmas]] used to declare Test Suites in these &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files&lt;br /&gt;
* the generation of a database (&amp;lt;tt&amp;gt;.sidb&amp;lt;/tt&amp;gt;) file required for executing tests&lt;br /&gt;
* the generation of an [[Intercept Module]] required for executing tests&lt;br /&gt;
&lt;br /&gt;
=== Build Steps ===&lt;br /&gt;
To begin, be sure that TestApp is not running then perform the following steps:&lt;br /&gt;
&lt;br /&gt;
====Linux/FreeBSD====&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Build the test app using GNU make&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -C &amp;quot;$STRIDE_DIR/SDK/Posix/src&amp;quot; testapp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note that the following artifacts are produced by the build:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;$STRIDE_DIR/SDK/Posix/out/bin/TestApp&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the test application&lt;br /&gt;
;&amp;lt;tt&amp;gt;$STRIDE_DIR/SDK/Posix/out/TestApp.sidb&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the STRIDE interface database file which contains metadata describing the interfaces remoted by the test app (along with other data)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
NOTE: &#039;&#039;In case you have [http://www.cygwin.com Cygwin] and [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] installed and prefer to use it, please follow the build steps for Linux (see previous section) and ignore the one in here.&#039;&#039;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If using Microsoft Visual Studio, open a [http://msdn.microsoft.com/en-us/library/ms235639(v=vs.100).aspx Visual Studio Command Prompt] to ensure that the compiler and linker are on your PATH.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Build the test app using the supplied GNU make. (You will get Makefile errors if you use the default make.)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;%STRIDE_DIR%\SDK\Windows\bin\make&amp;quot; -C &amp;quot;%STRIDE_DIR%\SDK\Windows\src&amp;quot; testapp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note that the following artifacts are produced by the build:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;%STRIDE_DIR%\SDK\Windows\out\bin\TestApp.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the test application&lt;br /&gt;
;&amp;lt;tt&amp;gt;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the STRIDE interface database file which contains metadata describing the interfaces remoted by the test app (along with other data)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
The test app we just built does not have any user tests in it. At this point it provides a starting point for test that we will subsequently add.&lt;br /&gt;
&lt;br /&gt;
However, a set of diagnostic tests that verify operation of the STRIDE runtime itself are always built into the generated TestApp executable. If desired (we recommend you to do so) you could run them by doing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Invoke the TestApp. In order to see TestApp&#039;s output, we recommend that you manually run in a console window (or Windows equivalent): &lt;br /&gt;
;Linux/FreeBSD&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$STRIDE_DIR/SDK/Posix/out/bin/TestApp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
;Windows&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
%STRIDE_DIR%\SDK\Windows\out\bin\TestApp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
(...or launch from the file explorer)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Note TestApp&#039;s output upon startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
STRIDE Test Console Application.&lt;br /&gt;
Enter &#039;Ctrl+C&#039; to Quit.&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
Listening on TCP port 8000&lt;br /&gt;
starting up...&lt;br /&gt;
&amp;quot;_srThread&amp;quot; thread started.&lt;br /&gt;
&amp;quot;stride&amp;quot; thread started.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;From a second console window, invoke &amp;lt;tt&amp;gt;[[STRIDE_Runner|stride]]&amp;lt;/tt&amp;gt; as follows, to verify connectivity with the test app and STRIDE runtime operation:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
;Linux/FreeBSD&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --database=&amp;quot;$STRIDE_DIR/SDK/Posix/out/TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
;Windows&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --database=&amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the tests run you will see output in both the TestApp (target) and stride (host) console windows.&lt;br /&gt;
&lt;br /&gt;
The host console window output is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Executing diagnostics...&lt;br /&gt;
Connecting to device (TCP:localhost:8000)...&lt;br /&gt;
  runtime version: 5.0.xy &lt;br /&gt;
  test suite &amp;quot;/Link&amp;quot;&lt;br /&gt;
    Loopback ..........&lt;br /&gt;
    Payload Fragmentation&lt;br /&gt;
    Stub-Proxy Deadlock&lt;br /&gt;
    Target Characteristics&lt;br /&gt;
    &amp;gt; 4 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 777.77 ms.&lt;br /&gt;
  test suite &amp;quot;/Stat&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 74.98 ms.&lt;br /&gt;
  test suite &amp;quot;/Time&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 2559.23 ms.&lt;br /&gt;
Disconnecting from device...&lt;br /&gt;
  --------------------------------------------------------------------- &lt;br /&gt;
  Summary: 8 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 3411.98 ms.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note the Summary results shown in the host output; all in use tests should pass.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To exit TestApp, give the target window focus and enter &amp;lt;tt&amp;gt;Ctrl-C&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build Problems==&lt;br /&gt;
This page describes several common problems encountered when building a STRIDE TestApp using the Sandbox and suggested solutions.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 1 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Windows, when attempting to build the testapp from the command line, you encounter an error indicating that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
‘cl’ is not recognized as an internal or external command,&lt;br /&gt;
operable program or batch file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\STRIDE\SDK\Windows\src&amp;gt;..\bin\make.exe testapp&lt;br /&gt;
cl -c -nologo -W4 -D_UNICODE -DUNICODE -DWIN32 -D_CONSOLE -DUNDER_NT -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../o&lt;br /&gt;
ut/src” -I”../sample_src” -GS -Zi -DNDEBUG -MD -O2 -D_LIB -DSTRIDE_STATIC -Fd”../out/desktop-Windows_NT-obj//cl.pdb” -Fo”../out/desktop-Windows_NT-o&lt;br /&gt;
bj/srapi.o” ”../../Runtime/srapi.c” &lt;br /&gt;
‘cl’ is not recognized as an internal or external command,&lt;br /&gt;
operable program or batch file.&lt;br /&gt;
make: *** [../out/desktop-Windows_NT-obj/srapi.o] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
Microsoft Visual Studio 2008 or later is not installed or you are not building from a [http://msdn.microsoft.com/en-us/library/ms235639(v=VS.90).aspx Visual Studio Command Prompt]. &lt;br /&gt;
&lt;br /&gt;
;Solution&lt;br /&gt;
Make sure you have Microsoft Visual Studio 2008 or later installed.&lt;br /&gt;
&lt;br /&gt;
To ensures that the compiler and linker are on your PATH open a Visual Studio Command prompt: &lt;br /&gt;
* Click the Start button, point to All Programs, Microsoft Visual Studio 20XX, Visual Studio Tools, and then click Visual Studio 20XX Command Prompt.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 2 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Windows, when attempting to build the testapp from the command line the following errors are observed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
syntax error near unexpected token `(&#039;&lt;br /&gt;
syntax error near unexpected token `(&#039;&lt;br /&gt;
syntax error: unexpected end of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\stride\SDK\Windows\src&amp;gt;..\bin\make testapp&lt;br /&gt;
/bin/sh: -c: line 0: syntax error near unexpected token `(&#039;&lt;br /&gt;
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir &amp;quot;../out/src&amp;quot;) ELSE mkdir &amp;quot;../out&amp;quot; &amp;amp;&amp;amp; mkdir &amp;quot;../out/src&amp;quot;.&#039;&lt;br /&gt;
/bin/sh: -c: line 0: syntax error near unexpected token `(&#039;&lt;br /&gt;
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir &amp;quot;../out/src&amp;quot;) ELSE mkdir &amp;quot;../out&amp;quot; &amp;amp;&amp;amp; mkdir &amp;quot;../out/src&amp;quot;.&#039;&lt;br /&gt;
/bin/sh: -c: line 1: syntax error: unexpected end of file&lt;br /&gt;
make: *** [cleanapp] Error 258&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
This error occurs because gnu make on Windows will search for an Unix shell (&amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;csh&amp;lt;/tt&amp;gt;) anywhere in your PATH when executing shell commands and only default to DOS shell (&amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;) when no Unix shell is found. The sandbox Makefile uses DOS shell syntax, so when a Unix shell is found on your PATH, this results to errors like above.&lt;br /&gt;
&lt;br /&gt;
Most commonly, this problem is caused by an installation of [http://en.wikipedia.org/wiki/Cygwin Cygwin], though it can also be caused by an installation of the QNX Software Development Platform.&lt;br /&gt;
 &lt;br /&gt;
;Solution&lt;br /&gt;
&lt;br /&gt;
Explicitly specify the DOS shell by invoking make like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
..\bin\make SHELL=%ComSpec% testapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the value of %ComSpec% should be &amp;lt;tt&amp;gt;C:\Windows\system32\cmd.exe&amp;lt;/tt&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An alternative is to remove any directories from your PATH that contain an Unix shell executable or otherwise prevent such from being found. (e.g. rename its parent directory).&lt;br /&gt;
&lt;br /&gt;
=== Make Error 3 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Linux, when attempting to build the testapp from the command line, the following error is observed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++: command not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# make testapp&lt;br /&gt;
g++ -c -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../out/src” -I”../sample_src” -fPIC -D_DEBUG -O0 -g3 -Wall -o ”../out/i386-Linux-obj/srtestpp.obj” ”../../Runtime/srtestpp.cpp” &lt;br /&gt;
/bin/sh: g++: command not found&lt;br /&gt;
make: *** [../out/i386-Linux-obj/srtestpp.obj] Error 127&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
The C++ compiler, &amp;lt;tt&amp;gt;g++&amp;lt;/tt&amp;gt; can&#039;t be found on your PATH.&lt;br /&gt;
&lt;br /&gt;
Most commonly, this problem is caused by not having a complete installation of [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection].&lt;br /&gt;
 &lt;br /&gt;
;Solution&lt;br /&gt;
Make sure you have a complete GNU Compiler Collection installed.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 4 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
When building the testapp from the command line, you see the following compiler errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
../out/src/strideIM.cpp(50) : error C3861: &#039;_srTestResultCountReset&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(54) : error C3861: &#039;_srTestSendFinalStatus&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(56) : error C3861: &#039;_srTestAddToTotal&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(56) : error C3861: &#039;_srTestResultGetTotals&#039;: identifier not found&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
You are using an outdated version of the STRIDE build tools.&lt;br /&gt;
&lt;br /&gt;
You can see which version of the tools were used to generate your STRIDE sources by looking at the top of the strideIM.cpp source file. The comment block at the top of the file shows this version.&lt;br /&gt;
&lt;br /&gt;
;Solution&lt;br /&gt;
Remove the old tools and/or change your path so that the current tools are used.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Runtime_Integration&amp;diff=14448</id>
		<title>Runtime Integration</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Runtime_Integration&amp;diff=14448"/>
		<updated>2015-07-07T16:28:18Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Including the STRIDE Runtime */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This page discusses the first step in an overall STRIDE framework integration. The ultimate goals are to extend your target build process to:&lt;br /&gt;
* Incorporate the STRIDE Runtime source files in your target build&lt;br /&gt;
* Configure compiler settings&lt;br /&gt;
* Add code to target source to start and stop STRIDE runtime threads&lt;br /&gt;
* Incorporate the STRIDE Build Tools in your make process as a pre-compilation step&lt;br /&gt;
&lt;br /&gt;
Here we incorporate the [[STRIDE Runtime]] in your target application build without tests. In the second and last step, we add the STRIDE [[Build Tools]] to the mix and hook up the test-running harnessing.&lt;br /&gt;
&lt;br /&gt;
After building the target with the STRIDE Runtime in place, we will run stride from a remote host computer to verify connectivity and runtime operation.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations ===&lt;br /&gt;
The STRIDE target environment offers lots of flexibility to accommodate different target scenarios. For an initial target integration, we recommend that you pursue the simplest STRIDE configuration that will yield results. Once this configuration is successfully integrated you can make adjustments as desired.&lt;br /&gt;
&lt;br /&gt;
=== Integrating STRIDE Into Your Target Build ===&lt;br /&gt;
To add the STRIDE Runtime to your build process, the following changes must be made:&lt;br /&gt;
&lt;br /&gt;
* Secure a PAL targeted to your target operating system&lt;br /&gt;
* Configure the PAL I/O parameters to conform the your target hardware&lt;br /&gt;
* Include the STRIDE runtime source files in the software build&lt;br /&gt;
* Edit your target application&#039;s source code to start the runtime and I/O thread(s)&lt;br /&gt;
&lt;br /&gt;
== Securing a PAL ==&lt;br /&gt;
The [[Platform_Abstraction_Layer|Platform Abstraction Layer (PAL)]] provides the glue between the STRIDE Runtime and services offered by your OS. It is the only piece of the runtime that is customized between operating systems.&lt;br /&gt;
&lt;br /&gt;
Fully tested PALs are provided for Posix and Windows, included as &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;palIO.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;palOS.c&amp;lt;/tt&amp;gt; in their respective [[Framework_Setup#SDK|SDK]]. &lt;br /&gt;
&lt;br /&gt;
== Configuring PAL I/O parameters ==&lt;br /&gt;
If your target will communicate with the host computer via the default of TCP/IP port 8000, you can skip this step.&lt;br /&gt;
&lt;br /&gt;
Otherwise, refer to &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt; that comes with your PAL for a list of configuration parameters.&lt;br /&gt;
&lt;br /&gt;
== Including the STRIDE Runtime ==&lt;br /&gt;
The [[STRIDE Runtime]] is distributed in source form. The source files are included with each [[Framework_Setup#SDK|SDK]] under &amp;quot;Runtime&amp;quot; directory. Files in that directories should be included in your target build.&lt;br /&gt;
&lt;br /&gt;
If you are using an S2-supplied SDK, additional required sources can be found in the SDK&#039;s &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
* PAL implementation&lt;br /&gt;
** &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;palIO.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;palOS.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Convenience functions (these wrap low-level PAL/Runtime calls)&lt;br /&gt;
** &amp;lt;tt&amp;gt;stride.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;stride.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build script&lt;br /&gt;
** &amp;lt;tt&amp;gt;Makefile&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build script (Makefile) supplied with an SDK allows building of the runtime source into a library that could then be linked with the target application.&lt;br /&gt;
&lt;br /&gt;
=== C/C++ Feature Support ===&lt;br /&gt;
By default the C source in the Runtime was written with the presumption that the target C compiler and C Runtime (CRT) library supports &#039;&#039;&#039;wchar_t&#039;&#039;&#039;, &#039;&#039;&#039;long long&#039;&#039;&#039;, &#039;&#039;&#039;long double&#039;&#039;&#039;, &#039;&#039;&#039;safe snprintf&#039;&#039;&#039;, and &#039;&#039;&#039;variadic macros&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default the C++ source in the Runtime was written with the presumption that the target C++ compiler can handle &#039;&#039;&#039;namespaces&#039;&#039;&#039; and &#039;&#039;&#039;exceptions&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
If desired the user can specify different configuration by using &#039;&#039;&#039;-D&#039;&#039;&#039; compiler options:&lt;br /&gt;
&lt;br /&gt;
 -DsrCRT_HAS_WCHAR_T=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_LONG_LONG=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_LONG_DBL=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_SNPRINTF=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_VA_ARGS=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCPP_HAS_NAMESPACE=&amp;lt;0|1&amp;gt; &lt;br /&gt;
 -DsrCPP_HAS_EXCEPTION=&amp;lt;0|1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where 0=disabled and 1=enabled.&lt;br /&gt;
&lt;br /&gt;
=== STRIDE Feature Control ===&lt;br /&gt;
Any application&#039;s source file referencing STRIDE source should be compiled with addition &#039;&#039;STRIDE_ENABLED&#039;&#039; switch (preprocessor directive):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cc -DSTRIDE_ENABLED=1 file.c&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of the &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; macro controls all STRIDE-related sources and macros. If undefined (or defined as zero), STRIDE-related sources are excluded and STRIDE-related macros are left undefined. This provides a simple means of including and excluding test-related entities in your production build.&lt;br /&gt;
&lt;br /&gt;
== Target Source Changes ==&lt;br /&gt;
&lt;br /&gt;
Your target source must be edited to include code that initializes and uninitializes the runtime. The code is typically added to your &amp;lt;tt&amp;gt;main()&amp;lt;/tt&amp;gt; function, but the only requirement is that the initialization takes place before the host computer connects and the uninitialization occurs before the process terminates.&lt;br /&gt;
&lt;br /&gt;
Please refer to the standard pre-packaged [[Framework_Setup#SDK|SDK]] for examples of a startup sequence. Briefly it should be something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* STRIDE runtime includes */&lt;br /&gt;
#include &amp;lt;stride.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
 &lt;br /&gt;
    /* initialize the STRIDE subsytem using default I/O */&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
    strideIO_t io = {strideIO_t::strideDEFAULT};&lt;br /&gt;
#else&lt;br /&gt;
    strideIO_t io = {strideDEFAULT};&lt;br /&gt;
#endif&lt;br /&gt;
    if (strideInit(&amp;amp;io) != srTRUE)&lt;br /&gt;
        return -1;&lt;br /&gt;
 &lt;br /&gt;
    /* start any IM thread */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* target application code here */&lt;br /&gt;
    ...&lt;br /&gt;
 &lt;br /&gt;
    /* stop all STRIDE threads and uninitialize STRIDE subsystem */&lt;br /&gt;
    strideUninit();&lt;br /&gt;
&lt;br /&gt;
    return 0;   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you implement a custom PAL then here is an example of the startup code using direct PAL and STRIDE Runtime API calls instead of the stride.c/.h wrappers provided by the SDK:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* STRIDE runtime includes */&lt;br /&gt;
#include &amp;lt;palcfg.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sr.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
    palDWORD dwRTNID;&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* initialize the PAL handler */&lt;br /&gt;
    if (palOSInit() != palTRUE) &lt;br /&gt;
        return -1;&lt;br /&gt;
&lt;br /&gt;
    /* initialize the PAL IO handler */&lt;br /&gt;
    if (palIOInit(PAL_DEFAULT_DEVICE_NAME) != palTRUE) &lt;br /&gt;
    {&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* initialize STRIDE Runtime */&lt;br /&gt;
    if (srInit() != srOK)&lt;br /&gt;
    {&lt;br /&gt;
        palIOShutdown();&lt;br /&gt;
        srUninit();&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* start the Runtime thread first */&lt;br /&gt;
    palDWORD dwRTNID = /* create thread with function srThread() */;&lt;br /&gt;
    if (dwRTNID == 0) &lt;br /&gt;
    {&lt;br /&gt;
        palIOShutdown();&lt;br /&gt;
        srUninit();&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* start any IM thread */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* target application code here */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* stop all IM threads */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* stop Runtime thread */&lt;br /&gt;
    palNotify(dwRTNID, palSTOP_EVENT);&lt;br /&gt;
&lt;br /&gt;
    /* uninitialize STRIDE subsystem */&lt;br /&gt;
    palIOShutdown();&lt;br /&gt;
    srUninit();&lt;br /&gt;
    palOSUninit();&lt;br /&gt;
&lt;br /&gt;
    return 0;   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the Runtime Integration==&lt;br /&gt;
Once the instrumented target is successfully built, start the target application. On a separate host computer, connected to the target via TCP/IP (or serial port if so configured), run &#039;&#039;&#039;[[STRIDE_Runner|stride]]&#039;&#039;&#039; as follows (substitute the &amp;lt;tt&amp;gt;--device&amp;lt;/tt&amp;gt; option argument as needed):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --device=&amp;lt;device_address&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By specifying &amp;lt;tt&amp;gt;--diagnostics&amp;lt;/tt&amp;gt; without also specifying a database, we instruct stride to test for connectivity with the target.&lt;br /&gt;
&lt;br /&gt;
If all is well, the following will be output to the host window (the reported runtime version may be different than that shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connecting to device...&lt;br /&gt;
  runtime version: 5.x.yy&lt;br /&gt;
Disconnecting from device...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Runtime_Integration&amp;diff=14447</id>
		<title>Runtime Integration</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Runtime_Integration&amp;diff=14447"/>
		<updated>2015-07-07T16:27:45Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overview==&lt;br /&gt;
&lt;br /&gt;
This page discusses the first step in an overall STRIDE framework integration. The ultimate goals are to extend your target build process to:&lt;br /&gt;
* Incorporate the STRIDE Runtime source files in your target build&lt;br /&gt;
* Configure compiler settings&lt;br /&gt;
* Add code to target source to start and stop STRIDE runtime threads&lt;br /&gt;
* Incorporate the STRIDE Build Tools in your make process as a pre-compilation step&lt;br /&gt;
&lt;br /&gt;
Here we incorporate the [[STRIDE Runtime]] in your target application build without tests. In the second and last step, we add the STRIDE [[Build Tools]] to the mix and hook up the test-running harnessing.&lt;br /&gt;
&lt;br /&gt;
After building the target with the STRIDE Runtime in place, we will run stride from a remote host computer to verify connectivity and runtime operation.&lt;br /&gt;
&lt;br /&gt;
=== Recommendations ===&lt;br /&gt;
The STRIDE target environment offers lots of flexibility to accommodate different target scenarios. For an initial target integration, we recommend that you pursue the simplest STRIDE configuration that will yield results. Once this configuration is successfully integrated you can make adjustments as desired.&lt;br /&gt;
&lt;br /&gt;
=== Integrating STRIDE Into Your Target Build ===&lt;br /&gt;
To add the STRIDE Runtime to your build process, the following changes must be made:&lt;br /&gt;
&lt;br /&gt;
* Secure a PAL targeted to your target operating system&lt;br /&gt;
* Configure the PAL I/O parameters to conform the your target hardware&lt;br /&gt;
* Include the STRIDE runtime source files in the software build&lt;br /&gt;
* Edit your target application&#039;s source code to start the runtime and I/O thread(s)&lt;br /&gt;
&lt;br /&gt;
== Securing a PAL ==&lt;br /&gt;
The [[Platform_Abstraction_Layer|Platform Abstraction Layer (PAL)]] provides the glue between the STRIDE Runtime and services offered by your OS. It is the only piece of the runtime that is customized between operating systems.&lt;br /&gt;
&lt;br /&gt;
Fully tested PALs are provided for Posix and Windows, included as &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;palIO.c&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;palOS.c&amp;lt;/tt&amp;gt; in their respective [[Framework_Setup#SDK|SDK]]. &lt;br /&gt;
&lt;br /&gt;
== Configuring PAL I/O parameters ==&lt;br /&gt;
If your target will communicate with the host computer via the default of TCP/IP port 8000, you can skip this step.&lt;br /&gt;
&lt;br /&gt;
Otherwise, refer to &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt; that comes with your PAL for a list of configuration parameters.&lt;br /&gt;
&lt;br /&gt;
== Including the STRIDE Runtime ==&lt;br /&gt;
The [[Runtime_Reference|STRIDE Runtime]] is distributed in source form. The source files are included with each [[Framework_Setup#SDK|SDK]] under &amp;quot;Runtime&amp;quot; directory. Files in that directories should be included in your target build.&lt;br /&gt;
&lt;br /&gt;
If you are using an S2-supplied SDK, additional required sources can be found in the SDK&#039;s &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory:&lt;br /&gt;
&lt;br /&gt;
* PAL implementation&lt;br /&gt;
** &amp;lt;tt&amp;gt;palcfg.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;palIO.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;palOS.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Convenience functions (these wrap low-level PAL/Runtime calls)&lt;br /&gt;
** &amp;lt;tt&amp;gt;stride.c&amp;lt;/tt&amp;gt;&lt;br /&gt;
** &amp;lt;tt&amp;gt;stride.h&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Build script&lt;br /&gt;
** &amp;lt;tt&amp;gt;Makefile&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The build script (Makefile) supplied with an SDK allows building of the runtime source into a library that could then be linked with the target application.&lt;br /&gt;
&lt;br /&gt;
=== C/C++ Feature Support ===&lt;br /&gt;
By default the C source in the Runtime was written with the presumption that the target C compiler and C Runtime (CRT) library supports &#039;&#039;&#039;wchar_t&#039;&#039;&#039;, &#039;&#039;&#039;long long&#039;&#039;&#039;, &#039;&#039;&#039;long double&#039;&#039;&#039;, &#039;&#039;&#039;safe snprintf&#039;&#039;&#039;, and &#039;&#039;&#039;variadic macros&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default the C++ source in the Runtime was written with the presumption that the target C++ compiler can handle &#039;&#039;&#039;namespaces&#039;&#039;&#039; and &#039;&#039;&#039;exceptions&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
If desired the user can specify different configuration by using &#039;&#039;&#039;-D&#039;&#039;&#039; compiler options:&lt;br /&gt;
&lt;br /&gt;
 -DsrCRT_HAS_WCHAR_T=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_LONG_LONG=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_LONG_DBL=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_SNPRINTF=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCRT_HAS_VA_ARGS=&amp;lt;0|1&amp;gt;&lt;br /&gt;
 -DsrCPP_HAS_NAMESPACE=&amp;lt;0|1&amp;gt; &lt;br /&gt;
 -DsrCPP_HAS_EXCEPTION=&amp;lt;0|1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where 0=disabled and 1=enabled.&lt;br /&gt;
&lt;br /&gt;
=== STRIDE Feature Control ===&lt;br /&gt;
Any application&#039;s source file referencing STRIDE source should be compiled with addition &#039;&#039;STRIDE_ENABLED&#039;&#039; switch (preprocessor directive):&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cc -DSTRIDE_ENABLED=1 file.c&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The definition of the &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; macro controls all STRIDE-related sources and macros. If undefined (or defined as zero), STRIDE-related sources are excluded and STRIDE-related macros are left undefined. This provides a simple means of including and excluding test-related entities in your production build.&lt;br /&gt;
&lt;br /&gt;
== Target Source Changes ==&lt;br /&gt;
&lt;br /&gt;
Your target source must be edited to include code that initializes and uninitializes the runtime. The code is typically added to your &amp;lt;tt&amp;gt;main()&amp;lt;/tt&amp;gt; function, but the only requirement is that the initialization takes place before the host computer connects and the uninitialization occurs before the process terminates.&lt;br /&gt;
&lt;br /&gt;
Please refer to the standard pre-packaged [[Framework_Setup#SDK|SDK]] for examples of a startup sequence. Briefly it should be something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* STRIDE runtime includes */&lt;br /&gt;
#include &amp;lt;stride.h&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
 &lt;br /&gt;
    /* initialize the STRIDE subsytem using default I/O */&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
    strideIO_t io = {strideIO_t::strideDEFAULT};&lt;br /&gt;
#else&lt;br /&gt;
    strideIO_t io = {strideDEFAULT};&lt;br /&gt;
#endif&lt;br /&gt;
    if (strideInit(&amp;amp;io) != srTRUE)&lt;br /&gt;
        return -1;&lt;br /&gt;
 &lt;br /&gt;
    /* start any IM thread */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* target application code here */&lt;br /&gt;
    ...&lt;br /&gt;
 &lt;br /&gt;
    /* stop all STRIDE threads and uninitialize STRIDE subsystem */&lt;br /&gt;
    strideUninit();&lt;br /&gt;
&lt;br /&gt;
    return 0;   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you implement a custom PAL then here is an example of the startup code using direct PAL and STRIDE Runtime API calls instead of the stride.c/.h wrappers provided by the SDK:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* STRIDE runtime includes */&lt;br /&gt;
#include &amp;lt;palcfg.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sr.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv)&lt;br /&gt;
{&lt;br /&gt;
    palDWORD dwRTNID;&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* initialize the PAL handler */&lt;br /&gt;
    if (palOSInit() != palTRUE) &lt;br /&gt;
        return -1;&lt;br /&gt;
&lt;br /&gt;
    /* initialize the PAL IO handler */&lt;br /&gt;
    if (palIOInit(PAL_DEFAULT_DEVICE_NAME) != palTRUE) &lt;br /&gt;
    {&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* initialize STRIDE Runtime */&lt;br /&gt;
    if (srInit() != srOK)&lt;br /&gt;
    {&lt;br /&gt;
        palIOShutdown();&lt;br /&gt;
        srUninit();&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* start the Runtime thread first */&lt;br /&gt;
    palDWORD dwRTNID = /* create thread with function srThread() */;&lt;br /&gt;
    if (dwRTNID == 0) &lt;br /&gt;
    {&lt;br /&gt;
        palIOShutdown();&lt;br /&gt;
        srUninit();&lt;br /&gt;
        palOSUninit();&lt;br /&gt;
        return -1;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /* start any IM thread */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* target application code here */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* stop all IM threads */&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* stop Runtime thread */&lt;br /&gt;
    palNotify(dwRTNID, palSTOP_EVENT);&lt;br /&gt;
&lt;br /&gt;
    /* uninitialize STRIDE subsystem */&lt;br /&gt;
    palIOShutdown();&lt;br /&gt;
    srUninit();&lt;br /&gt;
    palOSUninit();&lt;br /&gt;
&lt;br /&gt;
    return 0;   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Testing the Runtime Integration==&lt;br /&gt;
Once the instrumented target is successfully built, start the target application. On a separate host computer, connected to the target via TCP/IP (or serial port if so configured), run &#039;&#039;&#039;[[STRIDE_Runner|stride]]&#039;&#039;&#039; as follows (substitute the &amp;lt;tt&amp;gt;--device&amp;lt;/tt&amp;gt; option argument as needed):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --device=&amp;lt;device_address&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By specifying &amp;lt;tt&amp;gt;--diagnostics&amp;lt;/tt&amp;gt; without also specifying a database, we instruct stride to test for connectivity with the target.&lt;br /&gt;
&lt;br /&gt;
If all is well, the following will be output to the host window (the reported runtime version may be different than that shown):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Connecting to device...&lt;br /&gt;
  runtime version: 5.x.yy&lt;br /&gt;
Disconnecting from device...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Framework_Setup&amp;diff=14446</id>
		<title>Framework Setup</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Framework_Setup&amp;diff=14446"/>
		<updated>2015-07-07T16:26:34Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* SDK */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction = &lt;br /&gt;
The packages described below contain all of the &#039;&#039;source&#039;&#039; and &#039;&#039;binary&#039;&#039; components required to&lt;br /&gt;
* setup a desktop with the &#039;&#039;&#039;STRIDE Runner&#039;&#039;&#039;&lt;br /&gt;
* integrate the &#039;&#039;&#039;STRIDE Runtime&#039;&#039;&#039; with the target device&lt;br /&gt;
* add the &#039;&#039;&#039;STRIDE Compiler&#039;&#039;&#039; (aka &#039;&#039;Build tools&#039;&#039;) to the software build system.&lt;br /&gt;
&lt;br /&gt;
The desktops supported are Windows, Linux, and FreeBSD.&lt;br /&gt;
&lt;br /&gt;
= Packages =&lt;br /&gt;
Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):&lt;br /&gt;
;Windows (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-windows_5.x.yy.zip&amp;lt;/tt&amp;gt;&lt;br /&gt;
;Linux (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-linux_5.x.yy.tgz&amp;lt;/tt&amp;gt;&lt;br /&gt;
;FreeBSD (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-freebsd_5.x.yy.tgz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the appropriate installation instructions below.&lt;br /&gt;
&lt;br /&gt;
= Windows =&lt;br /&gt;
&lt;br /&gt;
The following installation example assumes the the installation package is located in your root directory and that the directory &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; exists. You can choose to install to a different location (all instructions below assume you are installing into &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The example uses the open source [http://www.7-zip.org/ 7-Zip] utility to unzip the archive.&lt;br /&gt;
&lt;br /&gt;
 cd \stride&lt;br /&gt;
 &amp;quot;\Program Files\7-Zip\7z&amp;quot; x ..\STRIDE_framework-windows_5.x.yy.zip&lt;br /&gt;
&lt;br /&gt;
Once unzipped, files will have been installed under the &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Updated PATH ===&lt;br /&gt;
As a final step, you will need to update your &amp;lt;tt&amp;gt;[http://en.wikipedia.org/wiki/Path_(variable) PATH]&amp;lt;/tt&amp;gt; environment variable to include &amp;lt;tt&amp;gt;\stride\bin&amp;lt;/tt&amp;gt;. &lt;br /&gt;
For instructions on modifying it, please see [http://support.microsoft.com/kb/310519 http://support.microsoft.com/kb/310519].&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;Make sure to insert &#039;&#039;&#039;no spaces&#039;&#039;&#039; before and after the semicolon separators(;).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Create/Update STRIDE_DIR===&lt;br /&gt;
&lt;br /&gt;
Verify that the  &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable exists and is set to the root installation directory (&amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt;). If this environment variable does not yet exist, you should create it as a user environment variable.&lt;br /&gt;
&lt;br /&gt;
To confirm installation and display &#039;&#039;help&#039;&#039; run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
 stride -h&lt;br /&gt;
&lt;br /&gt;
=== Uninstalling ===&lt;br /&gt;
To uninstall STRIDE simply:&lt;br /&gt;
* Remove any reference to &amp;lt;tt&amp;gt;\stride\bin&amp;lt;/tt&amp;gt; in your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. &lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
= Linux/FreeBSD =&lt;br /&gt;
&lt;br /&gt;
The following installation example assumes the the installation package is located in your home directory and that the directory &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; exists. You can choose to install to a different location (all instructions below assume you are installing into &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
 cd ~/stride&lt;br /&gt;
 tar -zxvf ../STRIDE_framework-linux_5.x.yy.tgz&lt;br /&gt;
&lt;br /&gt;
Once unzipped, files will have been installed under the &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Updated PATH ===&lt;br /&gt;
As a final step, you will need to update your &amp;lt;tt&amp;gt;[http://en.wikipedia.org/wiki/Path_(variable) PATH]&amp;lt;/tt&amp;gt; environment variable to include &amp;lt;tt&amp;gt;~/stride/bin&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 export PATH=$PATH:~/stride/bin&lt;br /&gt;
&lt;br /&gt;
For other shells, and more information, please see the following articles:&lt;br /&gt;
* [http://www.linuxheadquarters.com/howto/basic/path.shtml http://www.linuxheadquarters.com/howto/basic/path.shtml].&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Environment_variable#UNIX http://en.wikipedia.org/wiki/Environment_variable]&lt;br /&gt;
&lt;br /&gt;
=== Create/Update STRIDE_DIR===&lt;br /&gt;
Verify that the  &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable exists and is set to the root installation directory (&amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt;). If this environment variable does not yet exist, you should automatically set at each login, add to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 export STRIDE_DIR=~/stride&lt;br /&gt;
&lt;br /&gt;
To confirm installation and display &#039;&#039;help&#039;&#039; run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
 stride -h&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;In a 64-bit environment the above may fail with errors like: &amp;lt;code&amp;gt;&amp;quot;/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;ELF interpreter /libexec/ld-elf32.so.1 not found&amp;quot;&amp;lt;/code&amp;gt;. To resolve this issue install the appropriate 32-bit compatibility libraries for your Linux/FreeBSD distribution:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Debian / Ubuntu&lt;br /&gt;
 sudo apt-get install ia32-libs&lt;br /&gt;
 sudo apt-get install ia32-libs-multiarch:i386 (for 12.04 or higher)&lt;br /&gt;
* Fedora / CentOS / RHEL&lt;br /&gt;
 sudo yum -y install glibc.i686 libstdc++.i686&lt;br /&gt;
* FreeBSD&lt;br /&gt;
Make sure to have &amp;lt;code&amp;gt;lib32&amp;lt;/code&amp;gt; installed (via [http://www.freebsd.org/cgi/man.cgi?query=sysinstall&amp;amp;apropos=0&amp;amp;sektion=0&amp;amp;manpath=FreeBSD+8.4-RELEASE&amp;amp;arch=default&amp;amp;format=html sysinstall(8)] - Configure|Distributions|lib32) and have your kernel built with:&lt;br /&gt;
 options 	COMPAT_FREEBSD32	# Compatible with i386 binaries&lt;br /&gt;
&lt;br /&gt;
=== Uninstalling ===&lt;br /&gt;
To uninstall STRIDE simply:&lt;br /&gt;
* Remove any reference to &amp;lt;tt&amp;gt;~/stride/bin&amp;lt;/tt&amp;gt; in your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. &lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
= Directories and Files =&lt;br /&gt;
&lt;br /&gt;
To integrate Stride in to your target build system it is required to understand the directories layout and the files inside then. A quick orientation is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;It&#039;s not necessary to understand the workings of Stride to perform evaluation or training. The framework package contains a [[Stride Sandbox]] that utilizes a SDK that is set up with appropriate options and settings to enable &amp;quot;out of the box&amp;quot; functionality.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains the [[Build Tools|Stride Build Tools]] and the [[Stride Runner]].&lt;br /&gt;
&lt;br /&gt;
The build tools are invoked early on in the target software build process to generate special Stride artifacts that are used in subsequent build steps and later when running tests against the target. When using the Stride Sandbox, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.&lt;br /&gt;
&lt;br /&gt;
The [[Stride Runner]] is the program you use to run tests from the host.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains a set of Stride specific core scripting libraries along with prebuild binaries intended to be used for Perl based test scripts.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;samples&amp;lt;/tt&amp;gt;==&lt;br /&gt;
The Samples directory contains a number of source files used for training and evaluation.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;SDK&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains the sub-directories &amp;lt;tt&amp;gt;Posix/Windows&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Runtime&amp;lt;/tt&amp;gt;, which contain source code that comprises the [[STRIDE Runtime]]. These sources are built in to a static libary (e.g. STRIDE Runtime library - &amp;lt;tt&amp;gt;stride.a/lib&amp;lt;/tt&amp;gt;) as a dependency of your Test Application. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Posix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Windows&amp;lt;/tt&amp;gt; directories contain the target operating system specific source and configuration. If you are interested in the details, consult the articles [[Posix SDK]] and [[Windows SDK]]. Each of them contains the following sub-directories:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;settings&amp;lt;/tt&amp;gt;&lt;br /&gt;
: This directory contains a set of &amp;lt;tt&amp;gt;stride.XXX.s2scompile&amp;lt;/tt&amp;gt; files, where &amp;lt;tt&amp;gt;XXX&amp;lt;/tt&amp;gt; coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the [[s2scompile|STRIDE Compiler]], specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for [[STRIDE_Extensions_for_Visual_Studio|building with Visual Studio]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;&lt;br /&gt;
: This directory contains the source of the target [[Platform Abstraction Layer]] PAL. In addition there is a sample Makefile used to produce a sandbox TestApp.&lt;br /&gt;
&lt;br /&gt;
= Perl Installation (Optional) =&lt;br /&gt;
If you intend to use &#039;&#039;&#039;Test Scripts&#039;&#039;&#039; you will need a recent version of Perl (x86 with threads support) installed. &lt;br /&gt;
&lt;br /&gt;
As of this writing, we support only the 32-bit versions 5.8.9, 5.10.x, 5.12.x, 5.14.x, 5.16.x and 5.18.x of Perl. &lt;br /&gt;
&lt;br /&gt;
== Windows == &lt;br /&gt;
It is required to use the standard 32-bit Perl distributions from [http://www.activestate.com/activeperl ActiveState].&lt;br /&gt;
&lt;br /&gt;
The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:&lt;br /&gt;
&lt;br /&gt;
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]&lt;br /&gt;
&lt;br /&gt;
You can easily install these packages using the [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html ppm tool]. If you access the Internet via a proxy make sure to read [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html#ppm_and_proxies this]. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:&lt;br /&gt;
&lt;br /&gt;
 ppm install PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
== Linux/FreeBSD ==&lt;br /&gt;
We recommend you to use the standard 32-bit Perl distribution that comes with your OS version. In case you need to manually build from source make sure to configure &amp;quot;shared library&amp;quot; (&amp;lt;tt&amp;gt;-Duseshrplib&amp;lt;/tt&amp;gt;), &amp;quot;thread support&amp;quot; (&amp;lt;tt&amp;gt;-Duseithreads&amp;lt;/tt&amp;gt;) and no &amp;quot;64-bit support&amp;quot; (&amp;lt;tt&amp;gt;-Uuse64bitint -Uuse64bitall&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The following additional (non-standard) Perl packages are also required for full functionality of Stride tests in perl:&lt;br /&gt;
&lt;br /&gt;
* [http://search.cpan.org/perldoc/YAML::XS YAML::XS]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]&lt;br /&gt;
&lt;br /&gt;
If your perl is installed in a system directory (&amp;lt;tt&amp;gt;/usr/bin/perl&amp;lt;/tt&amp;gt;, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the [http://www.perl.com/doc/manual/html/lib/CPAN.html CPAN shell]. If you access the Internet via a proxy make sure to set the appropriate [http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Config_Variables CPAN config variables]. To start the shell in interactive mode:&lt;br /&gt;
&lt;br /&gt;
 sudo perl -MCPAN -eshell&lt;br /&gt;
&lt;br /&gt;
Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):&lt;br /&gt;
&lt;br /&gt;
 install PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
The STRIDE perl packages also need to load your system&#039;s &#039;&#039;&#039;libperl.so&#039;&#039;&#039; (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you &#039;&#039;&#039;DO NOT&#039;&#039;&#039; have this shared library on your system, you might need to install a &#039;&#039;libperl-dev&#039;&#039;, &#039;&#039;perl-devel&#039;&#039; or &#039;&#039;perl-libs&#039;&#039; package in order to get it. Here is how you can do that on the console of some Linux distributions:&lt;br /&gt;
&lt;br /&gt;
* Debian / Ubuntu&lt;br /&gt;
 sudo apt-get install libperl-dev&lt;br /&gt;
* Fedora / CentOS / RHEL&lt;br /&gt;
 sudo yum -y install perl-devel&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
Once you have installed Perl we recommend you to run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics Perl --output PerlCheck&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything was properly set up you should get the following output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Executing diagnostics...&lt;br /&gt;
  script &amp;quot;/Perl&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms.&lt;br /&gt;
  ---------------------------------------------------------------------&lt;br /&gt;
  Summary: 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms&lt;br /&gt;
&lt;br /&gt;
Saving result file...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition a report file with name &amp;lt;tt&amp;gt;PerlCheck.xml&amp;lt;/tt&amp;gt; will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14444</id>
		<title>Test Point</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14444"/>
		<updated>2015-07-07T16:04:30Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Write the Test Unit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Source instrumentation is the process by which developers and domain experts selectively instrument the source under test for the purpose of writing test scenarios against the executing application. Implementing tests that leverage source instrumentation is called &#039;&#039;&#039;Expectation Testing&#039;&#039;&#039;. This validation technique is very useful for verifying proper code sequencing based on the software&#039;s internal design. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
/* a test point with no payload */&lt;br /&gt;
srTEST_POINT(&amp;quot;first test point&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with binary payload */&lt;br /&gt;
srTEST_POINT_DATA(&amp;quot;second test point&amp;quot;, myData, sizeofMyData);&lt;br /&gt;
&lt;br /&gt;
/* a test point with simple string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with simple string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with format string %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;c++ test point&amp;quot;, &amp;quot;&amp;quot;) &amp;lt;&amp;lt; &amp;quot;stream input supported under c++&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike traditional unit testing that drives testing based on input parameters and isolating functionality, &#039;&#039;Expectation&#039;&#039; testing is executed within a fully functional software build running on a real target platform. Test Points are not dependent on input parameters, but often leverage the same types of input/output controls used by functional and black-box testing. &lt;br /&gt;
&lt;br /&gt;
Another unique feature of this type of testing is that domain expertise is not required to implement a test. Developers and domain experts use instrumentation to export design knowledge of the software to the entire team. Furthermore, there is no stubbing required, no special logic to generate input parameters, and no advanced knowledge required of how the application software is coded. &lt;br /&gt;
&lt;br /&gt;
To enable effective test coverage, developers and domain experts are required to insert instrumentation at key locations to gain insight and testability. Here are some general suggested source code areas to consider instrumenting:&lt;br /&gt;
* critical function entry/exit points&lt;br /&gt;
* state transitions&lt;br /&gt;
* critical or interesting data transitions (using optional payload to convey data values)&lt;br /&gt;
* callback routines&lt;br /&gt;
* data persistence&lt;br /&gt;
* error conditions&lt;br /&gt;
&lt;br /&gt;
The steps required to implement an Expectation test are the following:&lt;br /&gt;
#[[#Instrumentation | Instrumentation]]&lt;br /&gt;
#[[#Define your Expectations | Define your Expectations]]&lt;br /&gt;
#[[#Write the Test Unit | Write the Test Unit]]&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
To make the software &#039;&#039;testable&#039;&#039;, the first step in the process is for the experts to selectively insert instrumentation macros into the source code. Test Points themselves have nominal impact on the performance of the application – they are only active during test data collection&amp;lt;ref name=&amp;quot;n1&amp;quot;&amp;gt; Test data collection is typically implemented in a low priority background thread. The data is captured in the calling routine&#039;s thread context (no context switch) but processed in the background or on the host. Instrumentation macros return immediately to the caller (i.e. no-op) when testing is not active.&amp;lt;/ref&amp;gt;. Test Points contain names and optional payload data. When Test Points are activated, they are collected in the background, along with timing and any associated data. The set of Test Points hit, their order, timing, and data content can all be used to validate that the software is behaving as expected. [[Test_Log | Test Logs]] can also be added to the source code to provide additional information in the context of an executing test. &lt;br /&gt;
&lt;br /&gt;
To specify a test point you should include the &#039;&#039;&#039;srtest.h&#039;&#039;&#039; header file from the STRIDE Runtime in your compilation unit. The Test Point macros are active only when &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, therefore it is practical to place these macros in-line in production source. When &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is not &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, these macros evaluate to nothing.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Test Point Macros&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_DATA&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;data&#039;&#039;, &#039;&#039;size&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;data&#039;&#039; is a pointer to a byte sequence&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;size&#039;&#039; is the size of the &#039;&#039;data&#039;&#039; in bytes&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_STR&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;message&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&amp;lt;br/&amp;gt;&lt;br /&gt;
When used in the context of a c++ compilation unit, this macro also supports the streaming operator to append to the message string (see example below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Define your Expectations ==&lt;br /&gt;
&lt;br /&gt;
In addition to instrumenting the source code with Test Points, you must also define the [[Expectations]] of the Test Points. This involves defining the list of Test Points expected to be hit during a given test scenario. Expectation can also include any &#039;&#039;&#039;data&#039;&#039;&#039; associated with a Test Point that requires validation.&lt;br /&gt;
&lt;br /&gt;
== Write the Test Unit ==&lt;br /&gt;
Once the source under test has been instrumented and the [[Expectations]] defined, Stride offers a number of techniques that can be used for implementing &#039;&#039;&#039;expectation tests&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* Tests can be written in [[Test_Point_Testing_in_C/C%2B%2B | C or C++]] and executed on the device under test using the Stride framework. &lt;br /&gt;
* Tests can be written in [[Perl_Script_APIs | Perl]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Double&amp;diff=14441</id>
		<title>Test Double</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Double&amp;diff=14441"/>
		<updated>2015-07-07T15:21:29Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;__NOTOC__ The &amp;#039;&amp;#039;Test Double&amp;#039;&amp;#039; feature provides a means for intercepting C/C++ language &amp;#039;&amp;#039;&amp;#039;global functions&amp;#039;&amp;#039;&amp;#039; on the target, and directing the call to a substitute function wi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The &#039;&#039;Test Double&#039;&#039; feature provides a means for intercepting C/C++ language &#039;&#039;&#039;global functions&#039;&#039;&#039; on the target, and directing the call to a substitute function with identical parameters and return value. The use case is a unit test where the function under test uses a function during its execution, and this dependency is simulated by a substitute or double function during testing. The unit test is able to control the substitution of the dependency during run time, and thereby verify the behavior of the function under test.&lt;br /&gt;
The following sample illustrates the relationship of the function under test and a dependency:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.h&lt;br /&gt;
int depend(int x);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.c&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
int depend(int x)&lt;br /&gt;
{&lt;br /&gt;
    return x + x;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// test.h&lt;br /&gt;
int test(int x, int y);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// test.c&lt;br /&gt;
#include &amp;quot;test.h&amp;quot;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
int test(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
    return depend(x) * y;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above sample, &#039;&#039;test()&#039;&#039; is the function under test and &#039;&#039;depend()&#039;&#039; is a dependency candidate for doubling.&lt;br /&gt;
&lt;br /&gt;
The steps required to achieve doubling of a dependency function are as follows:&lt;br /&gt;
#[[#Configuring the Double Using Function Pragma | Configuring the Double Using Function Pragma]] &lt;br /&gt;
#[[#Creating_Double_Intercepts_in_the_IM|Create Double Intercepts in the IM]]&lt;br /&gt;
#[[#Switching_the_Double_Function_During_Runtime|Switch Double Function During Runtime]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Double Using Function Pragma==&lt;br /&gt;
&lt;br /&gt;
The syntax of the [[Scl_function|function pragma]] supports a set of &#039;&#039;&#039;&#039;&#039;optional&#039;&#039;&#039;&#039;&#039; attributes that allow the specification of function interception parameters. When captured for the purpose of interception (&#039;&#039;&#039;intercept-able&#039;&#039;&#039;) the optional arguments are &#039;&#039;&#039;required&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_function(function-name [,context, name-mangling, group-id])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refer to the actual [[Scl_function | function pragma]] definition for an explanation of &lt;br /&gt;
* &#039;&#039;&#039;context&#039;&#039;&#039; - set to &#039;&#039;DEFINITION&#039;&#039; or &#039;&#039;REFERENCE&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;name-mangling&#039;&#039;&#039; - set to &#039;&#039;EXPLICIT&#039;&#039; or &#039;&#039;IMPLICIT&#039;&#039;. Note if set to explicit requires usage of the &#039;&#039;srTEST_INTERCEPT&#039;&#039; macro&lt;br /&gt;
* &#039;&#039;&#039;group-id&#039;&#039;&#039; - user defined to enable or disable interception&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above sample, &#039;&#039;depend()&#039;&#039; needs to be captured via the pragma and enabled for interception in the following manner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend_scl.h&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#pragma scl_function(depend, &amp;quot;DEFINITION&amp;quot;, &amp;quot;IMPLICIT&amp;quot;, &amp;quot;TEST_GROUP&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Double Intercepts in the IM==&lt;br /&gt;
If a function has been configured as a double candidate using the function pragma as outlined in the above step, the [[Build_Tools|Stride Build Tools]] will automatically create the [[Intercept Module]], aka IM, that contains the intercept for the double function. This all happens automatically during the build process. &lt;br /&gt;
&lt;br /&gt;
But to enable the interception the source file containing the &amp;lt;tt&amp;gt;depend()&amp;lt;/tt&amp;gt; implementation &#039;&#039;&#039;must be altered&#039;&#039;&#039; to [[Name_Mangling|mangle the function&#039;s name]] by defining the Group ID and including the generated Intercept Module header file (xxxIM.h):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.c&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
/* define the Group ID before including the IM header */&lt;br /&gt;
#define TEST_GROUP&lt;br /&gt;
#include &amp;quot;strideIM.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
int depend(int x)&lt;br /&gt;
{&lt;br /&gt;
    return x + x;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Switching the Double Function During Runtime==&lt;br /&gt;
In the context of the test unit code the following STRIDE runtime macros, defined in the STRIDE runtime header file &#039;&#039;&#039;srtest.h&#039;&#039;&#039;, could be used for substituting a stub function for a double candidate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
srDOUBLE_SET(fn, fnDbl)&lt;br /&gt;
srDOUBLE_RESET(fn)&lt;br /&gt;
&lt;br /&gt;
srDOUBLE_GET(fn, pfnDbl) // used for more advanced scenarios &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
*&#039;&#039;&#039;fn&#039;&#039;&#039; is the function qualified by &amp;lt;tt&amp;gt;scl_function&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;scl_func&amp;lt;/tt&amp;gt; as a dependency candidate, as above.&lt;br /&gt;
*&#039;&#039;&#039;pfnDbl&#039;&#039;&#039; is a pointer to a object of type &amp;lt;tt&amp;gt;srFunctionDouble_t&amp;lt;/tt&amp;gt;, declared to hold the current value of the active double function.&lt;br /&gt;
*&#039;&#039;&#039;fnDbl&#039;&#039;&#039; is a function that is to be the current active double. &#039;&#039;The function passed in should &#039;&#039;&#039;always&#039;&#039;&#039; match the signature of the dependency candidate specified by &#039;&#039;&#039;fn&#039;&#039;&#039;.&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; the initial value of the current active double is always the dependency candidate function.&lt;br /&gt;
&lt;br /&gt;
=== Example 1 ===&lt;br /&gt;
The following example shows how to double a routine for the lifetime of a C++ Test Unit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; int depend_dbl(int a) { return a * a; }&lt;br /&gt;
&lt;br /&gt;
class Test: public stride::srTest&lt;br /&gt;
{ &lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    Test()&lt;br /&gt;
    {&lt;br /&gt;
        srDOUBLE_SET(depend, depend_dbl);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ~Test()&lt;br /&gt;
    {&lt;br /&gt;
        srDOUBLE_RESET(depend);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    int test1(void) { return test(1, 2); }&lt;br /&gt;
    int test2(void) { return test(5, 6); }&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(Test)&lt;br /&gt;
#pragma scl_function(depend, &amp;quot;DEFINITION&amp;quot;, &amp;quot;IMPLICIT&amp;quot;, &amp;quot;TEST_GROUP&amp;quot;)&lt;br /&gt;
#endif &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 2 ===&lt;br /&gt;
The following example shows how to make a call to the original routine in the context of a double by safely handling any nested doubling:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; int depend_dbl(int a) &lt;br /&gt;
{&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    srFunctionDouble_t fn;&lt;br /&gt;
    srDOUBLE_GET(depend, &amp;amp;fn);&lt;br /&gt;
    srDOUBLE_RESET(depend);&lt;br /&gt;
    ret = depend(a);&lt;br /&gt;
    srDOUBLE_SET(depend, fn);&lt;br /&gt;
    &lt;br /&gt;
    return ret; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=What_is_Unique_About_STRIDE&amp;diff=14439</id>
		<title>What is Unique About STRIDE</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=What_is_Unique_About_STRIDE&amp;diff=14439"/>
		<updated>2015-07-07T15:17:21Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Test Doubles */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;STRIDE was designed by embedded engineers to facilitate implementing and executing &#039;&#039;&#039;On-Target White-box Testing&#039;&#039;&#039;. The various distinctive features describe here make it easy for both developers and testers to participate in validating the software during the development phase. The following is a high-level list of some of the unique features of STRIDE:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== STRIDE works on virtually any target platform ==&lt;br /&gt;
STRIDE&#039;s cross-platform framework facilitates a &#039;&#039;unified testing approach&#039;&#039; for all team members, enabling organizations to standardize on a test workflow that is independent of the target platform being used or what branch of software is being changed.&lt;br /&gt;
&lt;br /&gt;
=== Runtime written in standard C ===&lt;br /&gt;
The [[Runtime_Reference | &#039;&#039;&#039;STRIDE Runtime&#039;&#039;&#039;]] is written in standard C on top of a simple [[Platform_Abstraction_Layer | &#039;&#039;&#039;platform abstraction layer&#039;&#039;&#039;]] that enables it to work across platforms. It can be configured for a single process multi-threading environment or multiple process environments (i.e. Linux, Windows, Embedded RTOS, etc.). It is delivered as source code to be included in the application&#039;s build system. The transport between the host and target is configurable and supports Serial and TCP/IP by default. Custom transports are also available. The runtime has also been tailored specifically to embedded applications, overhead is minimal. It consumes very little memory for table and control block storage. [[Frequently_Asked_Questions_About_STRIDE#What_is_the_size_of_the_STRIDE_Runtime.3F | Resource usage]] is configurable and can be tailored to the limitations of the target platform.&lt;br /&gt;
&lt;br /&gt;
===Integrates With Your Existing Build System ===&lt;br /&gt;
STRIDE also auto-generates [[Intercept_Module | &#039;&#039;&#039;harnessing and remoting logic&#039;&#039;&#039;]] as source code during the make process, removing any dependencies on specific compilers and / or processors.&lt;br /&gt;
&lt;br /&gt;
===Supports Off-Target Testing ===&lt;br /&gt;
Testing can also be conducted using an [[Off-Target_Environment | &#039;&#039;&#039;Off-Target Environment&#039;&#039;&#039;]] which is provided for desktop (Windows, Linux or FreeBSD) host machines. The [[Posix SDK | &#039;&#039;&#039;Posix&#039;&#039;&#039;]] and [[Windows SDK | &#039;&#039;&#039;Windows&#039;&#039;&#039;]] &#039;&#039;SDKs&#039;&#039; allow for a seamless transition between the real target and an Off-Target host environment.&lt;br /&gt;
&lt;br /&gt;
== STRIDE provides built-in automation and reporting ==&lt;br /&gt;
STRIDE enables software builds to be both fully &#039;&#039;functional&#039;&#039; and &#039;&#039;testable&#039;&#039; at the same time. Built-in &#039;&#039;automation and reporting&#039;&#039; is similar in concept to a &#039;&#039;debug build&#039;&#039; except the focus is on testing.&lt;br /&gt;
===Testable Builds===&lt;br /&gt;
The &#039;&#039;testable build&#039;&#039; leverages the existing software build process by integrating into the same &#039;&#039;make system&#039;&#039; used by the development team (no one-off or special builds). Automatically included in the build is test automation controllable from the host. When tests are executed, an xml is generated on the host (and optionally uploaded to Test Space) which includes detailed test results and timing analysis. This xml file uses a custom schema for representing the [[Reporting_Model | &#039;&#039;&#039;hierarchy of results&#039;&#039;&#039;]] (suites, cases, etc.). Also included is a stylsheet specification (which will be written to the same directory as the xml file) that allows the results to be viewed as HTML in a browser.&lt;br /&gt;
&lt;br /&gt;
Developers can easily pre-flight test their source code changes before &#039;&#039;committing&#039;&#039; them to a baseline. Builds can be [[Setting_up_your_CI_Environment | &#039;&#039;&#039;automatically regression tested&#039;&#039;&#039;]] as part of the daily build process.&lt;br /&gt;
&lt;br /&gt;
===Functional Builds===&lt;br /&gt;
The &#039;&#039;testable software&#039;&#039; is still fully functional and works exactly the same as before. Whatever the software image was used for in the past -- system testing, developer debugging, etc. -- is still applicable. The STRIDE [[Test_Units | &#039;&#039;&#039;native test logic&#039;&#039;&#039;]] is separated from the application source code and is NOT executed unless invoked via the [[Stride_Runner | &#039;&#039;&#039;runner&#039;&#039;&#039;]]. The [[Source_Instrumentation_Overview | &#039;&#039;&#039;source instrumentation&#039;&#039;&#039;]] is only active when executing tests. The impact of built-in testability to the software application is nominal.&lt;br /&gt;
&lt;br /&gt;
The application can easily be switched back to a &#039;&#039;non-testable&#039;&#039; build by simply removing the [[Runtime_Integration#STRIDE_Feature_Control | &#039;&#039;&#039;STRIDE_ENABLED&#039;&#039;&#039;]] preprocessor directive and rebuilding. This flag controls all STRIDE related source code and macros; there are no changes required to the build process to enable or disable this functionality.&lt;br /&gt;
&lt;br /&gt;
== STRIDE offers testing techniques for deeper coverage ==&lt;br /&gt;
STRIDE offers numerous testing techniques that enable deeper and more effective testing with less effort.&lt;br /&gt;
===Test Macros===&lt;br /&gt;
[[Test_Macros | Test Macros in native code]] provide one-line shortcuts for validating assertions and automatic report annotation in the case of failures. Test Macros are supported in both C/C++ and [[Perl_Script_APIs#Assertions | our scripting solution]].&lt;br /&gt;
&lt;br /&gt;
===Fixturing===&lt;br /&gt;
Setting up your &#039;&#039;Software Under Test&#039;&#039; to be in the right state for a test is critical for repeatability. STRIDE supports a set of [http://en.wikipedia.org/wiki/Test_fixture &#039;&#039;&#039;Test fixture techniques&#039;&#039;&#039;] that include&lt;br /&gt;
* [[Test_Fixturing_in_C/C%2B%2B#Specifying___Fixturing_Methods | &#039;&#039;&#039;Setup/Teardown&#039;&#039;&#039;]]&lt;br /&gt;
* [[Parameterized_Test_Units | &#039;&#039;&#039;Parameter passing to tests&#039;&#039;&#039;]]&lt;br /&gt;
* [[File_Transfer_Services | &#039;&#039;&#039;Host/Target file transfer&#039;&#039;&#039;]]&lt;br /&gt;
* [[Function_Capturing | &#039;&#039;&#039;Function remoting&#039;&#039;&#039;]]&lt;br /&gt;
* etc. &lt;br /&gt;
&lt;br /&gt;
These techniques encourage best-practices such as partitioning of fixturing code and actual test code, and--in addition--these same techniques can be leveraged to dynamically configure your tests at run-time.&lt;br /&gt;
&lt;br /&gt;
===Expectations===&lt;br /&gt;
STRIDE leverages [[Source_Instrumentation_Overview | &#039;&#039;&#039;source instrumentation&#039;&#039;&#039;]] to provide &#039;&#039; [[Expectations | &#039;&#039;&#039;Expectations&#039;&#039;&#039;]] &#039;&#039;as an additional validation technique that can be applied to the executing software application. The execution sequencing of the code, along with state data, can be automatically validated based on &#039;&#039;what is expected&#039;&#039;. This validation technique does not focus on calling functions / methods but rather verifies &#039;&#039;code sequencing&#039;&#039;. This can span threads, process boundaries, and even multiple targets, as the application(s) is running. Leveraging simple macros -- called [[Test_Point | &#039;&#039;&#039;Test Points&#039;&#039;&#039;]] -- developers strategically instrument the source under test.&lt;br /&gt;
&lt;br /&gt;
The test validation can be implemented in both [[Expectation_Tests_in_C/C%2B%2B | &#039;&#039;&#039;C/C++ on the target&#039;&#039;&#039;]] and [[Perl_Script_APIs#STRIDE::Test | &#039;&#039;&#039;Perl script on the host&#039;&#039;&#039;]]. In either case, the validation is done without impacting the application&#039;s performance (the on-target test code is executed in a background thread and scripts are executed on the host machine). When failures do occur, context is provided with the file name and associated line number of the failed expectations. This type of validation can be applied to a wide-range of testing scenarios:&lt;br /&gt;
* State Machines&lt;br /&gt;
* Data flow through system components&lt;br /&gt;
* Sequencing between threads&lt;br /&gt;
* Drivers that don&#039;t return values&lt;br /&gt;
* and much more ...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Software Quality Assurance (SQA)&#039;&#039; can also leverage [[Expectations | &#039;&#039;&#039;Expectations&#039;&#039;&#039;]] as part of their existing functional / system testing. Because the [[Stride_Runner | &#039;&#039;&#039;runner&#039;&#039;&#039;]] is a command line utility, it is easily controlled from existing test infrastructure. SQA can use the  [[Source_Instrumentation_Overview | &#039;&#039;&#039;instrumentation&#039;&#039;&#039;]] to create their own [[Reporting_Model#Suites | &#039;&#039;&#039;test suite&#039;&#039;&#039;]] using scripting that executes in concert with existing test automation.&lt;br /&gt;
&lt;br /&gt;
===Test Doubles===&lt;br /&gt;
For more advanced testing scenarios, dependencies can be [[Test_Double | &#039;&#039;&#039;doubled&#039;&#039;&#039;]]. This feature provides a means for intercepting C/C++ global functions on the target and substituting a stub, fake, or mock. The substitution is all controllable via the runtime, allowing the software to continue executing normally when not running a test.&lt;br /&gt;
&lt;br /&gt;
===Other Features===&lt;br /&gt;
There are numerous other features that can be leveraged to facilitate deeper test coverage: &lt;br /&gt;
* Remoting global functions for script based API testing&lt;br /&gt;
* Built-in logging on test execution&lt;br /&gt;
* Dynamic test / suite creation&lt;br /&gt;
* Seamless publishing to [[STRIDE_Test_Space | &#039;&#039;&#039;Test Space&#039;&#039;&#039;]]&lt;br /&gt;
* and much [[Test_API | &#039;&#039;&#039; more ... &#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
== STRIDE supports test implementation in C/C++ and Script ==&lt;br /&gt;
The test validation can be implemented in both &#039;&#039;native code&#039;&#039; on the target and &#039;&#039;script&#039;&#039; on the host. &lt;br /&gt;
&lt;br /&gt;
===Tests in C/C++===&lt;br /&gt;
Writing API/Unit tests in [[Test_Units_Overview | &#039;&#039;&#039;native code&#039;&#039;&#039;]] is the simplest way to begin validating the software. There is no new language to learn, no proprietary editor, and your normal programming workflow is not interrupted. Also there is no special APIs required to register tests, suites, etc. Just write your test in any combination of C/C++ and the auto-generated [[Intercept_Module | &#039;&#039;&#039;intercept module&#039;&#039;&#039;]] via the [[Build_Tools | &#039;&#039;&#039;STRIDE build tools&#039;&#039;&#039;]] takes care of everything. Tests from separate teams are automatically aggregated by the system -- no coordination is required. &lt;br /&gt;
&lt;br /&gt;
This type of testing works well for:&lt;br /&gt;
&lt;br /&gt;
* Calling APIs directly&lt;br /&gt;
* Validating C++ classes&lt;br /&gt;
* Isolating modules &lt;br /&gt;
* Critical processing / timing&lt;br /&gt;
* and much more...&lt;br /&gt;
===Tests in Script===&lt;br /&gt;
STRIDE also supports writing tests in [[Test_Modules_Overview | &#039;&#039;&#039;Perl script&#039;&#039;&#039;]]. When writing test scripts there are minimal dependencies on the software build process. Tests can also validate global functions, setup conditions from the host, etc. &lt;br /&gt;
&lt;br /&gt;
Scripts are well suited for Integration Testing focusing on:&lt;br /&gt;
&lt;br /&gt;
* State Machines&lt;br /&gt;
* Data flow through system components&lt;br /&gt;
* Sequencing between threads&lt;br /&gt;
* and much more...&lt;br /&gt;
&lt;br /&gt;
In either case, the validation is done without impacting the application&#039;s performance.&lt;br /&gt;
&lt;br /&gt;
== STRIDE includes Web-based test results management ==&lt;br /&gt;
When executing &#039;&#039;&#039;tests&#039;&#039;&#039;, results can be uploaded to [[STRIDE_Test_Space | &#039;&#039;&#039;STRIDE Test Space&#039;&#039;&#039;]] for persistence and analysis. Test result data can be uploaded manually (using the web interface) or automatically using the [[Stride_Runner | &#039;&#039;&#039;Runner&#039;&#039;&#039;]].&lt;br /&gt;
===Centralized Hosting===&lt;br /&gt;
Hosting test results in a &#039;&#039;central location&#039;&#039; with easy access via a browser enables the entire team to better participate in ensuring quality during the ongoing development process. [[STRIDE_Test_Space#Results_View | &#039;&#039;&#039;Reports&#039;&#039;&#039;]] containing test results, timing, [[Tracing | &#039;&#039;&#039;tracing logs&#039;&#039;&#039;]], and built-in test documentation (supported in both [[Test_API#Test_Documentation | &#039;&#039;&#039;C/C++&#039;&#039;&#039;]] and [[Perl_Script_APIs#Documentation | &#039;&#039;&#039;Perl&#039;&#039;&#039;]]) all correlated together enhances the context for all team members to manage testing and optimize resolving failures.&lt;br /&gt;
===Team Collaboration===&lt;br /&gt;
Team collaboration on testing activities is also facilitated with auto-generated email [[Notifications | &#039;&#039;&#039;notifications&#039;&#039;&#039;]] and [[STRIDE_Test_Space#Messages | &#039;&#039;&#039;messaging&#039;&#039;&#039;]]. Emails contain links to test failures where file names and line numbers are provided to aid in resolution. Messaging allows team members to more effectively communicate on the specifics of test results while minimizing information required in traditional emails, status reports, etc. &lt;br /&gt;
&lt;br /&gt;
[[Category: Overview]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_API&amp;diff=14438</id>
		<title>Test API</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_API&amp;diff=14438"/>
		<updated>2015-07-07T15:16:08Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The APIs for testing in C/C++ are documented in the following articles:&lt;br /&gt;
&lt;br /&gt;
* [[Test Point  Testing in C/C++|Test Point Testing API]] (for writing native test point validation tests)&lt;br /&gt;
* [[Runtime Test Services|Runtime Test Services API]] (for dynamic test result manipulation)&lt;br /&gt;
* [[File  Transfer Services|File Transfer API]] (for host file manipulation from the device under test)&lt;br /&gt;
* [[Test Fixturing in C/C++|Test Fixturing]] (for test unit fixturing in native code)&lt;br /&gt;
* [[Test  Documentation in C/C++|Test Documentation]] (how to document your native test units)&lt;br /&gt;
* [[Test Double|Test Doubles]] (for advanced dependency interception/function mocking in native code)&lt;br /&gt;
&lt;br /&gt;
[[Category:Test Units]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Stride_Overview&amp;diff=14437</id>
		<title>Stride Overview</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Stride_Overview&amp;diff=14437"/>
		<updated>2015-07-07T14:26:19Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&#039;&#039;&#039;Stride™&#039;&#039;&#039; is a [http://en.wikipedia.org/wiki/XUnit xUnit-style] test framework for C/C++ software comprised of an external test &#039;&#039;Runner&#039;&#039; , &#039;&#039;Runtime&#039;&#039; source code library, and a set of &#039;&#039;Build Tools&#039;&#039;. It was designed with a specific focus on enabling tests to be executed on a device using a fully functional build. This means that the software works the same as before, but also has built-in tests that can be invoked on-demand by the test &#039;&#039;Runner&#039;&#039;. Stride has also been integrated with [http://www.testspace.com Testspace] for test content management.  &lt;br /&gt;
&lt;br /&gt;
Stride&#039;s unique host-target architecture allows easier and better On-Target/Device White-box testing. Software builds automatically become more testable; facilitating deeper code coverage opportunities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Stride Overview.jpg | 600px | center | Stride block diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Runner ====&lt;br /&gt;
Stride includes a lightweight [[Stride_Runner | &#039;&#039;&#039;Runner&#039;&#039;&#039;]] application that is a host-based command-line utility for interactive and automated test execution. It also integrates seamlessly with [http://www.testspace.com Testspace] for &#039;&#039;test content management&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Runtime====&lt;br /&gt;
Stride also contains a [[STRIDE Runtime | &#039;&#039;&#039;Runtime&#039;&#039;&#039;]] software source package that supports connectivity with the host system. It is integrated with the software application to enable &#039;&#039;testability&#039;&#039; to the software with minimal impact on performance or the size of the application. The software is agnostic to the RTOS, CPU, and transport. It can be configured to support multi-processes, multi-threads, user/kernel spaces, or a simpler single application process. Typically the runtime is configured as a background thread and only executes when running tests.&lt;br /&gt;
&lt;br /&gt;
==== Build Tools ====&lt;br /&gt;
[[image:STRIDE 4.2 Framework-b.jpg |right|300px | border]]&lt;br /&gt;
&lt;br /&gt;
The Stride [[STRIDE_Build_Tools | &#039;&#039;&#039;Build Tools&#039;&#039;&#039;]] are a set of command-line utilities that integrate with your target software build process. They preprocess standard C/C++ header files that contain Stride test declarations to  auto-generate source code comprising a custom [[Intercept_Module | &#039;&#039;&#039;Intercept Module&#039;&#039;&#039;]]. The intercept module code is then built with the Stride Runtime to provide &#039;&#039;fixturing&#039;&#039; and &#039;&#039;harnessing&#039;&#039; test logic as part of your build image.&lt;br /&gt;
&lt;br /&gt;
= Cross Platform =&lt;br /&gt;
Stride works on virtually any target platform. Stride&#039;s cross-platform framework facilitates a &#039;&#039;unified testing approach&#039;&#039; for all team members, enabling organizations to standardize on a test workflow that is independent of the target platform being used or what branch of software is being changed.&lt;br /&gt;
&lt;br /&gt;
=== Runtime written in standard C ===&lt;br /&gt;
The Stride Runtime is written in standard C on top of a simple [[Platform_Abstraction_Layer | &#039;&#039;&#039;platform abstraction layer&#039;&#039;&#039;]] that enables it to work across platforms. It can be configured for a single process multi-threading environment or multiple process environments (i.e. Linux, Windows, Embedded RTOS, etc.). It is delivered as source code to be included in the application&#039;s build system. The transport between the host and target is configurable and supports Serial and TCP/IP by default. Custom transports are also available. The runtime has also been tailored specifically to embedded applications, overhead is minimal. It consumes very little memory for table and control block storage. Resource usage is configurable and can be tailored to the limitations of the target platform.&lt;br /&gt;
&lt;br /&gt;
===Integrates With Your Existing Build System ===&lt;br /&gt;
Stride also auto-generates &#039;&#039;intercept module&#039;&#039; used for harnessing and remote logic as source code during the make process, removing any dependencies on specific compilers and / or processors.&lt;br /&gt;
&lt;br /&gt;
===Supports Off-Target Testing ===&lt;br /&gt;
Testing can also be conducted using a standard desktop machine (Windows, Linux, or FreeBSD). The Stride &#039;&#039;SDKs&#039;&#039; allow for a seamless transition between the real target and an Off-Target host environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rich set of Assertions =&lt;br /&gt;
Test cases are typically constructed leveraging a large set of available assertion macros. On failures macros provide such details as file name, line number, and why the condition failed. Stride provides are large set of optional macros available for automatic report annotation in the case of failures. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extensive Parameter Support =&lt;br /&gt;
&lt;br /&gt;
Parameterized testing is key to reducing test code duplication. Constructor arguments, name-value collections, and host file remoting are all supported. Stride provides an easy way for passing and accessing these types of parameters, allowing customization of test behavior at runtime.&lt;br /&gt;
&lt;br /&gt;
Create an INI-type of file (i.e. myinput.ini)&lt;br /&gt;
&lt;br /&gt;
 Loopsize   = 10&lt;br /&gt;
 InputFile  = ${MYPATH}/datacontent.bin&lt;br /&gt;
 Toogle     = On&lt;br /&gt;
&lt;br /&gt;
Pass the name-value collection using the Stride Runner&lt;br /&gt;
&lt;br /&gt;
 $ stride .. --run=&amp;quot;MyTest(/path/to/myinput.ini)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now simply access your input within test logic using built-in services&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  // .. doing stuff ..&lt;br /&gt;
  GetParam(&amp;quot;Loopsize&amp;quot;, buffer, size);&lt;br /&gt;
  //.. using parameters for test logic&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Test Doubles &amp;amp; Test Points = &lt;br /&gt;
Stride offers advanced testing techniques that enable deeper and more effective testing with less effort.&lt;br /&gt;
&lt;br /&gt;
===Test Doubles===&lt;br /&gt;
For more advanced testing scenarios, dependencies can be &#039;&#039;&#039;doubled&#039;&#039;&#039;. This feature provides a means for intercepting C/C++ global functions on the target and substituting a stub, fake, or mock. The substitution is all controllable via the runtime, allowing the software to continue executing normally when not running a test.&lt;br /&gt;
&lt;br /&gt;
For example something like the following could be useful:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
void MySuite::test1()&lt;br /&gt;
{&lt;br /&gt;
  // inserting my own version of malloc()&lt;br /&gt;
  srDOUBLE_SET(malloc, my_malloc_stub);&lt;br /&gt;
&lt;br /&gt;
  // calling a routine that uses malloc(). checking handled null correctly&lt;br /&gt;
  ret_code = FuncThatUsersMalloc(42);&lt;br /&gt;
  srEXPECT_EQ(ret_code, -1)&lt;br /&gt;
&lt;br /&gt;
  // restoring the real malloc()&lt;br /&gt;
  srDOUBLE_RESET(malloc)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Points ===&lt;br /&gt;
Stride leverages &#039;&#039;source instrumentation&#039;&#039; to provide an additional validation technique called &#039;&#039;&#039;Expectation Testing&#039;&#039;&#039; that can be applied to the executing software application. The execution sequencing of the code, along with state data, can be automatically validated based on &#039;&#039;what is expected&#039;&#039;. This validation technique does not focus on calling functions / methods but rather verifies &#039;&#039;code sequencing&#039;&#039;. This can span threads, process boundaries, and even multiple targets, as the application(s) is running. Leveraging simple macros -- called &#039;&#039;&#039;Test Points&#039;&#039;&#039; -- developers strategically instrument the source under test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;IMPORTANT&amp;quot;, &amp;quot;important date= %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test validation is done without impacting the application&#039;s performance (the on-target test code is executed in a background thread and scripts are executed on the host machine). When failures do occur, context is provided with the file name and associated line number of the failed expectations. This type of validation can be applied to a wide-range of testing scenarios:&lt;br /&gt;
* State Machines&lt;br /&gt;
* Data flow through system components&lt;br /&gt;
* Sequencing between threads&lt;br /&gt;
* Drivers that don&#039;t return values&lt;br /&gt;
* and much more ...&lt;br /&gt;
&lt;br /&gt;
The following is a snippet of what the test code might look like&lt;br /&gt;
&amp;lt;source = lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 srTestPointExpect_t expected[]={&lt;br /&gt;
    {&amp;quot;IMPORTANT&amp;quot;}, myCheckData,&lt;br /&gt;
    {&amp;quot;ANOTHER_TP&amp;quot;},&lt;br /&gt;
    {0}};&lt;br /&gt;
&lt;br /&gt;
 // setup the expections&lt;br /&gt;
 srTestPointSetup(..);&lt;br /&gt;
&lt;br /&gt;
 // start the operations&lt;br /&gt;
&lt;br /&gt;
 srTestPointWait(handle, 1000);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Test Implementation =&lt;br /&gt;
Stride based tests are integrated with the existing build system enabling your software to be both fully &#039;&#039;functional&#039;&#039; and &#039;&#039;testable&#039;&#039; at the same time. The &#039;&#039;test logic&#039;&#039; is separated from the application source code and is &#039;&#039;&#039;not&#039;&#039;&#039; executed unless invoked via the Stride Runner. Any &#039;&#039;source instrumentation&#039;&#039; is only active when executing tests. The impact of built-in testability to the software application is nominal.&lt;br /&gt;
&lt;br /&gt;
The test validation can be implemented in both &#039;&#039;C/C++&#039;&#039; on the target and &#039;&#039;Perl&#039;&#039; on the host. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;C/C++ Test Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
class MyTest {&lt;br /&gt;
public: &lt;br /&gt;
    void CheckFoo();&lt;br /&gt;
    void CheckBoo();&lt;br /&gt;
};&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Perl Script Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
sub CheckFoo : Test&lt;br /&gt;
{&lt;br /&gt;
    EXPECT_EQ(Remote-&amp;gt;foo(2 + 2), 4);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub CheckBoo : Test&lt;br /&gt;
{&lt;br /&gt;
    EXPECT_GT(Remote-&amp;gt;boo(3 * 3), 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Works with Testspace =&lt;br /&gt;
&lt;br /&gt;
Stride have been designed to leverage Testspace features such as test design, execution control, and test analysis. Managing test content and status become better organized and easier to assess current progress. Refer to [http://www.testspace.com Testspace] website for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;For more details refer to our [[Frequently Asked Questions About STRIDE | FAQ]] &#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Reference&amp;diff=14436</id>
		<title>Reference</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Reference&amp;diff=14436"/>
		<updated>2015-07-07T03:10:00Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;*  Runner *  Build Tools *  Runtime *  Platform Abstraction Layer (PAL) * Inter...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[STRIDE Runner| Runner]]&lt;br /&gt;
* [[STRIDE Build Tools | Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime | Runtime]]&lt;br /&gt;
* [[Platform Abstraction Layer | Platform Abstraction Layer (PAL)]]&lt;br /&gt;
* [[Intercept Module | Intercept Module (IM)]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
* [[Pragmas]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Doubles&amp;diff=14435</id>
		<title>Test Doubles</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Doubles&amp;diff=14435"/>
		<updated>2015-07-07T03:09:30Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;* Test Double *  Function Pragma * Name Mangling&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Test Double]]&lt;br /&gt;
* [[Scl function | Function Pragma]]&lt;br /&gt;
* [[Name Mangling]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Testing_with_Perl&amp;diff=14434</id>
		<title>Testing with Perl</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Testing_with_Perl&amp;diff=14434"/>
		<updated>2015-07-07T03:09:27Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;* Test Script *  Test API *  Examples&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Test Script]]&lt;br /&gt;
* [[Perl Script APIs | Test API]]&lt;br /&gt;
* [[Perl Script Snippets | Examples]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Points&amp;diff=14433</id>
		<title>Test Points</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Points&amp;diff=14433"/>
		<updated>2015-07-07T03:09:23Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Test Point]]&lt;br /&gt;
* [[Expectations | Expectations]]&lt;br /&gt;
* [[Test_Point_Testing_in_C/C%2B%2B | Writing Tests]]&lt;br /&gt;
* [[Test Log | Test Logs]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Points&amp;diff=14432</id>
		<title>Test Points</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Points&amp;diff=14432"/>
		<updated>2015-07-07T03:08:21Z</updated>

		<summary type="html">&lt;p&gt;Marku: Created page with &amp;quot;* Test Double *  Function Pragma * Name Mangling&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Test Double]]&lt;br /&gt;
* [[Scl function | Function Pragma]]&lt;br /&gt;
* [[Name Mangling]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14431</id>
		<title>Runtime Test Services</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14431"/>
		<updated>2015-07-07T03:06:16Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The Runtime Test Services (declared in &#039;&#039;&#039;srtest.h&#039;&#039;&#039;) are a set of APIs in the STRIDE Runtime that facilitate the writing of target based test code. These APIs make up an optional portion of the Stride Runtime and can be used to communicate additional information about tests to the host based reporting mechanism. These APIs also allow target test code to create additional test suites and test cases dynamically at runtime. &lt;br /&gt;
&lt;br /&gt;
There are two ways of accessing these APIs: through C-based functions, or through a C++ base class from which you may derive your C++ test class. These are discussed below in [[#C Test Functions|C Test Functions]], and [[#C++ Test Classes|C++ Test Classes]] sections below.&lt;br /&gt;
&lt;br /&gt;
= C Test Functions =&lt;br /&gt;
&lt;br /&gt;
The following C APIs are provided: &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestGetParam|srTestGetParam]]&#039;&#039;&#039;: returns an input parameters value.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddCase|srTestSuiteAddCase]]&#039;&#039;&#039;: creates an additional test case at runtime.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddAnnotation|srTestSuiteAddAnnotation]]&#039;&#039;&#039;: creates a suite annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseSetStatus|srTestCaseSetStatus]]&#039;&#039;&#039;: explicitly sets the status for the specified test case.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseAddAnnotation|srTestCaseAddAnnotation]]&#039;&#039;&#039;: creates a test case annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value pair with the specified test case. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestAnnotationAddComment|srTestAnnotationAddComment]]&#039;&#039;&#039;: adds a comment to the specified annotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParam ==&lt;br /&gt;
The srTestGetParam() function is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestGetParam(const srCHAR * szName, srCHAR * szValue, srDWORD dwSize, const srCHAR * szDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szValue &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;dwSize&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| dwSize &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;szValue&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| szDefValue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;srTestGetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srOK &lt;br /&gt;
| Success&lt;br /&gt;
|-&lt;br /&gt;
| srERR &lt;br /&gt;
| Null or empty szName string passed in.&lt;br /&gt;
|-&lt;br /&gt;
| srERR_HANDLE_INVALID&lt;br /&gt;
| The named parameter is not found and &amp;lt;i&amp;gt;szDefValue&amp;lt;/i&amp;gt; is set to srNULL.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define MAX_VALUE_LEN 128&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srCHAR szValue[MAX_VALUE_LEN] = {0};&lt;br /&gt;
&lt;br /&gt;
  srWORD wRet = srTestGetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamLong ==&lt;br /&gt;
The srTestGetParamLong() function is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srLONG srTestGetParamLong(const srCHAR * szName, srLONG lDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| lDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;lDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srLONG lVal = srTestGetParamLong(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamDouble ==&lt;br /&gt;
The srTestGetParamDouble() function is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
double srTestGetParamDouble(const srCHAR * szName, double dbDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| dbDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;dbDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  double dbVal = srTestGetParamDouble(&amp;quot;ParamName&amp;quot;, 0.5772156649);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddCase ==&lt;br /&gt;
The srTestSuiteAddCase() routine is used to add a new test case to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestCaseHandle_t srTestSuiteAddCase(const srCHAR * szName, const srCHAR * szDescr)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the new test case. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szDescr &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new test case. If null, description will be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCaseHandle_t &lt;br /&gt;
| Handle of the newly created test case. srTEST_CASE_INVALID indicates failure to create a test case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addCase(void)&lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;dynamic test case %d&amp;quot;, count);&lt;br /&gt;
    srTestCaseHandle_t test = srTestSuiteAddCase(szName, &amp;quot;this is a dynamic test case&amp;quot;);&lt;br /&gt;
    srTestCaseSetStatus(test, srTEST_PASS, 0); &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addCase)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddAnnotation ==&lt;br /&gt;
The srTestSuiteAddAnnotation() routine is used to add a new annotation to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestSuiteAddAnnotation(srTestAnnotationLevel_e eLevel,&lt;br /&gt;
                                                  const srCHAR * szName, &lt;br /&gt;
                                                  const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                              szName,&lt;br /&gt;
                                              &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteSetData ==&lt;br /&gt;
The srTestSuiteSetData() routine is used to associate a custom name|value pair with a test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestSuiteSetData(const srCHAR * szName, const srCHAR * szFmtValue, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestSuiteSetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatus ==&lt;br /&gt;
The srTestCaseSetStatus() routine is used to set the result of test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatus(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatus(srTEST_CASE_DEFAULT, srTEST_PASS, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatus)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatusEx ==&lt;br /&gt;
The srTestCaseSetStatusEx() routine is used to set the result of test case and allow specification of an extendedFailureCode.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration, srLONG lExtendedFailureCode)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test.&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|-&lt;br /&gt;
| lExtendedFailureCode &lt;br /&gt;
| Input &lt;br /&gt;
| The Stride framework uses the extendedFailureCode to capture the numeric results of test method when the test method fails via a numeric (non-void, nonbool) return type.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatusEx(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatusEx(srTEST_CASE_DEFAULT, srTEST_FAIL, 0, -5);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatusEx)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseAddAnnotation ==&lt;br /&gt;
The srTestCaseAddAnnotation() routine is used to add a new annotation to the specified test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestCaseAddAnnotation(rTestCaseHandle_t tTestCase, srTestAnnotationLevel_e eLevel, const srCHAR * szName, const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to the parent test case to which new test annotation is to be added. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestCaseAddAnnotation(srTEST_CASE_DEFAULT,&lt;br /&gt;
                                             srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                             szName,&lt;br /&gt;
                                             &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetData ==&lt;br /&gt;
The srTestCaseSetData() routine is used to associate a custom name|value pair with a test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetData(srTestCaseHandle_t tTestCase, const srCHAR * szName, const srCHAR * szFmtValue, ...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| szName&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetData(srTEST_CASE_DEFAULT, &amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestAnnotationAddComment ==&lt;br /&gt;
The srTestAnnotationAddComment() routine is used to add a comment (aka a log) to a test annotation.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestAnnotationAddComment(srTestAnnotationHandle_t tTestAnnotation, const srCHAR * szLabel, const srCHAR * szFmtComment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestAnnotation&lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test annotation.&lt;br /&gt;
|-&lt;br /&gt;
| szLabel&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtComment &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the new comment. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtComment.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuiteAnnotation_addComment(void) &lt;br /&gt;
{&lt;br /&gt;
  srTestAnnotationHandle_t annot = &lt;br /&gt;
                           srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                                    &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                                    &amp;quot;annot description&amp;quot;);&lt;br /&gt;
  srTestAnnotationAddComment(annot,&lt;br /&gt;
                             srNULL,&lt;br /&gt;
                             &amp;quot;this comment should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuiteAnnotation_addComment)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= C++ Test Classes =&lt;br /&gt;
The Runtime Test Services C APIs work equally well from C test functions and C++ test classes. If, however, you are using C++ it might be more convinient for you to derive your C++ test classes from the Runtime Test Services C++ base class, &#039;&#039;srTest&#039;&#039;. That way you will have access to a set of simpler to use C++ classes. &lt;br /&gt;
&lt;br /&gt;
The following C++ classes are provided: &lt;br /&gt;
* &#039;&#039;&#039;[[#class srTest|class srTest]]&#039;&#039;&#039; - base test class&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestCase|class srTestCase]]&#039;&#039;&#039; - represents a test case&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestAnnotation|class srTestAnnotation]]&#039;&#039;&#039; - represents a test annotation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTest ==&lt;br /&gt;
The srTest class provides one member object &#039;&#039;testCase&#039;&#039; of [[#class srTestCase|class srTestCase]] and the folowing methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static srWORD GetParam(const srCHAR * name, srCHAR * value, srDWORD size, const srCHAR * defval = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| value &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;size&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| size &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| defvalue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;GetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, error otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    GetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static long GetParam(const srCHAR * name, srLONG defval = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    srLONG lValue = GetParam(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static double GetParam(const srCHAR * name, const double&amp;amp; defval)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    double dbVal = GetParam(&amp;quot;ParamName&amp;quot;,  0.5772156649);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddCase ===&lt;br /&gt;
The AddCase method is used to new test case to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestCase AddCase(const srCHAR * name, const srCHAR * descr = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new test case. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new test case. If empty, description will be blank.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCase &lt;br /&gt;
| Newly created test case instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddSuite()&lt;br /&gt;
  {&lt;br /&gt;
    const std::string prefix(&amp;quot;dynamic test case &amp;quot;);&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strm;&lt;br /&gt;
      strm &amp;lt;&amp;lt; prefix &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestCase tc = AddCase(strm.str().c_str());&lt;br /&gt;
      tc.SetStatus(srTEST_PASS);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                                  strmName.str().c_str(),&lt;br /&gt;
                                                  strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteSetData()&lt;br /&gt;
  {&lt;br /&gt;
      SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestCase ==&lt;br /&gt;
The srTestCase class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
=== method SetStatus ===&lt;br /&gt;
The SetStatus method is used to set the result of the default test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetStatus(srTestStatus_e status, srDWORD duration = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| status &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| duration &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| The duration of the test in clock ticks. The default is 0.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetStatus()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetStatus(srTEST_NOTINUSE);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = &lt;br /&gt;
                 testCase.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         strmName.str().c_str(),&lt;br /&gt;
                                         strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetData()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestAnnotation ==&lt;br /&gt;
The srTestAnnotation class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddComment ===&lt;br /&gt;
The AddComment method is used to add a comment to the test annotation.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD AddComment(const srCHAR * label, const srCHAR * comment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| label&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|- &lt;br /&gt;
| comment&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the new comment. Cannot be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAnnotationAddComment()&lt;br /&gt;
  {&lt;br /&gt;
    stride::srTestAnnotation ta = &lt;br /&gt;
                 testSuite.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                         &amp;quot;annot description&amp;quot;);&lt;br /&gt;
    ta.AddComment(&amp;quot;this comment on annotation should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14430</id>
		<title>Runtime Test Services</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14430"/>
		<updated>2015-07-07T02:56:36Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* srTestGetParam */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The Runtime Test Services (declared in &#039;&#039;&#039;srtest.h&#039;&#039;&#039;) are a set of APIs in the STRIDE Runtime that facilitate the writing of target based test code. These APIs make up an optional portion of the Stride Runtime and can be used to communicate additional information about tests to the host based reporting mechanism. These APIs also allow target test code to create additional test suites and test cases dynamically at runtime. &lt;br /&gt;
&lt;br /&gt;
There are two ways of accessing these APIs: through C-based functions, or through a C++ base class from which you may derive your C++ test class. These are discussed below in [[#C Test Functions|C Test Functions]], and [[#C++ Test Classes|C++ Test Classes]] sections below.&lt;br /&gt;
&lt;br /&gt;
= C Test Functions =&lt;br /&gt;
&lt;br /&gt;
The following C APIs are provided: &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestGetParam|srTestGetParam]]&#039;&#039;&#039;: returns an input parameters value.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddCase|srTestSuiteAddCase]]&#039;&#039;&#039;: creates an additional test case at runtime.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddAnnotation|srTestSuiteAddAnnotation]]&#039;&#039;&#039;: creates a suite annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseSetStatus|srTestCaseSetStatus]]&#039;&#039;&#039;: explicitly sets the status for the specified test case.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseAddAnnotation|srTestCaseAddAnnotation]]&#039;&#039;&#039;: creates a test case annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value pair with the specified test case. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestAnnotationAddComment|srTestAnnotationAddComment]]&#039;&#039;&#039;: adds a comment to the specified annotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParam ==&lt;br /&gt;
The srTestGetParam() function is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestGetParam(const srCHAR * szName, srCHAR * szValue, srDWORD dwSize, const srCHAR * szDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szValue &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;dwSize&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| dwSize &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;szValue&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| szDefValue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;srTestGetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srOK &lt;br /&gt;
| Success&lt;br /&gt;
|-&lt;br /&gt;
| srERR &lt;br /&gt;
| Null or empty szName string passed in.&lt;br /&gt;
|-&lt;br /&gt;
| srERR_HANDLE_INVALID&lt;br /&gt;
| The named parameter is not found and &amp;lt;i&amp;gt;szDefValue&amp;lt;/i&amp;gt; is set to srNULL.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define MAX_VALUE_LEN 128&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srCHAR szValue[MAX_VALUE_LEN] = {0};&lt;br /&gt;
&lt;br /&gt;
  srWORD wRet = srTestGetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamLong ==&lt;br /&gt;
The srTestGetParamLong() function is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srLONG srTestGetParamLong(const srCHAR * szName, srLONG lDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| lDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;lDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srLONG lVal = srTestGetParamLong(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamDouble ==&lt;br /&gt;
The srTestGetParamDouble() function is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
double srTestGetParamDouble(const srCHAR * szName, double dbDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| dbDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;dbDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  double dbVal = srTestGetParamDouble(&amp;quot;ParamName&amp;quot;, 0.5772156649);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddCase ==&lt;br /&gt;
The srTestSuiteAddCase() routine is used to add a new test case to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestCaseHandle_t srTestSuiteAddCase(const srCHAR * szName, const srCHAR * szDescr)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the new test case. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szDescr &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new test case. If null, description will be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCaseHandle_t &lt;br /&gt;
| Handle of the newly created test case. srTEST_CASE_INVALID indicates failure to create a test case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addCase(void)&lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;dynamic test case %d&amp;quot;, count);&lt;br /&gt;
    srTestCaseHandle_t test = srTestSuiteAddCase(szName, &amp;quot;this is a dynamic test case&amp;quot;);&lt;br /&gt;
    srTestCaseSetStatus(test, srTEST_PASS, 0); &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addCase)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddAnnotation ==&lt;br /&gt;
The srTestSuiteAddAnnotation() routine is used to add a new annotation to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestSuiteAddAnnotation(srTestAnnotationLevel_e eLevel,&lt;br /&gt;
                                                  const srCHAR * szName, &lt;br /&gt;
                                                  const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                              szName,&lt;br /&gt;
                                              &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteSetData ==&lt;br /&gt;
The srTestSuiteSetData() routine is used to associate a custom name|value pair with a test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestSuiteSetData(const srCHAR * szName, const srCHAR * szFmtValue, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestSuiteSetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatus ==&lt;br /&gt;
The srTestCaseSetStatus() routine is used to set the result of test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatus(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatus(srTEST_CASE_DEFAULT, srTEST_PASS, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatus)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatusEx ==&lt;br /&gt;
The srTestCaseSetStatusEx() routine is used to set the result of test case and allow specification of an extendedFailureCode.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration, srLONG lExtendedFailureCode)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test.&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|-&lt;br /&gt;
| lExtendedFailureCode &lt;br /&gt;
| Input &lt;br /&gt;
| The Stride framework uses the extendedFailureCode to capture the numeric results of test method when the test method fails via a numeric (non-void, nonbool) return type.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatusEx(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatusEx(srTEST_CASE_DEFAULT, srTEST_FAIL, 0, -5);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatusEx)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseAddAnnotation ==&lt;br /&gt;
The srTestCaseAddAnnotation() routine is used to add a new annotation to the specified test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestCaseAddAnnotation(rTestCaseHandle_t tTestCase, srTestAnnotationLevel_e eLevel, const srCHAR * szName, const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to the parent test case to which new test annotation is to be added. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestCaseAddAnnotation(srTEST_CASE_DEFAULT,&lt;br /&gt;
                                             srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                             szName,&lt;br /&gt;
                                             &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetData ==&lt;br /&gt;
The srTestCaseSetData() routine is used to associate a custom name|value pair with a test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetData(srTestCaseHandle_t tTestCase, const srCHAR * szName, const srCHAR * szFmtValue, ...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| szName&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetData(srTEST_CASE_DEFAULT, &amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestAnnotationAddComment ==&lt;br /&gt;
The srTestAnnotationAddComment() routine is used to add a comment (aka a log) to a test annotation.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestAnnotationAddComment(srTestAnnotationHandle_t tTestAnnotation, const srCHAR * szLabel, const srCHAR * szFmtComment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestAnnotation&lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test annotation.&lt;br /&gt;
|-&lt;br /&gt;
| szLabel&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtComment &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the new comment. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtComment.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuiteAnnotation_addComment(void) &lt;br /&gt;
{&lt;br /&gt;
  srTestAnnotationHandle_t annot = &lt;br /&gt;
                           srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                                    &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                                    &amp;quot;annot description&amp;quot;);&lt;br /&gt;
  srTestAnnotationAddComment(annot,&lt;br /&gt;
                             srNULL,&lt;br /&gt;
                             &amp;quot;this comment should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuiteAnnotation_addComment)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= C++ Test Classes =&lt;br /&gt;
The Runtime Test Services C APIs work equally well from C test functions and C++ test classes. If, however, you are using C++ it might be more convinient for you to derive your C++ test classes from the Runtime Test Services C++ base class, &#039;&#039;srTest&#039;&#039;. That way you will have access to a set of simpler to use C++ classes. &lt;br /&gt;
&lt;br /&gt;
The following C++ classes are provided: &lt;br /&gt;
* &#039;&#039;&#039;[[#class srTest|class srTest]]&#039;&#039;&#039; - base test class&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestCase|class srTestCase]]&#039;&#039;&#039; - represents a test case&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestAnnotation|class srTestAnnotation]]&#039;&#039;&#039; - represents a test annotation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTest ==&lt;br /&gt;
The srTest class provides one member object &#039;&#039;testCase&#039;&#039; of [[#class srTestCase|class srTestCase]] and the folowing methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static srWORD GetParam(const srCHAR * name, srCHAR * value, srDWORD size, const srCHAR * defval = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| value &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;size&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| size &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| defvalue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;GetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, error otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    GetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static long GetParam(const srCHAR * name, srLONG defval = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    srLONG lValue = GetParam(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static double GetParam(const srCHAR * name, const double&amp;amp; defval)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    double dbVal = GetParam(&amp;quot;ParamName&amp;quot;,  0.5772156649);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddCase ===&lt;br /&gt;
The AddCase method is used to new test case to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestCase AddCase(const srCHAR * name, const srCHAR * descr = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new test case. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new test case. If empty, description will be blank.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCase &lt;br /&gt;
| Newly created test case instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddSuite()&lt;br /&gt;
  {&lt;br /&gt;
    const std::string prefix(&amp;quot;dynamic test case &amp;quot;);&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strm;&lt;br /&gt;
      strm &amp;lt;&amp;lt; prefix &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestCase tc = AddCase(strm.str().c_str());&lt;br /&gt;
      tc.SetStatus(srTEST_PASS);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                                  strmName.str().c_str(),&lt;br /&gt;
                                                  strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteSetData()&lt;br /&gt;
  {&lt;br /&gt;
      SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestCase ==&lt;br /&gt;
The srTestCase class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
=== method SetStatus ===&lt;br /&gt;
The SetStatus method is used to set the result of the default test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetStatus(srTestStatus_e status, srDWORD duration = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| status &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| duration &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| The duration of the test in clock ticks. The default is 0.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetStatus()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetStatus(srTEST_NOTINUSE);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = &lt;br /&gt;
                 testCase.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         strmName.str().c_str(),&lt;br /&gt;
                                         strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetData()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestAnnotation ==&lt;br /&gt;
The srTestAnnotation class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddComment ===&lt;br /&gt;
The AddComment method is used to add a comment to the test annotation.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD AddComment(const srCHAR * label, const srCHAR * comment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| label&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|- &lt;br /&gt;
| comment&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the new comment. Cannot be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAnnotationAddComment()&lt;br /&gt;
  {&lt;br /&gt;
    stride::srTestAnnotation ta = &lt;br /&gt;
                 testSuite.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                         &amp;quot;annot description&amp;quot;);&lt;br /&gt;
    ta.AddComment(&amp;quot;this comment on annotation should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14429</id>
		<title>Runtime Test Services</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Runtime_Test_Services&amp;diff=14429"/>
		<updated>2015-07-07T02:55:57Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The Runtime Test Services (declared in &#039;&#039;&#039;srtest.h&#039;&#039;&#039;) are a set of APIs in the STRIDE Runtime that facilitate the writing of target based test code. These APIs make up an optional portion of the Stride Runtime and can be used to communicate additional information about tests to the host based reporting mechanism. These APIs also allow target test code to create additional test suites and test cases dynamically at runtime. &lt;br /&gt;
&lt;br /&gt;
There are two ways of accessing these APIs: through C-based functions, or through a C++ base class from which you may derive your C++ test class. These are discussed below in [[#C Test Functions|C Test Functions]], and [[#C++ Test Classes|C++ Test Classes]] sections below.&lt;br /&gt;
&lt;br /&gt;
= C Test Functions =&lt;br /&gt;
&lt;br /&gt;
The following C APIs are provided: &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestGetParam|srTestGetParam]]&#039;&#039;&#039;: returns an input parameters value.&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddCase|srTestSuiteAddCase]]&#039;&#039;&#039;: creates an additional test case at runtime.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteAddAnnotation|srTestSuiteAddAnnotation]]&#039;&#039;&#039;: creates a suite annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseSetStatus|srTestCaseSetStatus]]&#039;&#039;&#039;: explicitly sets the status for the specified test case.&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestCaseAddAnnotation|srTestCaseAddAnnotation]]&#039;&#039;&#039;: creates a test case annotation at runtime. &lt;br /&gt;
*&#039;&#039;&#039;[[#srTestSuiteSetData|srTestSuiteSetData]]&#039;&#039;&#039;: associates a custom name|value pair with the specified test case. &lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;[[#srTestAnnotationAddComment|srTestAnnotationAddComment]]&#039;&#039;&#039;: adds a comment to the specified annotation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParam ==&lt;br /&gt;
The srTestGetParam() function is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestGetParam(const srCHAR * szName, srCHAR * szValue, srDWORD dwSize, const srCHAR * szDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szValue &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;dwSize&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| dwSize &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;szValue&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| szDefValue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;srTestGetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srOK &lt;br /&gt;
| Success&lt;br /&gt;
|-&lt;br /&gt;
| srERR &lt;br /&gt;
| Null or empty szName string passed in.&lt;br /&gt;
|-&lt;br /&gt;
| srERR_HANDLE_INVALID&lt;br /&gt;
| The named parameter is not found and &amp;lt;i&amp;gt;szDefValue&amp;lt;/i&amp;gt; is set to srNULL.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define MAX_VALUE_LEN 128&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srCHAR szValue[MAX_VALUE_LEN] = {0};&lt;br /&gt;
&lt;br /&gt;
  srWORD wRet = srTestGetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamLong ==&lt;br /&gt;
The srTestGetParamLong() function is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srLONG srTestGetParamLong(const srCHAR * szName, srLONG lDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| lDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;lDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  srLONG lVal = srTestGetParamLong(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestGetParamDouble ==&lt;br /&gt;
The srTestGetParamDouble() function is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
double srTestGetParamDouble(const srCHAR * szName, double dbDefValue);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| dbDefValue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;dbDefValue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_getParam(void)&lt;br /&gt;
{&lt;br /&gt;
  double dbVal = srTestGetParamDouble(&amp;quot;ParamName&amp;quot;, 0.5772156649);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_getParam)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddCase ==&lt;br /&gt;
The srTestSuiteAddCase() routine is used to add a new test case to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestCaseHandle_t srTestSuiteAddCase(const srCHAR * szName, const srCHAR * szDescr)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the new test case. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szDescr &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new test case. If null, description will be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCaseHandle_t &lt;br /&gt;
| Handle of the newly created test case. srTEST_CASE_INVALID indicates failure to create a test case.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addCase(void)&lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;dynamic test case %d&amp;quot;, count);&lt;br /&gt;
    srTestCaseHandle_t test = srTestSuiteAddCase(szName, &amp;quot;this is a dynamic test case&amp;quot;);&lt;br /&gt;
    srTestCaseSetStatus(test, srTEST_PASS, 0); &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addCase)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteAddAnnotation ==&lt;br /&gt;
The srTestSuiteAddAnnotation() routine is used to add a new annotation to the specified test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestSuiteAddAnnotation(srTestAnnotationLevel_e eLevel,&lt;br /&gt;
                                                  const srCHAR * szName, &lt;br /&gt;
                                                  const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuite_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                              szName,&lt;br /&gt;
                                              &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuite_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestSuiteSetData ==&lt;br /&gt;
The srTestSuiteSetData() routine is used to associate a custom name|value pair with a test suite.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestSuiteSetData(const srCHAR * szName, const srCHAR * szFmtValue, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestSuiteSetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatus ==&lt;br /&gt;
The srTestCaseSetStatus() routine is used to set the result of test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatus(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatus(srTEST_CASE_DEFAULT, srTEST_PASS, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatus)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetStatusEx ==&lt;br /&gt;
The srTestCaseSetStatusEx() routine is used to set the result of test case and allow specification of an extendedFailureCode.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetStatus(srTestCaseHandle_t tTestCase, srTestStatus_e eStatus, srDWORD dwDuration, srLONG lExtendedFailureCode)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eStatus &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test.&lt;br /&gt;
|-&lt;br /&gt;
| dwDuration &lt;br /&gt;
| Input &lt;br /&gt;
| The duration of the test in clock ticks. Using &amp;quot;0&amp;quot; allows the STRIDE Runtime (Intercept Module) to set the time automatically.&lt;br /&gt;
|-&lt;br /&gt;
| lExtendedFailureCode &lt;br /&gt;
| Input &lt;br /&gt;
| The Stride framework uses the extendedFailureCode to capture the numeric results of test method when the test method fails via a numeric (non-void, nonbool) return type.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setStatusEx(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetStatusEx(srTEST_CASE_DEFAULT, srTEST_FAIL, 0, -5);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setStatusEx)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseAddAnnotation ==&lt;br /&gt;
The srTestCaseAddAnnotation() routine is used to add a new annotation to the specified test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srTestAnnotationHandle_t srTestCaseAddAnnotation(rTestCaseHandle_t tTestCase, srTestAnnotationLevel_e eLevel, const srCHAR * szName, const srCHAR * szFmtDescr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to the parent test case to which new test annotation is to be added. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| eLevel&lt;br /&gt;
| Input &lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|-&lt;br /&gt;
| szName &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtDescr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtDescr.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotationHandle_t &lt;br /&gt;
| Handle of the newly created test annotation. srTEST_ANNOTATION_INVALID indicates failure to create a test annotation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_addAnnotation(void) &lt;br /&gt;
{&lt;br /&gt;
  for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
  {&lt;br /&gt;
    char szName[25];&lt;br /&gt;
    sprintf(szName, &amp;quot;annotation %d&amp;quot;, count);&lt;br /&gt;
    srTestAnnotationHandle_t annot = &lt;br /&gt;
                     srTestCaseAddAnnotation(srTEST_CASE_DEFAULT,&lt;br /&gt;
                                             srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                             szName,&lt;br /&gt;
                                             &amp;quot;description of annotation&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_addAnnotation)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestCaseSetData ==&lt;br /&gt;
The srTestCaseSetData() routine is used to associate a custom name|value pair with a test case.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestCaseSetData(srTestCaseHandle_t tTestCase, const srCHAR * szName, const srCHAR * szFmtValue, ...);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| szName&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtValue &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtValue.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfcase_setData(void)&lt;br /&gt;
{&lt;br /&gt;
  srTestCaseSetData(srTEST_CASE_DEFAULT, &amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfcase_setData)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== srTestAnnotationAddComment ==&lt;br /&gt;
The srTestAnnotationAddComment() routine is used to add a comment (aka a log) to a test annotation.&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
srWORD srTestAnnotationAddComment(srTestAnnotationHandle_t tTestAnnotation, const srCHAR * szLabel, const srCHAR * szFmtComment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| tTestAnnotation&lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a test annotation.&lt;br /&gt;
|-&lt;br /&gt;
| szLabel&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|-&lt;br /&gt;
| szFmtComment &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the new comment. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| ... &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Variable argument list to format szFmtComment.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tfsuiteAnnotation_addComment(void) &lt;br /&gt;
{&lt;br /&gt;
  srTestAnnotationHandle_t annot = &lt;br /&gt;
                           srTestSuiteAddAnnotation(srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
                                                    &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                                    &amp;quot;annot description&amp;quot;);&lt;br /&gt;
  srTestAnnotationAddComment(annot,&lt;br /&gt;
                             srNULL,&lt;br /&gt;
                             &amp;quot;this comment should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;testfunc&amp;quot;, tfsuiteAnnotation_addComment)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= C++ Test Classes =&lt;br /&gt;
The Runtime Test Services C APIs work equally well from C test functions and C++ test classes. If, however, you are using C++ it might be more convinient for you to derive your C++ test classes from the Runtime Test Services C++ base class, &#039;&#039;srTest&#039;&#039;. That way you will have access to a set of simpler to use C++ classes. &lt;br /&gt;
&lt;br /&gt;
The following C++ classes are provided: &lt;br /&gt;
* &#039;&#039;&#039;[[#class srTest|class srTest]]&#039;&#039;&#039; - base test class&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestCase|class srTestCase]]&#039;&#039;&#039; - represents a test case&lt;br /&gt;
* &#039;&#039;&#039;[[#class srTestAnnotation|class srTestAnnotation]]&#039;&#039;&#039; - represents a test annotation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTest ==&lt;br /&gt;
The srTest class provides one member object &#039;&#039;testCase&#039;&#039; of [[#class srTestCase|class srTestCase]] and the folowing methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a string.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static srWORD GetParam(const srCHAR * name, srCHAR * value, srDWORD size, const srCHAR * defval = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter. Cannot be null.&lt;br /&gt;
|-&lt;br /&gt;
| value &lt;br /&gt;
| Output &lt;br /&gt;
| Pointer to a block of memory to store the value of the parameter with a maximum size of &amp;lt;i&amp;gt;size&amp;lt;/i&amp;gt; chars&lt;br /&gt;
|-&lt;br /&gt;
| size &lt;br /&gt;
| Input &lt;br /&gt;
| Size in chars of the buffer pointed to by &amp;lt;i&amp;gt;value&amp;lt;/i&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| defvalue &lt;br /&gt;
| Input (optional) &lt;br /&gt;
| Pointer to a null-terminated string that represents a default value in case the parameter is not specified. By setting this value to srNULL (or omitting it), you can use &amp;lt;i&amp;gt;GetParam()&amp;lt;/i&amp;gt; to test for the existence of a named parameter. If the named parameter doesn&#039;t exist, the function will return &amp;lt;i&amp;gt;srERR_HANDLE_INVALID&amp;lt;/i&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, error otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    GetParam(&amp;quot;ParamName&amp;quot;, szValue, MAX_VALUE_LEN, &amp;quot;default value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a long.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static long GetParam(const srCHAR * name, srLONG defval = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srLONG&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    srLONG lValue = GetParam(&amp;quot;ParamName&amp;quot;, -1);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method GetParam ===&lt;br /&gt;
This overload of the GetParam() method is used to get the value of a named parameter as a double.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
static double GetParam(const srCHAR * name, const double&amp;amp; defval)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string that represents the name of the parameter.&lt;br /&gt;
|-&lt;br /&gt;
| defvalue&lt;br /&gt;
| Input &lt;br /&gt;
| Default value that is returned if the parameter is not found.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| double&lt;br /&gt;
| Parameter value, or value specified by &amp;lt;i&amp;gt;defvalue&amp;lt;/i&amp;gt; if parameter isn&#039;t found.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void getParam()&lt;br /&gt;
  {&lt;br /&gt;
    double dbVal = GetParam(&amp;quot;ParamName&amp;quot;,  0.5772156649);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddCase ===&lt;br /&gt;
The AddCase method is used to new test case to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestCase AddCase(const srCHAR * name, const srCHAR * descr = srNULL)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new test case. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new test case. If empty, description will be blank.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestCase &lt;br /&gt;
| Newly created test case instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddSuite()&lt;br /&gt;
  {&lt;br /&gt;
    const std::string prefix(&amp;quot;dynamic test case &amp;quot;);&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strm;&lt;br /&gt;
      strm &amp;lt;&amp;lt; prefix &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestCase tc = AddCase(strm.str().c_str());&lt;br /&gt;
      tc.SetStatus(srTEST_PASS);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If empty, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                                  strmName.str().c_str(),&lt;br /&gt;
                                                  strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test suite.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteSetData()&lt;br /&gt;
  {&lt;br /&gt;
      SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestCase ==&lt;br /&gt;
The srTestCase class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
=== method SetStatus ===&lt;br /&gt;
The SetStatus method is used to set the result of the default test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetStatus(srTestStatus_e status, srDWORD duration = 0)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| status &lt;br /&gt;
| Input &lt;br /&gt;
| Result of the test. Possible values are:&lt;br /&gt;
* &#039;&#039;&#039;srTEST_FAIL&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;srTEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| duration &lt;br /&gt;
| Input (Optional)&lt;br /&gt;
| The duration of the test in clock ticks. The default is 0.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetStatus()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetStatus(srTEST_NOTINUSE);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddAnnotation ===&lt;br /&gt;
The AddAnnotation method is used to add a new test annotation to the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srTestAnnotation AddAnnotation(srTestAnnotationLevel_e level, const srCHAR * name, const srCHAR * descr, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| level&lt;br /&gt;
| Input&lt;br /&gt;
| Annotation level. &lt;br /&gt;
&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_TRACE,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_DEBUG,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_WARN,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_ERROR,&lt;br /&gt;
* srTEST_ANNOTATION_LEVEL_FATAL&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string that represents the name of the new annotation. If null, the default host naming scheme will be used.&lt;br /&gt;
|- &lt;br /&gt;
| descr&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to null-terminated string representing the description of the new annotation. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTestAnnotation&lt;br /&gt;
| Newly created annotation instance.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;lt;sstream&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseAddAnnotation()&lt;br /&gt;
  {&lt;br /&gt;
    for (int count = 0; count &amp;lt; 5; ++count)&lt;br /&gt;
    {&lt;br /&gt;
      std::stringstream strmName;&lt;br /&gt;
      std::stringstream strmDescr;&lt;br /&gt;
      strmName &amp;lt;&amp;lt; &amp;quot;annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      strmDescr &amp;lt;&amp;lt; &amp;quot;description of annotation &amp;quot; &amp;lt;&amp;lt; count;&lt;br /&gt;
      stride::srTestAnnotation ta = &lt;br /&gt;
                 testCase.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         strmName.str().c_str(),&lt;br /&gt;
                                         strmDescr.str().c_str());&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method SetData ===&lt;br /&gt;
The SetData method is used to associate a custom name|value pair with the test case.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD SetData(const srCHAR * name, const srCHAR * value, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| name&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the name of the custom pair. Cannot be null.&lt;br /&gt;
|- &lt;br /&gt;
| value&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to a null-terminated string representing the value of the custom pair. Cannot be null.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR_HANDLE_INVALID on invalid handle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void caseSetData()&lt;br /&gt;
  {&lt;br /&gt;
    testCase.SetData(&amp;quot;MyName&amp;quot;, &amp;quot;my value&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== class srTestAnnotation ==&lt;br /&gt;
The srTestAnnotation class provides the following methods:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== method AddComment ===&lt;br /&gt;
The AddComment method is used to add a comment to the test annotation.&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
srWORD AddComment(const srCHAR * label, const srCHAR * comment, ...)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| label&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string for the label. If null, the default label will be applied.&lt;br /&gt;
|- &lt;br /&gt;
| comment&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to null-terminated string representing the new comment. Cannot be empty.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srWORD &lt;br /&gt;
| srOK on success, srERR on null string or invalid formatted string, srERR_HANDLE_INVALID on invalid handle, srERR_STR_TRUNCATED on truncated string.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class srtest_class : public stride::srTest&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void suiteAnnotationAddComment()&lt;br /&gt;
  {&lt;br /&gt;
    stride::srTestAnnotation ta = &lt;br /&gt;
                 testSuite.AddAnnotation(srTEST_ANNOTATION_LEVEL_INFO,&lt;br /&gt;
                                         &amp;quot;annot&amp;quot;,&lt;br /&gt;
                                         &amp;quot;annot description&amp;quot;);&lt;br /&gt;
    ta.AddComment(&amp;quot;this comment on annotation should print %s&amp;quot;, &amp;quot;A STRING&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(srtest_class)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Unit&amp;diff=14428</id>
		<title>Test Unit</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Unit&amp;diff=14428"/>
		<updated>2015-07-07T02:45:23Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Test Method Return Values */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&#039;&#039;&#039;Stride&#039;&#039;&#039; groups similar test cases into a single &#039;&#039;runnable&#039;&#039; package called a &#039;&#039;&#039;Test Unit&#039;&#039;&#039; (also known as a &#039;&#039;&#039;Test Suite&#039;&#039;&#039;). These tests are written in C and C++ and are compiled and linked with your software and run, when called, on your target platform. They are suitable for both developer unit testing as well as end-to-end integration testing. An external [[Stride Runner]] is provided which controls the execution of &#039;&#039;&#039;Test Units&#039;&#039;&#039; and publishes test results to the local file system and optionally to [http://www.testspace.com Testspace]. The following is an example of the structure of a &#039;&#039;&#039;Test Unit&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Declare tests&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
class MyTest {&lt;br /&gt;
public: &lt;br /&gt;
    void CheckFoo();&lt;br /&gt;
    void CheckBoo();&lt;br /&gt;
};&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Write tests&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Test Unit ==&lt;br /&gt;
A single &#039;&#039;&#039;Test Unit&#039;&#039;&#039; is a set of &#039;&#039;&#039;Test Methods&#039;&#039;&#039; that always run together as an &#039;&#039;&#039;executable unit&#039;&#039;&#039;. Test Methods are the &#039;&#039;&#039;test cases&#039;&#039;&#039;  that comprise a Test Unit. Each Test Method  by default maps to a single Test Case in the results. When relying on  this default behavior of Test Methods, we refer to these methods as &#039;&#039;static Test Cases&#039;&#039;. A less common technique is  to create and add a Test Case dynamically at runtime to an existing  Suite via the [[Runtime_Test_Services#method_AddCase|Test Services]].  We refer to these as &#039;&#039;dynamic  Test Cases&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Individual test cases are  implemented as test methods or functions which follow a four-phase testing pattern:&lt;br /&gt;
&lt;br /&gt;
# Setting up a  test fixture (optional)&lt;br /&gt;
# Exercising the Software Under Test (SUT)&lt;br /&gt;
# Verifying  that the expected outcome has occurred &lt;br /&gt;
# Tearing down  the test fixture (optional)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Test fixturing&#039;&#039;&#039; refers to the &#039;&#039;Setup&#039;&#039; and &#039;&#039;Teardown&#039;&#039;   phases of the testing.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Setup&#039;&#039;&#039;   phase, we put all of the things into place that are required in order   to run a our test and expect a particular outcome. This includes things   like:&lt;br /&gt;
* Acquiring resources such as memory,   hardware, etc.&lt;br /&gt;
* Setting up required states such as input   files in place, memory filled with a pattern, dependencies initialized,   etc.&lt;br /&gt;
&lt;br /&gt;
In the &#039;&#039;&#039;Tear down&#039;&#039;&#039;   phase, we clean up the fixturing we did in the Setup phase, leaving  the  system in a state that is ready to be used by the next test.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
Individual functions or methods,  which typically implement a single test case are grouped into one or  more Test Units which are executed as atomic entities.&lt;br /&gt;
&lt;br /&gt;
Grouping  of individual tests into a Test Unit can be accomplished in any of three  ways:&lt;br /&gt;
&lt;br /&gt;
* A Test Unit can be comprised of the  member functions of a &#039;&#039;&#039;C++  class&#039;&#039;&#039;, &lt;br /&gt;
* A Test Unit  can be comprised of a set of &#039;&#039;&#039;C functions&#039;&#039;&#039;,  &lt;br /&gt;
* A Test Unit can be comprised of C functions pointed to by members of a &#039;&#039;&#039;C struct&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The following  table compares the three packaging variants. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ &amp;lt;big&amp;gt;&#039;&#039;&#039;&#039;&#039;Comparison of Test Unit Packaging&#039;&#039;&#039;&#039;&#039;&amp;lt;/big&amp;gt;&lt;br /&gt;
! Test Unit  Type!! Advantages !! Disadvantages !! scl pragma &lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
&#039;&#039;&#039;C++ class&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Test_Unit#Test_Unit_as_C.2B.2B_Class|Example code]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* Simple and easy to use&lt;br /&gt;
* Can be used with target code that is all C, all C++, or a mix&lt;br /&gt;
* Test utility methods can be encapsulated as test class members or members of a parent class&lt;br /&gt;
* Could be [[Parameterized_Test_Units | parametrized]] via constructor arguments&lt;br /&gt;
* Provides convenient syntax for augmenting report annotation (operator &amp;lt;tt&amp;gt;&amp;lt;&amp;lt;&amp;lt;/tt&amp;gt;)&lt;br /&gt;
| &lt;br /&gt;
* Requires a C++ build environment &lt;br /&gt;
| &amp;lt;tt&amp;gt;scl_test_class&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
&#039;&#039;&#039;C class&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Test_Unit#Test_Unit_as_C_Class|Example code]]&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* Provides encapsulation of test methods&lt;br /&gt;
* Provides encapsulation of state via member variables &lt;br /&gt;
* Could be [[Parameterized_Test_Units |parametrized]] via init-function arguments&lt;br /&gt;
|&lt;br /&gt;
* Requires initialization code for structure  function pointer setup&lt;br /&gt;
* [[Test_Documentation_in_C/C%2B%2B|Test Unit documentation]] must be associated with the  structure function pointer members instead of the actual test method implementations.&lt;br /&gt;
| &amp;lt;tt&amp;gt;scl_test_cclass&amp;lt;/tt&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
&#039;&#039;&#039;C functions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Test_Unit#Test_Unit_as_Group_of_Free_Functions|Example code]]&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
* Extremely  simple syntax &lt;br /&gt;
|&lt;br /&gt;
* Parametrized test units are not supported&lt;br /&gt;
* No test unit support for constructor/initializer or destructor/de-initializer&lt;br /&gt;
* Changing test unit membership requires editing of the pragma statement &lt;br /&gt;
* [[Test_Documentation_in_C/C%2B%2B|Test Unit documentation]] for the FList must be associated  with the header file - as such, you can only have one FList per header file if you want to document your test units.&lt;br /&gt;
| &amp;lt;tt&amp;gt;scl_test_flist&amp;lt;/tt&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The best choice is usually the C++ class since it offers the best mix of features and ease-of-use. (You can test code written in C or C++ using the C++ class  test units.) However, compiling C++ is not always possible, in this case one of the C-based test unit packaging options must be used.&lt;br /&gt;
&lt;br /&gt;
You can freely mix different deployment methods across a project if desired, the format of the results is consistent across all test unit packaging options.&lt;br /&gt;
&lt;br /&gt;
== Test Method Return Values == &lt;br /&gt;
&lt;br /&gt;
Test Method return values must conform to certain return types as summarizing in the following table. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;background-color:#ffffcc;font-family:arial;font-size:9pt;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Return Type&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;How Return Value is Interpreted&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Default Status&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;tt&amp;gt;void&amp;lt;/tt&amp;gt;&lt;br /&gt;
| Most common return type&lt;br /&gt;
| Since there is no return, PASS/FAIL status is set in the body of the method using a &lt;br /&gt;
* [[Test_Macros|Test Macro]] &lt;br /&gt;
or a runtime call&lt;br /&gt;
* [[Runtime_Test_Services#srTestCaseSetStatus|srTestCaseSetStatus()]]&lt;br /&gt;
* [[Runtime_Test_Services#srTestCaseSetStatusEx|srTestCaseSetStatusEx()]]&lt;br /&gt;
* [[Runtime_Test_Services#method_SetStatus|srTestCase::SetStatus()]]&lt;br /&gt;
| &lt;br /&gt;
* If the method runs to completion without another status being set, the status is srTEST_PASS&lt;br /&gt;
* If the method does not run to completion (due to crash or hang in software under test), the status is srTEST_INPROGRESS&lt;br /&gt;
|-&lt;br /&gt;
| integer type&lt;br /&gt;
| Integer types include:&lt;br /&gt;
* &amp;lt;tt&amp;gt;int&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;short&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;char&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;tt&amp;gt;long&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;may include signed/unsigned/const qualifiers&#039;&#039;&amp;lt;/small&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
* If you explicitly set the status in the method (using a test macro or a runtime call), this status will override the status that would otherwise be set by the return value&lt;br /&gt;
* If you don&#039;t explicitly set the status in the method, the return value determines the status as follows:&lt;br /&gt;
** Return is &#039;&#039;&#039;zero&#039;&#039;&#039; -&amp;gt; srTEST_PASS&lt;br /&gt;
** Return is &#039;&#039;&#039;non-zero&#039;&#039;&#039; -&amp;gt; srTEST_FAIL&lt;br /&gt;
|&lt;br /&gt;
* If the method runs to completion, the status is determined by the rules to the left (there is no default)  &lt;br /&gt;
* If the method does not run to completion (due to crash or hang in software under test), the status is srTEST_INPROGRESS&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;tt&amp;gt;bool&amp;lt;/tt&amp;gt; &lt;br /&gt;
| c++ only&lt;br /&gt;
|&lt;br /&gt;
* If you explicitly set the status in the method (using a test macro or a runtime call), this status will override the status that would otherwise be set by the return value&lt;br /&gt;
* If you don&#039;t explicitly set the status in the method, the return value determines the status as follows:&lt;br /&gt;
** Return is &#039;&#039;&#039;true&#039;&#039;&#039; -&amp;gt; srTEST_PASS&lt;br /&gt;
** Return is &#039;&#039;&#039;false&#039;&#039;&#039; -&amp;gt; srTEST_FAIL&lt;br /&gt;
|&lt;br /&gt;
* If the method runs to completion, the status is determined by the rules to the left (there is no default)  &lt;br /&gt;
* If the method does not run to completion (due to crash or hang in software under test), the status is srTEST_INPROGRESS&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Following are a few short  examples. In each example, a single test unit with the name &amp;quot;MyTest&amp;quot; is  identified to the Stride compiler via a [[Test Pragmas]].&lt;br /&gt;
&lt;br /&gt;
=== C++ Class  ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MyTest.h&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
class MyTest : public stride::srTest &lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  void ExpectPass() &lt;br /&gt;
  {&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should pass&amp;quot;);&lt;br /&gt;
    srEXPECT_EQ(2 + 2, 4); &lt;br /&gt;
  }&lt;br /&gt;
  void ExpectFail() &lt;br /&gt;
  {&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should fail&amp;quot;);&lt;br /&gt;
    srEXPECT_GT(2 * 3, 7); &lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
// this pragma  identifies MyTest as a test class to the STRIDE compiler&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C  Class ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MyTest.h&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
typedef struct MyTest&lt;br /&gt;
{&lt;br /&gt;
    void (*ExpectPass)(struct MyTest* self);&lt;br /&gt;
    void (*ExpectFail)(struct MyTest* self);&lt;br /&gt;
} MyTest;&lt;br /&gt;
&lt;br /&gt;
void MyTest_Init(MyTest* self);&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
//  This pragma identifies MyTest as a test c class to the STRIDE compiler.&lt;br /&gt;
//  Extra instrumentation code will be generated to call MyTest_Init()  before&lt;br /&gt;
// tests are run.&lt;br /&gt;
#pragma scl_test_cclass(MyTest, MyTest_Init)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MyTest.c&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include  &amp;quot;MyTest.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
static void ExpectPass(MyTest* self)&lt;br /&gt;
{&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should pass&amp;quot;);&lt;br /&gt;
    srEXPECT_EQ(2 + 2, 4); &lt;br /&gt;
}&lt;br /&gt;
static void ExpectFail(MyTest* self)&lt;br /&gt;
{&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should fail&amp;quot;);&lt;br /&gt;
    srEXPECT_GT(2 * 3, 7); &lt;br /&gt;
}&lt;br /&gt;
void MyTest_Init(MyTest* self)&lt;br /&gt;
{&lt;br /&gt;
    self-&amp;gt;ExpectPass = ExpectPass;&lt;br /&gt;
    self-&amp;gt;ExpectFail = ExpectFail;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Free Functions ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MyTest.h&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
void ExpectPass();&lt;br /&gt;
void ExpectFail();&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
//  this pragma identifies MyTest as a test unit to the STRIDE compiler,  specifying&lt;br /&gt;
// the four functions as members of the test unit&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;MyTest&amp;quot;, ExpectPass, ExpectFail, ChangeMyName, ChangeMyDescription)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MyTest.c&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;quot;MyTest.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
void ExpectPass()&lt;br /&gt;
{&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should pass&amp;quot;);&lt;br /&gt;
    srEXPECT_EQ(2 + 2, 4); &lt;br /&gt;
}&lt;br /&gt;
void ExpectFail()&lt;br /&gt;
{&lt;br /&gt;
    srNOTE_INFO(&amp;quot;this test should fail&amp;quot;);&lt;br /&gt;
    srEXPECT_GT(2 * 3, 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== C++ Only Features ==&lt;br /&gt;
&lt;br /&gt;
=== Use Operator &amp;lt;&amp;lt; to Augment Test Macros ===&lt;br /&gt;
&lt;br /&gt;
In C++ test code [[Test Point]], [[Test Log]] and [[Test Macros]] macros support adding to the annotation using the &amp;lt;&amp;lt; operator. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
srEXPECT_TRUE(a != b) &amp;lt;&amp;lt; &amp;quot;My custom message&amp;quot; &amp;lt;&amp;lt; &amp;quot; with more data &amp;quot; &amp;lt;&amp;lt; 1234;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As delivered, the macros will support stream input annotations for:&lt;br /&gt;
* all numeric types, &lt;br /&gt;
* C string (char* or wchar_t*), and &lt;br /&gt;
* types allowing implicit cast to numeric type or &amp;quot;C&amp;quot; string.&lt;br /&gt;
&lt;br /&gt;
=== Overloading the &amp;lt;&amp;lt; operator ===&lt;br /&gt;
&lt;br /&gt;
You can also overload the &amp;lt;&amp;lt; operator in order to annotate reports using your own custom type. An example is below.&lt;br /&gt;
&lt;br /&gt;
The following will compile and execute successfully given that the &amp;lt;&amp;lt; operator is overloaded as shown:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
// MyCustomClass implementation&lt;br /&gt;
class MyCustomClass&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
   MyCustomClass(int i) : m_int(i) {}&lt;br /&gt;
&lt;br /&gt;
private: &lt;br /&gt;
   int m_int; &lt;br /&gt;
   friend stride::Message&amp;amp; operator&amp;lt;&amp;lt;(stride::Message&amp;amp; ss, const MyCustomClass&amp;amp; obj);&lt;br /&gt;
}; &lt;br /&gt;
&lt;br /&gt;
stride::Message&amp;amp; operator&amp;lt;&amp;lt;(stride::Message&amp;amp; ss, const MyCustomClass&amp;amp; obj)&lt;br /&gt;
{&lt;br /&gt;
   ss &amp;lt;&amp;lt; obj.m_int;&lt;br /&gt;
   return ss;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void test()&lt;br /&gt;
{&lt;br /&gt;
    MyCustomClass custom(34); &lt;br /&gt;
&lt;br /&gt;
    srEXPECT_FALSE(true) &amp;lt;&amp;lt; custom;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Frequently_Asked_Questions_About_STRIDE&amp;diff=14427</id>
		<title>Frequently Asked Questions About STRIDE</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Frequently_Asked_Questions_About_STRIDE&amp;diff=14427"/>
		<updated>2015-07-07T02:39:50Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== Types of Testing Supported ==&lt;br /&gt;
One of the questions that should be asked is &#039;&#039;what is the &#039;&#039;&#039;value&#039;&#039;&#039; of the test?&#039;&#039; If the test does not discover any defects or does not provide ongoing regression, then the value is questionable. Also &#039;&#039;what is the &#039;&#039;&#039;effort&#039;&#039;&#039; in implementing the test?&#039;&#039; Stride has been uniquely designed to support maximizing the &#039;&#039; &#039;&#039;&#039;value&#039;&#039;&#039; &#039;&#039; of the test while minimizing the &#039;&#039; &#039;&#039;&#039;effort&#039;&#039;&#039; &#039;&#039; to implement it.&lt;br /&gt;
&lt;br /&gt;
Stride supports three general types of testing:&lt;br /&gt;
* &#039;&#039;&#039;Unit Testing&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;API Testing&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Integration Testing&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Unit Testing ===&lt;br /&gt;
&#039;&#039;&#039;Unit Testing&#039;&#039;&#039; is supported following the model found in typical [http://en.wikipedia.org/wiki/XUnit xUnit-style] testing frameworks. &lt;br /&gt;
&lt;br /&gt;
Traditional &#039;&#039;&#039;Unit Testing&#039;&#039;&#039; presents a number of challenges in testing embedded software:&lt;br /&gt;
&lt;br /&gt;
* Testing functions/classes in &#039;&#039;&#039;isolation&#039;&#039;&#039; requires a lot of extra work, especially if your software was not designed upfront for testability&lt;br /&gt;
* The software is often not well suited for &#039;&#039;&#039;others&#039;&#039;&#039; to participate in the test implementation, since there is too much internal knowledge required to be productive&lt;br /&gt;
* It can be difficult to automate execution of the full set of tests on the real target device&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unit Testing&#039;&#039;&#039; legacy software may have limited value, particularly if the software is stable with respect to defects. The best &#039;&#039;return-of-effort&#039;&#039; is often experienced when focused on &#039;&#039;&#039;brand new&#039;&#039;&#039; software components.&lt;br /&gt;
&lt;br /&gt;
=== API Testing ===&lt;br /&gt;
Stride supports &#039;&#039;&#039;API Testing&#039;&#039;&#039; by leveraging the same techniques available for Unit Testing. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;API Testing&#039;&#039;&#039; differs from unit testing in that the tests focus on direct testing (calling) of a well-defined interface. &lt;br /&gt;
 &lt;br /&gt;
* The design of &#039;&#039;public interfaces&#039;&#039; often lends itself to testing in isolation &#039;&#039;without&#039;&#039; implementing special test logic (i.e. no stubbing required), which make the test implementation simpler. &lt;br /&gt;
* Public APIs are most likely documented and as a result, &#039;&#039;non domain experts&#039;&#039; can more easily participate in the test implementation &lt;br /&gt;
&lt;br /&gt;
Although &#039;&#039;&#039;API Testing&#039;&#039;&#039; often represents a smaller percentage of the software being exercised, this kind of testing is typically well understood, easy to scope, and often has a better &#039;&#039;return-on-effort&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Integration Testing ===&lt;br /&gt;
Stride also supports &#039;&#039;&#039;Integration Testing&#039;&#039;&#039;, which is different than Unit Testing or API Testing in that it does not focus simply on calling functions and validating return values. To learn more about some of the unique testing techniques well suited for this type of testing [[Expectations | &#039;&#039;&#039;read here&#039;&#039;&#039;]]. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Integration Testing&#039;&#039;&#039; focuses on validating a larger scope of the software while executing under normal operating conditions. &lt;br /&gt;
&lt;br /&gt;
* Tests are performed typically with fully functional software build&lt;br /&gt;
* There are minimal code isolation challenges&lt;br /&gt;
* Test results provide a sanity check on the health the software &lt;br /&gt;
&lt;br /&gt;
We believe that &#039;&#039;&#039;Integration Testing&#039;&#039;&#039; has a very high &#039;&#039;return-on-effort&#039;&#039; and is more applicable to legacy software systems. &lt;br /&gt;
&lt;br /&gt;
== Getting Started ==&lt;br /&gt;
&lt;br /&gt;
=== How long does it take to install STRIDE? ===&lt;br /&gt;
&lt;br /&gt;
==== Off-Target Installation ====&lt;br /&gt;
Off-target installation to a desktop or laptop PC takes just minutes; support is offered for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
==== On-Target Installation ====&lt;br /&gt;
For standard embedded platforms such as Linux, Android and Windows the installation process varies between a few hours to a couple of days. We provide SDK packages that provide a reference to integrators. &lt;br /&gt;
&lt;br /&gt;
For proprietary embedded targets, a custom [[Platform_Abstraction_Layer|Platform Abstraction Layer (PAL)]] is required. The PAL provides the glue between the [[STRIDE Runtime | Stride Runtime]] and services offered by the OS. It is the only piece of the runtime that is customized between operating systems. The implementation of the PAL ranges between a day to a week depending on the complexity of the OS. There is also a [[Build Integration | build integration]] step. This involves integrating the [[STRIDE Build Tools | Stride Build Tools]] into your software make process. The activity ranges from a single day to several days. &lt;br /&gt;
&lt;br /&gt;
=== What kind of training is required? ===&lt;br /&gt;
&lt;br /&gt;
Our training [[Training Overview | approach]] is based on wiki articles, samples, and leveraging the [[Stride Sandbox]. The training has been set up for self-guided instruction that can be leveraged for an initial introduction of the technology and on-demand for specific topics when required.&lt;br /&gt;
&lt;br /&gt;
== Integration with Stride ==&lt;br /&gt;
&lt;br /&gt;
=== What is the size of the Stride Runtime? ===&lt;br /&gt;
&lt;br /&gt;
The [[STRIDE Runtime |Runtime]] is a source package that supports connectivity with the host system and provides[[Runtime_Test_Services | services for testing]] and [[Test Macros]].  The &#039;&#039;Runtime&#039;&#039; is tailored specifically to embedded applications, overhead is minimal. It consumes very little memory for table and control block storage. Resource usage is [[STRIDE_Runtime#Runtime_Configuration | configurable]] and can be tailored to the limitations of the target platform.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Typical resource usage&lt;br /&gt;
! Aspect !! Resources&lt;br /&gt;
|-&lt;br /&gt;
| Code Space || About 90-130 KB depending on the compiler of use and the level of optimization.&lt;br /&gt;
|-&lt;br /&gt;
| Memory Usage || Configurable, by default set to about 10 KB &lt;br /&gt;
|-&lt;br /&gt;
| Threads || 3 Threads; configurable priority; blocked when inactive&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== What is the processing overhead? ===&lt;br /&gt;
&lt;br /&gt;
The [[STRIDE Runtime | Stride Runtime]] overhead is minimized by collecting raw data on the target, and transferring information at a low priority task to the host for processing. Processing is only active when executing tests via the [[Stride Runner]].&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
=== What languages are supported? ===&lt;br /&gt;
&lt;br /&gt;
Tests can be written using &#039;&#039;&#039;C&#039;&#039;&#039;, &#039;&#039;&#039;C++&#039;&#039;&#039;, and &#039;&#039;&#039;Perl&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Is there any alternative to running Stride tests with a real device? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Tests can be also be built and executed using the [[Stride Sandbox]]. In order for this to work, your device source code must be built along with the test code using the host&#039;s desktop toolchain (MSVC on Windows, gcc on Linux).&lt;br /&gt;
&lt;br /&gt;
== Test Automation  ==&lt;br /&gt;
&lt;br /&gt;
=== What is continuous integration and why should I care? ===&lt;br /&gt;
&lt;br /&gt;
The key principle of continuous integration is regular testing of your  software--ideally done in an automated fashion. Stride tests are  reusable and automated. Over time, these tests accumulate, providing  more and more comprehensive coverage. By automating the execution of  tests and results publication via [http://www.testspace.com Testspace] with every software build,  development teams gain immediate feedback on defects and the health of  their software. By detecting and repairing defects immediately, the  expense and time involved with correcting bugs is minimized.&lt;br /&gt;
&lt;br /&gt;
=== Does Stride support continuous integration? ===&lt;br /&gt;
&lt;br /&gt;
Yes. The [[Stride Runner]] provides a straightforward means to connect to the device under test and execute the test cases you&#039;ve implemented using Stride. The runner allows you to configure which tests to run and how to organize the results using sub-suites in the report. Since the runner supports an option-based command line interface, this tool is easy to integrate with typical continuous integration servers.  &lt;br /&gt;
&lt;br /&gt;
=== Where/how do you store test results? ===&lt;br /&gt;
&lt;br /&gt;
When you execute your tests using the [[Stride Runner]], upon completion the results are written to an xml file. This xml file uses a custom schema for representing the hierarchy of results (suites, cases, etc.). These files also include a stylsheet specification (which will be written to the same directory as the xml file) that allows them to be viewed as HTML in a browser. You are free to store these files for future use/reference. The runner &#039;&#039;&#039;also&#039;&#039;&#039; supports direct publishing to [http://www.testspace.com Testspace] which is a hosted web application for viewing and collaborating on your test results. Once you are regularly executing tests, whether automatically or manually, we recommend you use the publish feature to persist and share your test results.&lt;br /&gt;
&lt;br /&gt;
=== Can I get  email containing test reports? ===&lt;br /&gt;
&lt;br /&gt;
Yes. If you use [http://www.testspace.com Testspace] to store your results, you can optionally configure your test space(s) to automatically notify users when new results are uploaded. The email that is generated by Test Space contains only summary information and provides links so that you can view the complete report data.&lt;br /&gt;
&lt;br /&gt;
If you are using a continuous integration server to initiate your testing, it&#039;s likely that it supports different forms of notification when the testing is complete, so it&#039;s often possible to attach the xml report data as part of the CI server notification.&lt;br /&gt;
&lt;br /&gt;
== Source Instrumentation ==&lt;br /&gt;
&lt;br /&gt;
=== What are the advantages of Test Points over logging? ===&lt;br /&gt;
&lt;br /&gt;
[[Test Point | Test Points]] can be used for direct validation during real-time execution. Logging systems, while often useful for historical record, can only be used for post-processing validation at best. What&#039;s more, since there is no standard way to post-process logs, users often rely on manual inspection or non-scalable homegrown solutions for validation. Test Point validation is fully automated using the STRIDE Framework, which provides robust harnessing and reporting. Test Points also can include optional data payloads which can be very useful for validating state when a point is hit. Test Points have potentially lower impact on the system than standard logging since they &#039;&#039;&#039;(1)&#039;&#039;&#039; are only sent from the origin if a test is actively subscribed to test point (labels are used as a filter at runtime) and &#039;&#039;&#039;(2)&#039;&#039;&#039; test points can be completely disabled (no-opped) in your build by undefining a single preprocessor macro [[Runtime_Integration#STRIDE_Feature_Control | (STRIDE_ENABLED)]].&lt;br /&gt;
&lt;br /&gt;
=== What about source instrumentation bloat? ===&lt;br /&gt;
&lt;br /&gt;
Any mature code base has some level of diagnostic bloat to it. This often takes the form of ad-hoc logging or debug statements. With Stride [[Test Point | Test Points]] and [[Test Log | Test Logs]], you open your software to better automated test scenarios. All Stride instrumentation takes the form of single line macros, so the amount of instrumentation bloat is no worse than other typical ad-hoc diagnostics. What&#039;s more, the Stride macros are all designed to be quickly no-opped in a build via a single preprocessor macro, making it possible to completely eliminate any actual impact on certain builds, if so desired.&lt;br /&gt;
&lt;br /&gt;
=== Are all Test Points active? ===&lt;br /&gt;
&lt;br /&gt;
No. Under normal testing scenarios, only the specific test points that are needed for a test are actually broadcast through the system. We accomplish this by setting test point filters (by label) on the system whenever one of the Test Point setup functions is called (in script or native code). These filters are reset or removed at the end of the test, so in general &#039;&#039;none&#039;&#039; of the test points are actually sent through the system if no test is currently active. That said, there are a few special use cases in which &#039;&#039;all&#039;&#039; test points become active in the system - namely, when tracing is activated on the host runner and when a specific test case uses a set that include &#039;&#039;TEST_POINT_EVERYTHING_ELSE&#039;&#039;. In general, however, the test points that are actually sent from the system are &#039;&#039;only&#039;&#039; those that are needed to execute the behavior validation for the current test.&lt;br /&gt;
&lt;br /&gt;
=== Will it affect performance? ===&lt;br /&gt;
&lt;br /&gt;
Our experience on a wide-range of systems has shown minimal impact from the Stride instrumentation.  The Stride Runtime has been designed to be small, portable, and readily configurable, allowing it to be optimized for the platform&#039;s specific characteristics. &lt;br /&gt;
&lt;br /&gt;
=== Should I leave Test Points in? ===&lt;br /&gt;
&lt;br /&gt;
Yes. Once you have some behavior tests written, it&#039;s worthwhile to maintain that instrumentation and the corresponding tests, which allows you to run the tests on any stride-enabled build. All of the instrumentation macros are easily no-opped via a single preprocessor flag, so you can choose to effectively remove the instrumentation code on select builds (production/release builds, for example). The ultimate value of instrumentation is the continuous feedback you get by regularly executing the automated tests on the build.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Expectations&amp;diff=14426</id>
		<title>Expectations</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Expectations&amp;diff=14426"/>
		<updated>2015-07-07T02:25:51Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Stride supports &#039;&#039;&#039;Behavior Testing&#039;&#039;&#039;, which is different than Unit Testing or API Testing in that it does not focus on calling functions and validating return values. Behavior Testing validates the &#039;&#039;expected sequencing and state of the software&#039;&#039; executing under normal operating conditions. In order to begin this type of testing, you must &#039;&#039;&#039;(1)&#039;&#039;&#039; instrument the source under test with [[Test Point | Test Points]] and &#039;&#039;&#039;(2)&#039;&#039;&#039; define the &#039;&#039;expectations&#039;&#039; of the Test Points for each test scenario. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Validation Model&#039;&#039;&#039; is based on validating that the &#039;&#039;Expected List&#039;&#039; of Test Points have been hit as well as optionally validating any &#039;&#039;state data&#039;&#039; associated with a Test Point member. Through the use of an &#039;&#039;Unexpected  List&#039;&#039;, it&#039;s possible to simulataneously validate that specified Test Points are NOT hit during the execution of the scenario. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Expected List&#039;&#039; and &#039;&#039;Unexpected List&#039;&#039; declared for a specific testing scenario define the &#039;&#039;active&#039;&#039; set of Test Points for the system. All other Test Points within the software are not active and have nominal impact. &lt;br /&gt;
&lt;br /&gt;
= Expected List =&lt;br /&gt;
&lt;br /&gt;
The first step in defining &#039;&#039;&#039;Expectations&#039;&#039;&#039; is describing the set of Test Points expected to be hit during a test scenario. This is the &#039;&#039;&#039;list&#039;&#039;&#039; of Test Points and the expected number of hits (&#039;&#039;&#039;count&#039;&#039;&#039;) for each of the Test Points. Any expected &#039;&#039;&#039;state data&#039;&#039;&#039; associated with a Test Point that requires validation should be included. &lt;br /&gt;
&lt;br /&gt;
The validation of the &#039;&#039;Expected List&#039;&#039; is done when any of the following conditions are met:&lt;br /&gt;
* The &#039;&#039;Expected List&#039;&#039; sequencing has been met completely&lt;br /&gt;
* The time allocated for validation has expired&lt;br /&gt;
* State data associated with a Test Point is declared invalid&lt;br /&gt;
* An out-of-sequence Test Point has been encountered (a concrete failure is identified)&lt;br /&gt;
* An [[Expectations#Unexpected_List | Unexpected Test Point]] has been encountered&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Expected TEST POINTS list:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Label&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Count&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Expected State Data&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Name 1 &lt;br /&gt;
|   1&lt;br /&gt;
| &#039;&#039;&amp;lt;describe data payload validation requirements if applicable&amp;gt;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Name 2&lt;br /&gt;
| 1 +&lt;br /&gt;
| &#039;&#039;&amp;lt;describe data payload validation requirements if applicable&amp;gt;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;name ...&#039;&#039;&lt;br /&gt;
|  &#039;&#039;n&#039;&#039;&lt;br /&gt;
| &#039;&#039;&amp;lt;...&amp;gt;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sequencing Properties ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Expected List&#039;&#039; requires defining &#039;&#039;sequencing properties&#039;&#039; used for the validation. This involves establishing how to process the &#039;&#039;&#039;ordering&#039;&#039;&#039; of the Test Points being hit, how &#039;&#039;&#039;strict&#039;&#039;&#039; to handle duplications of Test Point members, and if to &#039;&#039;&#039;continue&#039;&#039;&#039; capturing Test Points for the entire time allocated for the test scenario even though the &#039;&#039;Expected List&#039;&#039; sequencing requirements have been met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Expected TEST POINTS sequencing properties:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Properties&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Ordered&#039;&#039; &lt;br /&gt;
| Test Points are expected to be hit in the exact order defined in the list&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Unordered&#039;&#039; &lt;br /&gt;
| Test Points can be hit in any order defined in the list &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Strict&#039;&#039;&lt;br /&gt;
| Test Points specified in the list must match the exact count (i.e. no duplication)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Non-Strict&#039;&#039;&lt;br /&gt;
| Test Points specified in the list can be duplicated anywhere in the sequence &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Continue&#039;&#039;&lt;br /&gt;
| Test Points validation will continue even though the &#039;&#039;Expected List&#039;&#039; has been met &#039;&#039;so far&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== State Data Validation ===&lt;br /&gt;
&lt;br /&gt;
State data validation for a Test Point member is optional. The &#039;&#039;Expected List&#039;&#039; can associate a &#039;&#039;predicate&#039;&#039;&amp;lt;ref name=&amp;quot;predicate&amp;quot;&amp;gt;Defined as a necessary condition of the Test Point being valid -- logic within the predicate determines if &#039;&#039;valid&#039;&#039;, &#039;&#039;invalid&#039;&#039;, or &#039;&#039;ignored&#039;&#039; &amp;lt;/ref&amp;gt; as a necessary condition for validation of a Test Point member when being processed. The predicate provides an extra level of validation (beyond sequencing) focusing on the state data associated with the Test Point. &lt;br /&gt;
&lt;br /&gt;
The predicate can declare the Test Point:&lt;br /&gt;
* Valid - successful, thus the expected count is decremented&lt;br /&gt;
* Invalid - the expectations is NOT met, indicating failure&lt;br /&gt;
* Ignored - no affect on the validation, continue to wait on the current Test Point&lt;br /&gt;
&lt;br /&gt;
= Unexpected List =&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;Unexpected List&#039;&#039; of Test Points can optionally be defined. This list works in conjunction with the [[Expectations#Expected_List | &#039;&#039;Expected List&#039;&#039;]]. The list defines a set of Test Points that are to be treated as failures if any one of them is encountered (hit) during a testing scenario.&lt;br /&gt;
&lt;br /&gt;
This list can be made up of the &#039;&#039; &#039;&#039;&#039;complement&#039;&#039;&#039; &#039;&#039; of the &#039;&#039;Expected List&#039;&#039;, thus including &#039;&#039;all&#039;&#039; Test Points not included in that defined set. This type of setting requires enabling all Test Points defined in the software during the execution of the test.&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;Unexpected List&#039;&#039; members intersect with the &#039;&#039;Expected List&#039;&#039; members, that is considered an input error.&lt;br /&gt;
&lt;br /&gt;
= Special Processing =&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
There are two &#039;&#039;special members&#039;&#039; that can be used for the &#039;&#039;Expected List&#039;&#039; called &#039;&#039;&#039;ANY IN SET&#039;&#039;&#039; and &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039;. These special member values are used to customize the success criteria (i.e. trigger condition) for the entry defined within the &#039;&#039;Expected List&#039;&#039;. Both types require a predicate&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; to determine if the Test Point is &#039;&#039;valid, invalid, or ignored&#039;&#039;. The &#039;&#039;&#039;ANY IN SET&#039;&#039;&#039; refers to the set of points defined by the &#039;&#039;Expected List&#039;&#039; while the &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039; refers to all Test Points in the system. By definition the &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039; member requires enabling all Test Points defined in the software during the execution of the test. &lt;br /&gt;
&lt;br /&gt;
Concerning an &#039;&#039;&#039;Unordered&#039;&#039;&#039; &#039;&#039;Expected List&#039;&#039;, only one special member can be used. It will be processed first independent of its location within the list. The &#039;&#039;&#039;Count&#039;&#039;&#039; attribute is also optionally available to be used with the special members, indicating the number of valid returns from the predicate until the next Test Point in the list is validated. &lt;br /&gt;
&lt;br /&gt;
There is one &#039;&#039;special member&#039;&#039; that can be used for the &#039;&#039;Unexpected List&#039;&#039; called &#039;&#039;&#039;EVERYTHING ELSE&#039;&#039;&#039;. This special member can only be used as a &#039;&#039;&#039;single member only&#039;&#039;&#039; within an &#039;&#039;Unexpected List&#039;&#039;. It takes the &#039;&#039;complement&#039;&#039; of the set of Test Points defined within the &#039;&#039;Expected List&#039;&#039;. This requires enabling all Test Points defined in the software during the execution of the test. Also, by definition any non-expected Test Point hit during the test would be deemed a failure.&lt;br /&gt;
&lt;br /&gt;
=== Counts ===&lt;br /&gt;
There is one &#039;&#039;special count&#039;&#039; value that can be associated with a Test Point defined in the &#039;&#039;Expected List&#039;&#039; called &#039;&#039;&#039;ANY COUNT&#039;&#039;&#039;. This special count is used to focus on capturing a variable number of Test Point hits -- 0 or more. In essences the Test Point has no consequences of the Expected List sequencing, except if a predicate&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; associated with the Test Point returns &#039;&#039;invalid&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
&lt;br /&gt;
The following use cases provide examples of defining &#039;&#039;&#039;Expectations&#039;&#039;&#039; based on different testing scenarios.&lt;br /&gt;
&lt;br /&gt;
=== Sequencing Properties ===&lt;br /&gt;
Use case examples for validating the [[Expectations#Sequencing_Properties | sequencing]] of Test Points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,D,C]   - FAIL (D hit before C)&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered of Test Points but with duplicates &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,C,D] - FAIL (B duplicated with strict defined)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,C,D] - PASS&lt;br /&gt;
  Hits   = [A,C,B,C,D] - PASS&lt;br /&gt;
  Hits   = [A,B,C,B,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points to be hit, but the order does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,D]   - PASS&lt;br /&gt;
  Hits   = [B,A,C,B,D] - FAIL (B hit twice)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,B,D] - PASS &lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points to be hit, but order and duplications does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,B,D] - PASS&lt;br /&gt;
  Hits   = [B,A,A,A,D] - FAIL (C never hit)&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit, but checking for any &#039;&#039;extra&#039;&#039; hits for total duration of test scenario&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;, &#039;&#039;CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,C,D,A] - FAIL (A hit after valid sequence met based on test timeout)&lt;br /&gt;
&lt;br /&gt;
=== Count Attribute ===&lt;br /&gt;
Use case examples that leverage the [[Expectations#Count | Count]] attribute associated with a list member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting a sequence of Test Points, including multiple hits for 2 members&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D:2]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B,C,D,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,B,C,B,D,D]   - FAIL (B not hit three times before C)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D:2]; &#039;&#039;ORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B,C,B,D,D]  - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points being hit, including multiple hits (with duplications), but order does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,B,C,B,D]     - PASS&lt;br /&gt;
  Hits   = [B,A,B,B,C,B,D]   - FAIL (B duplicated on 4th hit)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,B,B,C,B,D]   - PASS&lt;br /&gt;
&lt;br /&gt;
=== State Data Validation ===&lt;br /&gt;
Use case examples leveraging predicates&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; to [[Expectations#State_Data_Validation | validate state data]].&lt;br /&gt;
&lt;br /&gt;
Simple example showing associating a predicate with Test Point named &#039;&#039;A&#039;&#039;.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:p1(tp),B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) { return VALID }&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting Test Point &#039;&#039;B&#039;&#039; to be hit 3 times&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3:p1(tp),C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) { return VALID unless 3rd time called than return INVALID}&lt;br /&gt;
  Hits   = [B,A,B,C,B,D]     - FAIL (predicate returns invalid on 3rd B hit)&lt;br /&gt;
&lt;br /&gt;
=== Special Members ===&lt;br /&gt;
Use case examples using the two [[Expectations#Members | special members]] within an &#039;&#039;Expected List&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Waiting on a single trigger (D) to start the processing of an Expected List&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,C:2,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit otherwise IGNORE}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,B,C,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Waiting on Test Point &#039;&#039;outside&#039;&#039; of the Expected List to trigger processing&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp),A,B,C:2,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when x hit}&lt;br /&gt;
  Hits   = [A,B,A,x*,A,B,C,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Waiting on a multiple triggers - 1st trigger used to start processing and 2nd used midstream&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,ANY_IN_SET:p2(tp),C:2,D,E]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit}&lt;br /&gt;
  p2(tp) {return VALID when E hit}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,B,A,A,B,E*,C,C,D,E] - PASS&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,C:2,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,A,A,D,A,C,B,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
This test uses the ANY AT ALL along with a fix count of 3&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):3,A,B,C]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  Hits   = [A,z,x,A,B,C]   - PASS&lt;br /&gt;
&lt;br /&gt;
=== Special Counts ===&lt;br /&gt;
Use case examples leveraging the [[Expectations#Special_Counts | special count attributes]] within an &#039;&#039;Expected List&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting between 0 and more Test Point As to be hit before processing the remaining members. &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:ANY_COUNT,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,C,D]     - PASS&lt;br /&gt;
  Hits   = [A,A,B,C,D]   - PASS&lt;br /&gt;
 &lt;br /&gt;
This test passes &#039;&#039;immediately&#039;&#039; after the A is hit (example of a weird expectation)&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:ANY_COUNT]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,..]      - PASS&lt;br /&gt;
&lt;br /&gt;
This test also passes, but will process all Test Point B hits until the test time expires&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:ANY_COUNT]; &#039;&#039;ORDERED, STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B]    - PASS (the wait timeout will complete the validation)&lt;br /&gt;
  Hits   = [A]          - PASS&lt;br /&gt;
&lt;br /&gt;
This test fails because all Test Points are checked once the test time expires&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A]; &#039;&#039;ORDERED, STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,A]      - FAILS (the wait timeout than will complete the validation)&lt;br /&gt;
&lt;br /&gt;
This test validates a set of Test Points focusing exclusively on the associated &#039;&#039;state data&#039;&#039;&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:p1(tp):ANY_COUNT, B:p2(tp):ANY_COUNT, C:p2(tp):ANY_COUNT]; &#039;&#039;UNORDERED, CONTINUE&#039;&#039; (STRICT NA)&lt;br /&gt;
  Hits   = [A,A,B,A,C,C,C,A,..] - PASS (unless any of the predicates fails)&lt;br /&gt;
  Hits   = [A,B,C,D]            - PASS&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
The following are miscellaneous use cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit, but verifying certain Test Points are NOT hit&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [x,y]&lt;br /&gt;
  Hits     = [A,B,C,D]    - PASS&lt;br /&gt;
  Hits     = [A,B,B,C,D]  - FAIL&lt;br /&gt;
  Hits     = [A,B,C,y,..] - FAIL&lt;br /&gt;
&lt;br /&gt;
This test will always pass and log every Test Point hit during test time duration. Note all Test Points are active.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):ANY_COUNT]; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  Hits   = [A,A,B,x,y,D, ..]   - PASS (the wait timeout will complete the validation)&lt;br /&gt;
&lt;br /&gt;
This test will log every Test Point hit during test, looking for X and Y as failures. Note all Test Points are active.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):ANY_COUNT]; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [X,Y]&lt;br /&gt;
  Hits   = [A,A,B,x,y,D,Y]   - FAIL (last Test Point hit causes a failure)&lt;br /&gt;
&lt;br /&gt;
This test will fail on any Test Point that is hit. Note all Test Points are active. Test will last based on time duration or the 1st Test Point hit.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = NULL; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [EVERYTHING_ELSE]&lt;br /&gt;
  Hits   = [A,..]   - FAIL &lt;br /&gt;
&lt;br /&gt;
This test will ignore any Test Point hit during test, looking for X and Y as failures. &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = NULL; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [X,Y]&lt;br /&gt;
  Hits   = [..,X,..]   - FAIL&lt;br /&gt;
&lt;br /&gt;
This test will fail on any Test Points hit except for A &amp;amp; B. Note all Test Points are active. Test will last until failure or timeout.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = [A,B]; &#039;&#039;UNORDERED, NON-STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [EVERYTHING_ELSE]&lt;br /&gt;
  Hits   = [..,A,..,X]   - FAIL&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Stride_Overview&amp;diff=14425</id>
		<title>Stride Overview</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Stride_Overview&amp;diff=14425"/>
		<updated>2015-07-07T02:22:02Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&#039;&#039;&#039;Stride™&#039;&#039;&#039; is a [http://en.wikipedia.org/wiki/XUnit xUnit-style] test framework for C/C++ software comprised of an external test &#039;&#039;Runner&#039;&#039; , &#039;&#039;Runtime&#039;&#039; library, and a set of &#039;&#039;Build Tools&#039;&#039;. It was designed with a specific focus on enabling tests to be executed on a device using a fully functional build. This means that the software works the same as before, but also has built-in tests that can be invoked on-demand by the test &#039;&#039;Runner&#039;&#039;. Stride has also been integrated with [http://www.testspace.com Testspace] for test content management.  &lt;br /&gt;
&lt;br /&gt;
Stride&#039;s unique host-target architecture allows easier and better On-Target/Device White-box testing. Software builds automatically become more testable; facilitating deeper code coverage opportunities.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Stride Overview.jpg | 600px | center | Stride block diagram]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Runner ====&lt;br /&gt;
Stride includes a lightweight [[Stride_Runner | &#039;&#039;&#039;Runner&#039;&#039;&#039;]] application that is a host-based command-line utility for interactive and automated test execution. It also integrates seamlessly with [http://www.testspace.com Testspace] for &#039;&#039;test content management&#039;&#039;.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Runtime====&lt;br /&gt;
Stride also contains a [[STRIDE Runtime | &#039;&#039;&#039;Runtime&#039;&#039;&#039;]] software source package that supports connectivity with the host system. It is integrated with embedded application software to enable &#039;&#039;testability&#039;&#039; to be compiled into the software with minimal impact on performance or the size of the application. The software is agnostic to the RTOS, CPU, and transport. It can be configured to support multi-processes, multi-threads, user/kernel spaces, or a simpler single application process. Typically the runtime is configured as a background thread and only executes when running tests.&lt;br /&gt;
&lt;br /&gt;
==== Build Tools ====&lt;br /&gt;
[[image:STRIDE 4.2 Framework-b.jpg |right|300px | border]]&lt;br /&gt;
&lt;br /&gt;
The Stride [[STRIDE_Build_Tools | &#039;&#039;&#039;Build Tools&#039;&#039;&#039;]] are a set of command-line utilities that integrate with your target software build process. They preprocess standard C/C++ header files that contain Stride test declarations to  auto-generate source code comprising a custom [[Intercept_Module | &#039;&#039;&#039;Intercept Module&#039;&#039;&#039;]]. The intercept module code is then built with the Stride Runtime to provide &#039;&#039;fixturing&#039;&#039; and &#039;&#039;harnessing&#039;&#039; test logic as part of your build image.&lt;br /&gt;
&lt;br /&gt;
= Cross Platform =&lt;br /&gt;
Stride works on virtually any target platform. Stride&#039;s cross-platform framework facilitates a &#039;&#039;unified testing approach&#039;&#039; for all team members, enabling organizations to standardize on a test workflow that is independent of the target platform being used or what branch of software is being changed.&lt;br /&gt;
&lt;br /&gt;
=== Runtime written in standard C ===&lt;br /&gt;
The Stride Runtime is written in standard C on top of a simple [[Platform_Abstraction_Layer | &#039;&#039;&#039;platform abstraction layer&#039;&#039;&#039;]] that enables it to work across platforms. It can be configured for a single process multi-threading environment or multiple process environments (i.e. Linux, Windows, Embedded RTOS, etc.). It is delivered as source code to be included in the application&#039;s build system. The transport between the host and target is configurable and supports Serial and TCP/IP by default. Custom transports are also available. The runtime has also been tailored specifically to embedded applications, overhead is minimal. It consumes very little memory for table and control block storage. Resource usage is configurable and can be tailored to the limitations of the target platform.&lt;br /&gt;
&lt;br /&gt;
===Integrates With Your Existing Build System ===&lt;br /&gt;
Stride also auto-generates &#039;&#039;intercept module&#039;&#039; used for harnessing and remote logic as source code during the make process, removing any dependencies on specific compilers and / or processors.&lt;br /&gt;
&lt;br /&gt;
===Supports Off-Target Testing ===&lt;br /&gt;
Testing can also be conducted using a standard desktop machine (Windows, Linux, or FreeBSD). The Stride &#039;&#039;SDKs&#039;&#039; allow for a seamless transition between the real target and an Off-Target host environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Rich set of Assertions =&lt;br /&gt;
Test cases are typically constructed leveraging a large set of available assertion macros. On failures macros provide such details as file name, line number, and why the condition failed. Stride provides are large set of optional macros available for automatic report annotation in the case of failures. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Extensive Parameter Support =&lt;br /&gt;
&lt;br /&gt;
Parameterized testing is key to reducing test code duplication. Constructor arguments, name-value collections, and host file remoting are all supported. Stride provides an easy way for passing and accessing these types of parameters, allowing customization of test behavior at runtime.&lt;br /&gt;
&lt;br /&gt;
Create an INI-type of file (i.e. myinput.ini)&lt;br /&gt;
&lt;br /&gt;
 Loopsize   = 10&lt;br /&gt;
 InputFile  = ${MYPATH}/datacontent.bin&lt;br /&gt;
 Toogle     = On&lt;br /&gt;
&lt;br /&gt;
Pass the name-value collection using the Stride Runner&lt;br /&gt;
&lt;br /&gt;
 $ stride .. --run=&amp;quot;MyTest(/path/to/myinput.ini)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now simply access your input within test logic using built-in services&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  // .. doing stuff ..&lt;br /&gt;
  GetParam(&amp;quot;Loopsize&amp;quot;, buffer, size);&lt;br /&gt;
  //.. using parameters for test logic&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Test Doubles &amp;amp; Test Points = &lt;br /&gt;
Stride offers advanced testing techniques that enable deeper and more effective testing with less effort.&lt;br /&gt;
&lt;br /&gt;
===Test Doubles===&lt;br /&gt;
For more advanced testing scenarios, dependencies can be &#039;&#039;&#039;doubled&#039;&#039;&#039;. This feature provides a means for intercepting C/C++ global functions on the target and substituting a stub, fake, or mock. The substitution is all controllable via the runtime, allowing the software to continue executing normally when not running a test.&lt;br /&gt;
&lt;br /&gt;
For example something like the following could be useful:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
void MySuite::test1()&lt;br /&gt;
{&lt;br /&gt;
  // inserting my own version of malloc()&lt;br /&gt;
  srDOUBLE_SET(malloc, my_malloc_stub);&lt;br /&gt;
&lt;br /&gt;
  // calling a routine that uses malloc(). checking handled null correctly&lt;br /&gt;
  ret_code = FuncThatUsersMalloc(42);&lt;br /&gt;
  srEXPECT_EQ(ret_code, -1)&lt;br /&gt;
&lt;br /&gt;
  // restoring the real malloc()&lt;br /&gt;
  srDOUBLE_RESET(malloc)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Points ===&lt;br /&gt;
Stride leverages &#039;&#039;source instrumentation&#039;&#039; to provide an additional validation technique called &#039;&#039;&#039;Expectation Testing&#039;&#039;&#039; that can be applied to the executing software application. The execution sequencing of the code, along with state data, can be automatically validated based on &#039;&#039;what is expected&#039;&#039;. This validation technique does not focus on calling functions / methods but rather verifies &#039;&#039;code sequencing&#039;&#039;. This can span threads, process boundaries, and even multiple targets, as the application(s) is running. Leveraging simple macros -- called [[Test_Point | &#039;&#039;&#039;Test Points&#039;&#039;&#039;]] -- developers strategically instrument the source under test.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;IMPORTANT&amp;quot;, &amp;quot;important date= %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test validation is done without impacting the application&#039;s performance (the on-target test code is executed in a background thread and scripts are executed on the host machine). When failures do occur, context is provided with the file name and associated line number of the failed expectations. This type of validation can be applied to a wide-range of testing scenarios:&lt;br /&gt;
* State Machines&lt;br /&gt;
* Data flow through system components&lt;br /&gt;
* Sequencing between threads&lt;br /&gt;
* Drivers that don&#039;t return values&lt;br /&gt;
* and much more ...&lt;br /&gt;
&lt;br /&gt;
The following is a snippet of what the test code might look like&lt;br /&gt;
&amp;lt;source = lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 srTestPointExpect_t expected[]={&lt;br /&gt;
    {&amp;quot;IMPORTANT&amp;quot;}, myCheckData,&lt;br /&gt;
    {&amp;quot;ANOTHER_TP&amp;quot;},&lt;br /&gt;
    {0}};&lt;br /&gt;
&lt;br /&gt;
 // setup the expections&lt;br /&gt;
 srTestPointSetup(..);&lt;br /&gt;
&lt;br /&gt;
 // start the operations&lt;br /&gt;
&lt;br /&gt;
 srTestPointWait(handle, 1000);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Test Implementation =&lt;br /&gt;
Stride based tests are integrated with the existing build system enabling your software to be both fully &#039;&#039;functional&#039;&#039; and &#039;&#039;testable&#039;&#039; at the same time. The &#039;&#039;test logic&#039;&#039; is separated from the application source code and is &#039;&#039;&#039;not&#039;&#039;&#039; executed unless invoked via the Stride Runner. Any &#039;&#039;source instrumentation&#039;&#039; is only active when executing tests. The impact of built-in testability to the software application is nominal.&lt;br /&gt;
&lt;br /&gt;
The test validation can be implemented in both &#039;&#039;C/C++&#039;&#039; on the target and &#039;&#039;Perl&#039;&#039; on the host. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;C/C++ Test Unit Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
class MyTest {&lt;br /&gt;
public: &lt;br /&gt;
    void CheckFoo();&lt;br /&gt;
    void CheckBoo();&lt;br /&gt;
};&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Perl Test Script Example&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
sub CheckFoo : Test&lt;br /&gt;
{&lt;br /&gt;
    EXPECT_EQ(Remote-&amp;gt;foo(2 + 2), 4);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub CheckBoo : Test&lt;br /&gt;
{&lt;br /&gt;
    EXPECT_GT(Remote-&amp;gt;boo(3 * 3), 7);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Works with Testspace =&lt;br /&gt;
&lt;br /&gt;
Stride have been designed to leverage Testspace features such as test design, execution control, and test analysis. Managing test content and status become better organized and easier to assess current progress. Refer to [http://www.testspace.com Testspace] website for more details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt; &lt;br /&gt;
&#039;&#039;&#039;For more details refer to our [[Frequently Asked Questions About STRIDE | FAQ]] &#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Training_Perl&amp;diff=14421</id>
		<title>Training Perl</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Training_Perl&amp;diff=14421"/>
		<updated>2015-07-06T21:52:06Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Perl&#039;&#039;&#039; training focuses on &#039;&#039;Test Points&#039;&#039; validation with limited &#039;&#039;Remoting&#039;&#039; for controlling the software under test.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;A few words of caution&#039;&#039;. Using Perl for testing when applied to the right situation can be a very compelling. At the same time there are challenges to be considered. A script executed by Stride runs on the host .. &#039;&#039;&#039;not&#039;&#039;&#039; on the actual device. Because of this certain limits should be assessed. For example, although Stride supports remoting of global functions (i) &#039;&#039;how to qualify a function signature using pragmas (i.e. out pointers)&#039;&#039; and (ii) &#039;&#039;how to access these types of fields using Perl&#039;&#039; can be very challenging. &lt;br /&gt;
&lt;br /&gt;
This sample demonstrates the advantages of host based scripting &#039;&#039;without&#039;&#039; the concerns mentioned above. The remoting used are for the following routines:&lt;br /&gt;
&lt;br /&gt;
 void sut_start_thread(void);&lt;br /&gt;
 void sut_stop_thread(void);&lt;br /&gt;
&lt;br /&gt;
Example option file &#039;&#039;my.opt&#039;&#039; used below for running&lt;br /&gt;
&lt;br /&gt;
  --database &amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot;&lt;br /&gt;
  --device TCP:localhost:8000&lt;br /&gt;
&lt;br /&gt;
Some of the advantages that will be shown:&lt;br /&gt;
* &#039;&#039;&#039;test coverage&#039;&#039;&#039; can be &#039;&#039;&#039;expanded&#039;&#039;&#039; without any changes to the target build&lt;br /&gt;
* nominal &#039;&#039;&#039;test code&#039;&#039;&#039; space requirements for software under test &lt;br /&gt;
* seamless &#039;&#039;&#039;integration&#039;&#039;&#039; of test results from both &#039;&#039;&#039;target-based tests&#039;&#039;&#039; and &#039;&#039;&#039;script tests&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Test Points ==&lt;br /&gt;
This test suite focuses on &#039;&#039;Test Points&#039;&#039; and how to validate them using a Perl script module. &lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example: &lt;br /&gt;
* Presentation of a [[Expectations | validation]] technique based on &#039;&#039;code sequencing&#039;&#039; and &#039;&#039;state data&#039;&#039;&lt;br /&gt;
* [[Test Point]] definition&lt;br /&gt;
* Review of [[ Perl_Script_APIs#STRIDE::TestPoint | expectation tables and predicates]] using Perl&lt;br /&gt;
&lt;br /&gt;
The Test Script is called &#039;&#039;&#039;testpoints.pm&#039;&#039;&#039; and is implemented in: &#039;&#039;&#039;testpoints.pm&#039;&#039;&#039;. The comments and descriptions are contained in the header blocks using POD. Three test cases (methods) are already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestPoints&#039;&#039; Test Script. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;..\training\testpoints.pm&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff&#039;&#039;&#039;:&lt;br /&gt;
* Write a test to validate a subset of Test Points&lt;br /&gt;
* Write a test to wait on a trigger &#039;&#039;&#039;TRIGGER&#039;&#039;&#039; and then validate &amp;quot;A&amp;quot;, &amp;quot;C&amp;quot;, and &amp;quot;G&amp;quot;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Training_Advanced&amp;diff=14420</id>
		<title>Training Advanced</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Training_Advanced&amp;diff=14420"/>
		<updated>2015-07-06T21:49:03Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Advanced&#039;&#039;&#039; training focuses on using &#039;&#039;Test Doubles&#039;&#039;, &#039;&#039;Test Points&#039;&#039;, and &#039;&#039;Fixtures&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Test Doubles&#039;&#039; will demonstrate how global functions can be dynamically intercepted and replaced with test logic (stub, fake, mock). The following functions contained in &#039;&#039;software_under_test&#039;&#039; will be used to demonstrate how to leverage interception when testing: &lt;br /&gt;
&lt;br /&gt;
 int sut_foo(int x);&lt;br /&gt;
 int sut_boo(int x);&lt;br /&gt;
 int sut_2xboo(int x);&lt;br /&gt;
 int sut_strcheck(const char *s);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Test Points&#039;&#039; enable a different style of testing using source instrumentation. This is especially applicable when normal API testing is not practical. The following &#039;&#039;sequencing&#039;&#039; functions will be called that issue Test Points. Note that the sequencing routines are very simple, keeping the focus on the technique that can be applied.&lt;br /&gt;
&lt;br /&gt;
 void sut_Sequence1(void);&lt;br /&gt;
 void sut_Sequence2(void);&lt;br /&gt;
 void sut_Sequence3(void);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Fixturing&#039;&#039; shows how setup and teardown routines per test method can be incorporated within a Test Unit. The following functions will be used to demonstrate fixturing: &lt;br /&gt;
&lt;br /&gt;
 void sut_start_thread(void);&lt;br /&gt;
 void sut_stop_thread(void);&lt;br /&gt;
&lt;br /&gt;
Example option file &#039;&#039;my.opt&#039;&#039; used below for running&lt;br /&gt;
&lt;br /&gt;
  --database &amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot;&lt;br /&gt;
  --device TCP:localhost:8000&lt;br /&gt;
&lt;br /&gt;
== Test Doubles ==&lt;br /&gt;
&lt;br /&gt;
This Test Unit focuses on leveraging &#039;&#039;&#039;Test Doubles&#039;&#039;&#039; in the context of executing a test. &lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example:&lt;br /&gt;
&lt;br /&gt;
* Using [[Test Double | Test Doubles]] &lt;br /&gt;
** &#039;&#039;Definition&#039;&#039; verses &#039;&#039;Reference&#039;&#039;&lt;br /&gt;
** &#039;&#039;Explicit&#039;&#039; verses &#039;&#039;Implicit&#039;&#039;&lt;br /&gt;
** Setting and Resetting the Double implementation&lt;br /&gt;
* How to apply pragmas for [[Scl function | function intercepting]]&lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestDoubles&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testdoubles.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testdoubles.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. Three test cases (methods) are already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestDoubles&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestDoubles&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff:&#039;&#039;&#039;&lt;br /&gt;
* Create your own stub for foo() and intercept it&lt;br /&gt;
** confirm it returns what you expect &lt;br /&gt;
* Double sut_boo()&lt;br /&gt;
** call sut_2xboo() with a number&lt;br /&gt;
** confirm within the test double (using a [[Test Macros | Test Macro]]) the expected passed in number (mocking example)&lt;br /&gt;
&lt;br /&gt;
== Test Points ==&lt;br /&gt;
This Test Unit focuses on &#039;&#039;&#039;Test Points&#039;&#039;&#039; and how to validate them. &lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example: &lt;br /&gt;
* Presentation of a [[Expectations | validation]] technique based on &#039;&#039;code sequencing&#039;&#039; and &#039;&#039;state data&#039;&#039;&lt;br /&gt;
* Overview of a [[Test Point]]&lt;br /&gt;
* [[Test_Point_Testing_in_C/C%2B%2B | Writing Tests]] leveraging Test Points&lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestPoints&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testpoints.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testpoints.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. Three test cases (methods) are already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestPoints&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestPoints&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff:&#039;&#039;&#039;&lt;br /&gt;
* Write a test to validate a subset of Test Points &lt;br /&gt;
* Write a test to validate &amp;quot;E&amp;quot;, &amp;quot;F&amp;quot;, and &amp;quot;G&amp;quot;, and a predicate to verify data associated with &amp;quot;E&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Fixtures ==&lt;br /&gt;
This Test Unit focuses on using Fixutures in the context of an executing Test Unit.  &lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestFixtures&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testfixtures.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testfixtures.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. One test cases (methods) is already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestFixtures&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestFixtures&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff:&#039;&#039;&#039;&lt;br /&gt;
* Write a test to validate &amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, and &amp;quot;C&amp;quot; using the &amp;quot;TRIGGER&amp;quot;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Training_Basics&amp;diff=14419</id>
		<title>Training Basics</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Training_Basics&amp;diff=14419"/>
		<updated>2015-07-06T21:37:35Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;Basics&#039;&#039;&#039; training focuses on using &#039;&#039;Test Macros&#039;&#039;, &#039;&#039;Parameters&#039;&#039;, and &#039;&#039;File IO&#039;&#039;. All testing is focused on verifying two simple routines:&lt;br /&gt;
&lt;br /&gt;
  int sut_add(int x, int y);&lt;br /&gt;
  int sut_mult(int x, int y);&lt;br /&gt;
&lt;br /&gt;
The routines are contained in &#039;&#039;software_under_test.c | h&#039;&#039;. The suggested things to &#039;&#039;&#039;Try&#039;&#039;&#039; will be focused on applying testing techniques on &#039;&#039;sut_mult()&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Example option file &#039;&#039;my.opt&#039;&#039; used below for running&lt;br /&gt;
&lt;br /&gt;
  --database &amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot;&lt;br /&gt;
  --device TCP:localhost:8000&lt;br /&gt;
&lt;br /&gt;
== Test Macros ==&lt;br /&gt;
&lt;br /&gt;
This Test Unit sample focuses on leveraging test macros when writing test cases. Note that it is &#039;&#039;&#039;not&#039;&#039;&#039; required to use test macros. A test case (method) can simply return a value to indicate &#039;&#039;pass&#039;&#039; or &#039;&#039;fail&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example:&lt;br /&gt;
* [[Test Unit]] packaging options &lt;br /&gt;
* Available [[Test Macros]]&lt;br /&gt;
* Adding [[Notes]] to the test logic &lt;br /&gt;
* Creating [[Test_Documentation_in_C/C%2B%2B | Doxygen style]] descriptions within test header files&lt;br /&gt;
* How [[Running Tests]] works&lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestMacros&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testmacros.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testmacros.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. One test case (method) is already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestMacros&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestMacros&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff&#039;&#039;&#039;:&lt;br /&gt;
* Add test code for the &#039;&#039;sut_mult()&#039;&#039; routine (remember to remove the &#039;&#039;set status&#039;&#039; call)&lt;br /&gt;
* Add an &#039;&#039;Assert&#039;&#039; macro (verses an &#039;&#039;Expect&#039;&#039;). Do you understand the difference?&lt;br /&gt;
* Throw in a &#039;&#039;Note&#039;&#039; macro .. provides more viability to the test logic&lt;br /&gt;
* Change the test method documentation (in &#039;&#039;testmacros.h&#039;&#039;) and see how it shows up automatically in the test report&lt;br /&gt;
* Change the test method name&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
&lt;br /&gt;
This Test Unit sample focuses on using parameters when writing test cases. Note that this sample has been implemented to (i) ensure parameters have been passed and (ii) support two different techniques for passing in parameters. &lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example:&lt;br /&gt;
&lt;br /&gt;
* [[Parameterized Test Units | Passing parameter input]] to a Test Unit&lt;br /&gt;
* [[Runtime_Test_Services#srTestGetParam | Reading parameters]] from a Test Unit&lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestParameters&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testparameters.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testparameters.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. Two test cases are already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestParameters&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestParameters(10,10)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Now run a second time and use a file with INI-formatted input:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestParameters(%STRIDE_DIR%/samples/testparameters.ini)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff:&#039;&#039;&#039;&lt;br /&gt;
* Add test code for &#039;&#039;sut_mult()&#039;&#039; using arguments from the command line&lt;br /&gt;
* Add test code for &#039;&#039;sut_mult()&#039;&#039; using your own created ini file&lt;br /&gt;
* Change the content of the ini file .. re-run the Test Unit&lt;br /&gt;
&lt;br /&gt;
== File IO ==&lt;br /&gt;
This Test Unit sample focuses on reading content from a host file to be used by the executing test logic. Note that this sample uses the [[Runtime_Test_Services#C.2B.2B_Test_Classes | srTest]] base class.&lt;br /&gt;
&lt;br /&gt;
The following articles are related to this example: &lt;br /&gt;
&lt;br /&gt;
* [[File_Transfer_Services | File IO Services]]&lt;br /&gt;
* [[Parameterized Test Units | Passing parameter input]] to a Test Unit&lt;br /&gt;
&lt;br /&gt;
The Test Unit is called &#039;&#039;&#039;TestFileIO&#039;&#039;&#039; and is implemented in two source files: &#039;&#039;&#039;testfileio.cpp&#039;&#039;&#039; and &#039;&#039;&#039;testfileio.h&#039;&#039;&#039;. The comments and descriptions are contained in the header file. One test case (method) is already implemented and one test method that can be used to make changes to is called &#039;&#039;&#039;TryStuff&#039;&#039;&#039;. Currently the &#039;&#039;TryStuff&#039;&#039; test method is set to &#039;&#039;not in use&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
The Test Unit is using an INI file (&#039;&#039;stride/samples/testfileio.ini&#039;&#039;) to indicate what input file content to use:&lt;br /&gt;
&lt;br /&gt;
  ## Required parameters used for testing file IO&lt;br /&gt;
  ## Using groups&lt;br /&gt;
 &lt;br /&gt;
  [add]&lt;br /&gt;
  File = %STRIDE_DIR%/samples/testfileio.input.add&lt;br /&gt;
   &lt;br /&gt;
  [mult]&lt;br /&gt;
 &lt;br /&gt;
The corresponding &#039;&#039;add&#039;&#039; input file contains the following (note that the &#039;&#039;third column&#039;&#039; equals the sum):&lt;br /&gt;
&lt;br /&gt;
  1,2,3&lt;br /&gt;
  5,6,11&lt;br /&gt;
  53,27,80&lt;br /&gt;
&lt;br /&gt;
First thing to do is run the &#039;&#039;TestFileIO&#039;&#039; Test Unit. Start the &#039;&#039;&#039;TestApp.exe&#039;&#039;&#039; and use the following command:&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;TestFileIO(%STRIDE_DIR%/samples/testfileio.ini)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can take a look at the results by opening the generated &#039;&#039;&#039;stride.html&#039;&#039;&#039; in your browser.&lt;br /&gt;
&lt;br /&gt;
Consider the following for &#039;&#039;&#039;TryStuff:&#039;&#039;&#039;&lt;br /&gt;
* Add test code for &#039;&#039;sut_mult()&#039;&#039; using a different input file &lt;br /&gt;
* Update the &#039;&#039;testfileio.ini&#039;&#039; file to include a second file for input&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Stride_Sandbox&amp;diff=14418</id>
		<title>Stride Sandbox</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Stride_Sandbox&amp;diff=14418"/>
		<updated>2015-07-06T21:25:42Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Stride&#039;s cross-platform capabilities make it possible to use Stride in a &#039;&#039;&#039;host-only&#039;&#039;&#039; configuration called the &#039;&#039;&#039;Sandbox&#039;&#039;&#039;. This environment facilitates &#039;&#039;self-training&#039;&#039;, &#039;&#039;evaluations&#039;&#039;, and &#039;&#039;trying stuff&#039;&#039;. It frees you from external hardware dependencies and provides for a rapid &#039;&#039;edit-build-test&#039;&#039; cycle.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Sandbox&#039;&#039;&#039; utilizes the framework&#039;s SDK that can be built and executed on the host system. When using the SDK Makefile a simulated target &#039;&#039;native application&#039;&#039; is generated, which we call a &#039;&#039;&#039;Test Application (TestApp)&#039;&#039;&#039;. The Stride Runner application executes on the same host and communicates with the &#039;&#039;&#039;TestApp&#039;&#039;&#039; process over a TCP/IP connection. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Sandbox&#039;&#039;&#039; requires the Stride framework package to be setup on your desktop. Refer to the [[Framework Setup | Framework Setup]] article for more information. It also requires that your desktop contains one of the following &#039;&#039;&#039;compilers&#039;&#039;&#039;:&lt;br /&gt;
* For Windows, Microsoft Visual Studio 2008 or later is required. If you don&#039;t already have Visual Studio, the free [http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express Visual C++ Express] can be used (download [http://www.microsoft.com/express/download/#webInstall here]). &amp;lt;i&amp;gt;In case you have [http://www.cygwin.com Cygwin] installed, the [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] could be used as an alternative.&amp;lt;/i&amp;gt;&lt;br /&gt;
* For Linux and FreeBSD, the [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] (included by default in almost all distros) is required.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
=== SDK Makefile ===&lt;br /&gt;
The SDK Makefile is set up by &#039;&#039;default&#039;&#039; so that all &amp;lt;tt&amp;gt;.c&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;.cpp&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files found in the directory &amp;lt;tt&amp;gt;SDK\Windows\sample_src&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;SDK/Posix/sample_src&amp;lt;/tt&amp;gt; for Linux/FreeBSD) are included in the compile and link of the &#039;&#039;&#039;testapp&#039;&#039;&#039; target.&lt;br /&gt;
&lt;br /&gt;
Further--as a pre-compilation step--any &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files found in &amp;lt;tt&amp;gt;sample_src&amp;lt;/tt&amp;gt; are submitted to the [[STRIDE Build Tools]]. This will result in &lt;br /&gt;
* the detection of [[Test_Unit_Pragmas2| test pragmas]] used to declare Test Suites in these &amp;lt;tt&amp;gt;.h&amp;lt;/tt&amp;gt; files&lt;br /&gt;
* the generation of a database (&amp;lt;tt&amp;gt;.sidb&amp;lt;/tt&amp;gt;) file required for executing tests&lt;br /&gt;
* the generation of an [[Intercept Module]] required for executing tests&lt;br /&gt;
&lt;br /&gt;
=== Build Steps ===&lt;br /&gt;
To begin, be sure that TestApp is not running then perform the following steps:&lt;br /&gt;
&lt;br /&gt;
====Linux/FreeBSD====&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Build the test app using GNU make&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -C &amp;quot;$STRIDE_DIR/SDK/Posix/src&amp;quot; testapp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note that the following artifacts are produced by the build:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;$STRIDE_DIR/SDK/Posix/out/bin/TestApp&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the test application&lt;br /&gt;
;&amp;lt;tt&amp;gt;$STRIDE_DIR/SDK/Posix/out/TestApp.sidb&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the STRIDE interface database file which contains metadata describing the interfaces remoted by the test app (along with other data)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
NOTE: &#039;&#039;In case you have [http://www.cygwin.com Cygwin] and [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection] installed and prefer to use it, please follow the build steps for Linux (see previous section) and ignore the one in here.&#039;&#039;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If using Microsoft Visual Studio, open a [http://msdn.microsoft.com/en-us/library/ms235639(v=vs.100).aspx Visual Studio Command Prompt] to ensure that the compiler and linker are on your PATH.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Build the test app using the supplied GNU make. (You will get Makefile errors if you use the default make.)&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
&amp;quot;%STRIDE_DIR%\SDK\Windows\bin\make&amp;quot; -C &amp;quot;%STRIDE_DIR%\SDK\Windows\src&amp;quot; testapp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note that the following artifacts are produced by the build:&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;tt&amp;gt;%STRIDE_DIR%\SDK\Windows\out\bin\TestApp.exe&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the test application&lt;br /&gt;
;&amp;lt;tt&amp;gt;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;lt;/tt&amp;gt;&lt;br /&gt;
: the STRIDE interface database file which contains metadata describing the interfaces remoted by the test app (along with other data)&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running ==&lt;br /&gt;
The test app we just built does not have any user tests in it. At this point it provides a starting point for test that we will subsequently add.&lt;br /&gt;
&lt;br /&gt;
However, a set of diagnostic tests that verify operation of the STRIDE runtime itself are always built into the generated TestApp executable. If desired (we recommend you to do so) you could run them by doing the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Invoke the TestApp. In order to see TestApp&#039;s output, we recommend that you manually run in a console window (or Windows equivalent): &lt;br /&gt;
;Linux/FreeBSD&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$STRIDE_DIR/SDK/Posix/out/bin/TestApp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
;Windows&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
%STRIDE_DIR%\SDK\Windows\out\bin\TestApp&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
(...or launch from the file explorer)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Note TestApp&#039;s output upon startup.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
STRIDE Test Console Application.&lt;br /&gt;
Enter &#039;Ctrl+C&#039; to Quit.&lt;br /&gt;
--------------------------------------------------&lt;br /&gt;
Listening on TCP port 8000&lt;br /&gt;
starting up...&lt;br /&gt;
&amp;quot;_srThread&amp;quot; thread started.&lt;br /&gt;
&amp;quot;stride&amp;quot; thread started.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;From a second console window, invoke &amp;lt;tt&amp;gt;[[STRIDE_Runner|stride]]&amp;lt;/tt&amp;gt; as follows, to verify connectivity with the test app and STRIDE runtime operation:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
;Linux/FreeBSD&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --database=&amp;quot;$STRIDE_DIR/SDK/Posix/out/TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
;Windows&lt;br /&gt;
&amp;lt;source lang=&amp;quot;dos&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics --database=&amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As the tests run you will see output in both the TestApp (target) and stride (host) console windows.&lt;br /&gt;
&lt;br /&gt;
The host console window output is shown here:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Executing diagnostics...&lt;br /&gt;
Connecting to device (TCP:localhost:8000)...&lt;br /&gt;
  runtime version: 5.0.xy &lt;br /&gt;
  test suite &amp;quot;/Link&amp;quot;&lt;br /&gt;
    Loopback ..........&lt;br /&gt;
    Payload Fragmentation&lt;br /&gt;
    Stub-Proxy Deadlock&lt;br /&gt;
    Target Characteristics&lt;br /&gt;
    &amp;gt; 4 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 777.77 ms.&lt;br /&gt;
  test suite &amp;quot;/Stat&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 74.98 ms.&lt;br /&gt;
  test suite &amp;quot;/Time&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 2559.23 ms.&lt;br /&gt;
Disconnecting from device...&lt;br /&gt;
  --------------------------------------------------------------------- &lt;br /&gt;
  Summary: 8 passed, 0 failed, 0 in progress, 0 unknown, 0 not in use, 3411.98 ms.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Note the Summary results shown in the host output; all in use tests should pass.&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To exit TestApp, give the target window focus and enter &amp;lt;tt&amp;gt;Ctrl-C&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build Problems==&lt;br /&gt;
This page describes several common problems encountered when building a STRIDE TestApp using the Sandbox and suggested solutions.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 1 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Windows, when attempting to build the testapp from the command line, you encounter an error indicating that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
‘cl’ is not recognized as an internal or external command,&lt;br /&gt;
operable program or batch file.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\STRIDE\SDK\Windows\src&amp;gt;..\bin\make.exe testapp&lt;br /&gt;
cl -c -nologo -W4 -D_UNICODE -DUNICODE -DWIN32 -D_CONSOLE -DUNDER_NT -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../o&lt;br /&gt;
ut/src” -I”../sample_src” -GS -Zi -DNDEBUG -MD -O2 -D_LIB -DSTRIDE_STATIC -Fd”../out/desktop-Windows_NT-obj//cl.pdb” -Fo”../out/desktop-Windows_NT-o&lt;br /&gt;
bj/srapi.o” ”../../Runtime/srapi.c” &lt;br /&gt;
‘cl’ is not recognized as an internal or external command,&lt;br /&gt;
operable program or batch file.&lt;br /&gt;
make: *** [../out/desktop-Windows_NT-obj/srapi.o] Error 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
Microsoft Visual Studio 2008 or later is not installed or you are not building from a [http://msdn.microsoft.com/en-us/library/ms235639(v=VS.90).aspx Visual Studio Command Prompt]. &lt;br /&gt;
&lt;br /&gt;
;Solution&lt;br /&gt;
Make sure you have Microsoft Visual Studio 2008 or later installed.&lt;br /&gt;
&lt;br /&gt;
To ensures that the compiler and linker are on your PATH open a Visual Studio Command prompt: &lt;br /&gt;
* Click the Start button, point to All Programs, Microsoft Visual Studio 20XX, Visual Studio Tools, and then click Visual Studio 20XX Command Prompt.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 2 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Windows, when attempting to build the testapp from the command line the following errors are observed:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
syntax error near unexpected token `(&#039;&lt;br /&gt;
syntax error near unexpected token `(&#039;&lt;br /&gt;
syntax error: unexpected end of file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\stride\SDK\Windows\src&amp;gt;..\bin\make testapp&lt;br /&gt;
/bin/sh: -c: line 0: syntax error near unexpected token `(&#039;&lt;br /&gt;
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir &amp;quot;../out/src&amp;quot;) ELSE mkdir &amp;quot;../out&amp;quot; &amp;amp;&amp;amp; mkdir &amp;quot;../out/src&amp;quot;.&#039;&lt;br /&gt;
/bin/sh: -c: line 0: syntax error near unexpected token `(&#039;&lt;br /&gt;
/bin/sh: -c: line 0: `IF EXIST ../out. (IF NOT EXIST ../out/src mkdir &amp;quot;../out/src&amp;quot;) ELSE mkdir &amp;quot;../out&amp;quot; &amp;amp;&amp;amp; mkdir &amp;quot;../out/src&amp;quot;.&#039;&lt;br /&gt;
/bin/sh: -c: line 1: syntax error: unexpected end of file&lt;br /&gt;
make: *** [cleanapp] Error 258&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
This error occurs because gnu make on Windows will search for an Unix shell (&amp;lt;tt&amp;gt;sh&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;bash&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;csh&amp;lt;/tt&amp;gt;) anywhere in your PATH when executing shell commands and only default to DOS shell (&amp;lt;tt&amp;gt;cmd.exe&amp;lt;/tt&amp;gt;) when no Unix shell is found. The sandbox Makefile uses DOS shell syntax, so when a Unix shell is found on your PATH, this results to errors like above.&lt;br /&gt;
&lt;br /&gt;
Most commonly, this problem is caused by an installation of [http://en.wikipedia.org/wiki/Cygwin Cygwin], though it can also be caused by an installation of the QNX Software Development Platform.&lt;br /&gt;
 &lt;br /&gt;
;Solution&lt;br /&gt;
&lt;br /&gt;
Explicitly specify the DOS shell by invoking make like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
..\bin\make SHELL=%ComSpec% testapp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; the value of %ComSpec% should be &amp;lt;tt&amp;gt;C:\Windows\system32\cmd.exe&amp;lt;/tt&amp;gt;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An alternative is to remove any directories from your PATH that contain an Unix shell executable or otherwise prevent such from being found. (e.g. rename its parent directory).&lt;br /&gt;
&lt;br /&gt;
=== Make Error 3 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
On Linux, when attempting to build the testapp from the command line, the following error is observed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
g++: command not found&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# make testapp&lt;br /&gt;
g++ -c -I”.” -I”../../Runtime” -I”../../SLAP” -I”../../GRS” -I”../out/src” -I”../sample_src” -fPIC -D_DEBUG -O0 -g3 -Wall -o ”../out/i386-Linux-obj/srtestpp.obj” ”../../Runtime/srtestpp.cpp” &lt;br /&gt;
/bin/sh: g++: command not found&lt;br /&gt;
make: *** [../out/i386-Linux-obj/srtestpp.obj] Error 127&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
The C++ compiler, &amp;lt;tt&amp;gt;g++&amp;lt;/tt&amp;gt; can&#039;t be found on your PATH.&lt;br /&gt;
&lt;br /&gt;
Most commonly, this problem is caused by not having a complete installation of [http://en.wikipedia.org/wiki/GNU_Compiler_Collection GNU Compiler Collection].&lt;br /&gt;
 &lt;br /&gt;
;Solution&lt;br /&gt;
Make sure you have a complete GNU Compiler Collection installed.&lt;br /&gt;
&lt;br /&gt;
=== Make Error 4 ===&lt;br /&gt;
;Symptom&lt;br /&gt;
When building the testapp from the command line, you see the following compiler errors:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
../out/src/strideIM.cpp(50) : error C3861: &#039;_srTestResultCountReset&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(54) : error C3861: &#039;_srTestSendFinalStatus&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(56) : error C3861: &#039;_srTestAddToTotal&#039;: identifier not found&lt;br /&gt;
../out/src/strideIM.cpp(56) : error C3861: &#039;_srTestResultGetTotals&#039;: identifier not found&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Cause&lt;br /&gt;
You are using an outdated version of the STRIDE build tools.&lt;br /&gt;
&lt;br /&gt;
You can see which version of the tools were used to generate your STRIDE sources by looking at the top of the strideIM.cpp source file. The comment block at the top of the file shows this version.&lt;br /&gt;
&lt;br /&gt;
;Solution&lt;br /&gt;
Remove the old tools and/or change your path so that the current tools are used.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=STRIDE_Extensions_for_Visual_Studio&amp;diff=14417</id>
		<title>STRIDE Extensions for Visual Studio</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=STRIDE_Extensions_for_Visual_Studio&amp;diff=14417"/>
		<updated>2015-07-06T21:22:40Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Sort Out Header Files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction == &lt;br /&gt;
The Stride Extensions for Visual Studio can be used to integrate directly into your existing Visual Studio C/C++ project.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* Visual Studio 2008 or later (an express distribution is fine)&lt;br /&gt;
* a recent version of the Stride installed&lt;br /&gt;
* a static library version of the runtime built using the source files included in the [[Windows_SDK | Windows SDK]]&lt;br /&gt;
** to build the library open a [http://msdn.microsoft.com/en-us/library/ms235639(v=vs.100).aspx Visual Studio Command Prompt] and do as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; md %STRIDE_DIR%\SDK\Windows\lib&lt;br /&gt;
&amp;gt; cd %STRIDE_DIR%\SDK\Windows\src&lt;br /&gt;
&amp;gt; ..\bin\make clean&lt;br /&gt;
&amp;gt; ..\bin\make RTSINGLEPROC=0&lt;br /&gt;
&amp;gt; copy %STRIDE_DIR%\SDK\Windows\out\lib\stride-x86-Windows_NT.lib %STRIDE_DIR%\SDK\Windows\lib\stride.lib&lt;br /&gt;
&amp;gt; ..\bin\make clean&lt;br /&gt;
&amp;gt; ..\bin\make RTSINGLEPROC=0 DEBUG=1&lt;br /&gt;
&amp;gt; copy %STRIDE_DIR%\SDK\Windows\out\lib\stride-x86-Windows_NT-d.lib %STRIDE_DIR%\SDK\Windows\lib\stride-d.lib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* an existing C/C++ Visual Studio project &lt;br /&gt;
** or you can easily create a new one, e.g. &amp;quot;Win32 Console Application&amp;quot;, by using the project wizard provided within Visual Studio.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
STRIDE Extensions need to be added to any project that is to generate &#039;&#039;intercept module&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== Visual Studio 2010 (or newer) ===&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Build Customizations…&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* In the dialog that is displayed, click &#039;&#039;&#039;Find Existing…&#039;&#039;&#039; and select &#039;&#039;&#039;$(STRIDE_DIR)\SDK\Windows\settings\stride.targets&#039;&#039;&#039; (if asked, say “No” to adding to standard “Build Customizations Search Path”)&lt;br /&gt;
* Make sure the check box next to &#039;&#039;&#039;stride&#039;&#039;&#039; is &#039;&#039;enabled&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Visual Studio 2008 ===&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;Due to limitations in Visual Studio 2008 the STRIDE integration is much more complicated compared to new versions. We recommend upgrading to Visual Studio 2010 or newer.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Build Custom Build Rules...&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* In the dialog that is displayed, click &#039;&#039;&#039;Find Existing…&#039;&#039;&#039; and select &#039;&#039;&#039;$(STRIDE_DIR)\SDK\Windows\settings\stride.rules&#039;&#039;&#039; (if asked, say “No” to adding to standard “Rule Files Search Path”)&lt;br /&gt;
* Make sure the check box next to &#039;&#039;&#039;STRIDE Rules&#039;&#039;&#039; is &#039;&#039;enabled&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The STRIDE Extensions execute a set of pre-build steps on your header files that generate test harnessing code that is later compiled in your application. To support the pre-build steps your global project settings require updating. &lt;br /&gt;
&lt;br /&gt;
=== Project Properties ===&lt;br /&gt;
Adjust your project properties to compile and link with the STRIDE Runtime and generated test harnessing code. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;Make sure to apply the following changes to all project&#039;s configurations (e.g. Debug, Release).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==== C/C++ Properties ====&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | C/C++ | General&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Additional Include Directories&#039;&#039;&#039; the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(STRIDE_DIR)\SDK\Runtime&lt;br /&gt;
$(STRIDE_DIR)\SDK\Windows\src&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Select &#039;&#039;&#039;Configuration Properties | C/C++ | Preprocessor&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Preprocessor Definitions&#039;&#039;&#039; the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
STRIDE_ENABLED&lt;br /&gt;
STRIDE_STATIC&lt;br /&gt;
srCOMPLEX_TARGET&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Select &#039;&#039;&#039;Configuration Properties | C/C++ | Code Generation&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, set &#039;&#039;&#039;Runtime Library&#039;&#039;&#039; to &#039;&#039;&#039;Multi-threaded DLL (/MD)&#039;&#039;&#039; (or &#039;&#039;&#039;Multi-threaded Debug DLL (/MDd)&#039;&#039;&#039; for Debug configuration).&lt;br /&gt;
&lt;br /&gt;
==== Linker Properties ====&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | Linker | General&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Additional Library Directories&#039;&#039;&#039; the following:&lt;br /&gt;
;If you built stride.lib from the makefile in the SDK&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(STRIDE_DIR)\SDK\Windows\lib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Select &#039;&#039;&#039;Configuration Properties | Linker | Input&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Additional Dependencies&#039;&#039;&#039; the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
stride.lib&lt;br /&gt;
ws2_32.lib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;For Debug configuration please specify &amp;quot;stride-d.lib&amp;quot;.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Sort Out Header Files ===&lt;br /&gt;
Every header file in the project that has [[Test Pragmas]] will cause harnessing code to be generated when processed by the STRIDE compiler. (Other non-stride header files can also be processed by the STRIDE compiler, but this only results in longer compile times.)&lt;br /&gt;
&lt;br /&gt;
For each header file to be used as input to the STRIDE rules:&lt;br /&gt;
* Right click on the header file in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | General&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, set the &#039;&#039;&#039;Item Type&#039;&#039;&#039; property to &#039;&#039;&#039;STRIDE Compile-Instrument&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If there are any header files that contain no test code declarations, then we recommend disabling the build step for these files. This could be done in the last step from above by setting the &#039;&#039;&#039;Item Type&#039;&#039;&#039; to &#039;&#039;&#039;C/C++ header&#039;&#039;&#039; or by setting &#039;&#039;&#039;Exclude From Build&#039;&#039;&#039; property to &#039;&#039;&#039;Yes&#039;&#039;&#039;. Remember as you add more header source files to the project, they will be automatically processed by STRIDE unless you explicitly disable.&lt;br /&gt;
&lt;br /&gt;
=== STRIDE Compile-Instrument Properties === &lt;br /&gt;
&lt;br /&gt;
==== Visual Studio 2010 / 2012 ====&lt;br /&gt;
&lt;br /&gt;
The default settings are usually sufficient so you don&#039;t need to make any changes.&lt;br /&gt;
&lt;br /&gt;
When you build your project, notice that:&lt;br /&gt;
* The STRIDE build tools automatically run and generate a STRIDE database (.sidb) file and intercept module (IM) source files. By default the names are derived from &#039;&#039;&#039;$(TargetName)&#039;&#039;&#039;, and the associated files are written to the &#039;&#039;&#039;$(ProjectDir)&#039;&#039;&#039; directory.&lt;br /&gt;
* The IM source, &#039;&#039;$(TargetName)IM.cpp&#039;&#039;, is automatically compiled and linked along with your other project sources.&lt;br /&gt;
&lt;br /&gt;
If you desire to change the &#039;&#039;Database Name&#039;&#039; and/or the &#039;&#039;Intercept Module Name&#039;&#039; use the following steps:&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Explorer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | STRIDE Compile-Instrument&#039;&#039;&#039;&lt;br /&gt;
* Update &#039;&#039;&#039;Database Name&#039;&#039;&#039; and/or the &#039;&#039;&#039;Intercept Module Name&#039;&#039;&#039; right pane values as desired. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;If you do not see &#039;&#039;&#039;STRIDE Compile-Instrument&#039;&#039;&#039; try [[#Sort_Out_Header_Files | adding a header file]] to your project.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The default harness generation assumes STUB settings for all captured functions. If you require different settings for any of your interfaces, you should create a text file containing the [[S2sinstrument#Options|additional settings]] and specify it as follows:&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Exporer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | STRIDE Compile-Instrument | Command Line&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Additional Options&#039;&#039;&#039; property in the right pane.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--intercept_options_file=&amp;quot;path\to\my\file.s2instrument&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Visual Studio 2008 ====&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Exporer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | STRIDE Compile-Instrument | Compile&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Compile Options Files&#039;&#039;&#039; the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(STRIDE_DIR)\SDK\Windows\settings\stride.s2scompile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* From the right pane, update &#039;&#039;&#039;Include Directories&#039;&#039;&#039; to be exactly the same the one specified in &#039;&#039;&#039;Additional Include Directories&#039;&#039;&#039; in &#039;&#039;&#039;Configuration Properties | C/C++ | General&#039;&#039;&#039; section.&lt;br /&gt;
* From the right pane, update &#039;&#039;&#039;Preprocessor Definitions&#039;&#039;&#039; to be exactly the same the one specified in &#039;&#039;&#039;Preprocessor Definitions&#039;&#039;&#039; in &#039;&#039;&#039;Configuration Properties | C/C++ | Preprocessor&#039;&#039;&#039; section.&lt;br /&gt;
* Build your project once to generate the STRIDE database (.sidb) and intercept module (IM) source files. Notice, that you will get linker errors during this build since you have not yet added the generated IM source to the project.&lt;br /&gt;
* From the &#039;&#039;&#039;$(ProjectDir)&#039;&#039;&#039; directory add the generated IM source file - &#039;&#039;&#039;strideIM.cpp&#039;&#039;&#039;, &#039;&#039;&#039;strideIM.h&#039;&#039;&#039; and &#039;&#039;&#039;strideIMEntry.h&#039;&#039;&#039; - to your project. &lt;br /&gt;
** For &#039;&#039;&#039;strideIM.cpp&#039;&#039;&#039; make sure to set its &#039;&#039;&#039;Create/Use Precompiled Header&#039;&#039;&#039; property to &#039;&#039;&#039;Not Using...&#039;&#039;&#039;.&lt;br /&gt;
** For &#039;&#039;&#039;strideIM.h&#039;&#039;&#039; and &#039;&#039;&#039;strideIMEntry.h&#039;&#039;&#039; make sure to set their &#039;&#039;&#039;Excluded From Build&#039;&#039;&#039; property to &#039;&#039;&#039;Yes&#039;&#039;&#039; as specified [[#Sort_Out_Header_Files|above]].&lt;br /&gt;
* Rebuild your project and resolve any compiler errors/warnings.&lt;br /&gt;
&lt;br /&gt;
The default harness generation assumes STUB settings for all captured functions. If you require different settings for any of your interfaces, you should create a text file containing the [[S2sinstrument#Options|additional settings]] and specify it as follows:&lt;br /&gt;
* Right click on the project in the &#039;&#039;&#039;Solution Exporer&#039;&#039;&#039; window and choose &#039;&#039;&#039;Properties&#039;&#039;&#039; from the menu that is displayed. &lt;br /&gt;
* From the properties dialog, select &#039;&#039;&#039;Configuration Properties | STRIDE Compile-Instrument | Instrument&#039;&#039;&#039; from the tree view in the left pane. &lt;br /&gt;
* From the right pane, add to &#039;&#039;&#039;Intercept Options File&#039;&#039;&#039; property in the right pane.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
path\to\my\file.s2instrument&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;As you add sources, you will likely also need to add Additional Includes and Preprocessor Defines to the project&#039;s STRIDE Compile-Instrument settings in order to successfully build.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Update Your Startup ==&lt;br /&gt;
&lt;br /&gt;
Update your application&#039;s main function to initialize the STRIDE subsystem as described in [[Windows_SDK#Target_Integration | this article]]. &amp;lt;u&amp;gt;&#039;&#039;Note&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;that the sample code assumes you have generated your Intercept Module with a name of &#039;&#039;&#039;myintercept&#039;&#039;&#039;. Make sure to replace any reference to that token in the code to the name you  [[#STRIDE_Compile-Instrument_Properties | chose above]].&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Framework_Setup&amp;diff=14416</id>
		<title>Framework Setup</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Framework_Setup&amp;diff=14416"/>
		<updated>2015-07-06T21:19:44Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction = &lt;br /&gt;
The packages described below contain all of the &#039;&#039;source&#039;&#039; and &#039;&#039;binary&#039;&#039; components required to&lt;br /&gt;
* setup a desktop with the &#039;&#039;&#039;STRIDE Runner&#039;&#039;&#039;&lt;br /&gt;
* integrate the &#039;&#039;&#039;STRIDE Runtime&#039;&#039;&#039; with the target device&lt;br /&gt;
* add the &#039;&#039;&#039;STRIDE Compiler&#039;&#039;&#039; (aka &#039;&#039;Build tools&#039;&#039;) to the software build system.&lt;br /&gt;
&lt;br /&gt;
The desktops supported are Windows, Linux, and FreeBSD.&lt;br /&gt;
&lt;br /&gt;
= Packages =&lt;br /&gt;
Files are installed by unzipping the provided package to your PC. Packages are available targeting the following operating systems (your version number may be different than that shown):&lt;br /&gt;
;Windows (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-windows_5.x.yy.zip&amp;lt;/tt&amp;gt;&lt;br /&gt;
;Linux (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-linux_5.x.yy.tgz&amp;lt;/tt&amp;gt;&lt;br /&gt;
;FreeBSD (x86)&lt;br /&gt;
:&amp;lt;tt&amp;gt;STRIDE_framework-freebsd_5.x.yy.tgz&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the appropriate installation instructions below.&lt;br /&gt;
&lt;br /&gt;
= Windows =&lt;br /&gt;
&lt;br /&gt;
The following installation example assumes the the installation package is located in your root directory and that the directory &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; exists. You can choose to install to a different location (all instructions below assume you are installing into &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The example uses the open source [http://www.7-zip.org/ 7-Zip] utility to unzip the archive.&lt;br /&gt;
&lt;br /&gt;
 cd \stride&lt;br /&gt;
 &amp;quot;\Program Files\7-Zip\7z&amp;quot; x ..\STRIDE_framework-windows_5.x.yy.zip&lt;br /&gt;
&lt;br /&gt;
Once unzipped, files will have been installed under the &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Updated PATH ===&lt;br /&gt;
As a final step, you will need to update your &amp;lt;tt&amp;gt;[http://en.wikipedia.org/wiki/Path_(variable) PATH]&amp;lt;/tt&amp;gt; environment variable to include &amp;lt;tt&amp;gt;\stride\bin&amp;lt;/tt&amp;gt;. &lt;br /&gt;
For instructions on modifying it, please see [http://support.microsoft.com/kb/310519 http://support.microsoft.com/kb/310519].&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;Make sure to insert &#039;&#039;&#039;no spaces&#039;&#039;&#039; before and after the semicolon separators(;).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Create/Update STRIDE_DIR===&lt;br /&gt;
&lt;br /&gt;
Verify that the  &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable exists and is set to the root installation directory (&amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt;). If this environment variable does not yet exist, you should create it as a user environment variable.&lt;br /&gt;
&lt;br /&gt;
To confirm installation and display &#039;&#039;help&#039;&#039; run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
 stride -h&lt;br /&gt;
&lt;br /&gt;
=== Uninstalling ===&lt;br /&gt;
To uninstall STRIDE simply:&lt;br /&gt;
* Remove any reference to &amp;lt;tt&amp;gt;\stride\bin&amp;lt;/tt&amp;gt; in your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. &lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;\stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
= Linux/FreeBSD =&lt;br /&gt;
&lt;br /&gt;
The following installation example assumes the the installation package is located in your home directory and that the directory &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; exists. You can choose to install to a different location (all instructions below assume you are installing into &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
 cd ~/stride&lt;br /&gt;
 tar -zxvf ../STRIDE_framework-linux_5.x.yy.tgz&lt;br /&gt;
&lt;br /&gt;
Once unzipped, files will have been installed under the &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
=== Updated PATH ===&lt;br /&gt;
As a final step, you will need to update your &amp;lt;tt&amp;gt;[http://en.wikipedia.org/wiki/Path_(variable) PATH]&amp;lt;/tt&amp;gt; environment variable to include &amp;lt;tt&amp;gt;~/stride/bin&amp;lt;/tt&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If you use the bash shell, enter the following at a command prompt, or to automatically set at each login, add to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 export PATH=$PATH:~/stride/bin&lt;br /&gt;
&lt;br /&gt;
For other shells, and more information, please see the following articles:&lt;br /&gt;
* [http://www.linuxheadquarters.com/howto/basic/path.shtml http://www.linuxheadquarters.com/howto/basic/path.shtml].&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Environment_variable#UNIX http://en.wikipedia.org/wiki/Environment_variable]&lt;br /&gt;
&lt;br /&gt;
=== Create/Update STRIDE_DIR===&lt;br /&gt;
Verify that the  &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable exists and is set to the root installation directory (&amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt;). If this environment variable does not yet exist, you should automatically set at each login, add to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt;:&lt;br /&gt;
 export STRIDE_DIR=~/stride&lt;br /&gt;
&lt;br /&gt;
To confirm installation and display &#039;&#039;help&#039;&#039; run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
 stride -h&lt;br /&gt;
&lt;br /&gt;
NOTE: &#039;&#039;In a 64-bit environment the above may fail with errors like: &amp;lt;code&amp;gt;&amp;quot;/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;ELF interpreter /libexec/ld-elf32.so.1 not found&amp;quot;&amp;lt;/code&amp;gt;. To resolve this issue install the appropriate 32-bit compatibility libraries for your Linux/FreeBSD distribution:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Debian / Ubuntu&lt;br /&gt;
 sudo apt-get install ia32-libs&lt;br /&gt;
 sudo apt-get install ia32-libs-multiarch:i386 (for 12.04 or higher)&lt;br /&gt;
* Fedora / CentOS / RHEL&lt;br /&gt;
 sudo yum -y install glibc.i686 libstdc++.i686&lt;br /&gt;
* FreeBSD&lt;br /&gt;
Make sure to have &amp;lt;code&amp;gt;lib32&amp;lt;/code&amp;gt; installed (via [http://www.freebsd.org/cgi/man.cgi?query=sysinstall&amp;amp;apropos=0&amp;amp;sektion=0&amp;amp;manpath=FreeBSD+8.4-RELEASE&amp;amp;arch=default&amp;amp;format=html sysinstall(8)] - Configure|Distributions|lib32) and have your kernel built with:&lt;br /&gt;
 options 	COMPAT_FREEBSD32	# Compatible with i386 binaries&lt;br /&gt;
&lt;br /&gt;
=== Uninstalling ===&lt;br /&gt;
To uninstall STRIDE simply:&lt;br /&gt;
* Remove any reference to &amp;lt;tt&amp;gt;~/stride/bin&amp;lt;/tt&amp;gt; in your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. &lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;STRIDE_DIR&amp;lt;/tt&amp;gt; environment variable.&lt;br /&gt;
* Remove &amp;lt;tt&amp;gt;~/stride&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
= Directories and Files =&lt;br /&gt;
&lt;br /&gt;
To integrate Stride in to your target build system it is required to understand the directories layout and the files inside then. A quick orientation is shown below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;&#039;&#039;NOTE:&#039;&#039;&amp;lt;/u&amp;gt; &#039;&#039;It&#039;s not necessary to understand the workings of Stride to perform evaluation or training. The framework package contains a [[Stride Sandbox]] that utilizes a SDK that is set up with appropriate options and settings to enable &amp;quot;out of the box&amp;quot; functionality.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains the [[Build Tools|Stride Build Tools]] and the [[Stride Runner]].&lt;br /&gt;
&lt;br /&gt;
The build tools are invoked early on in the target software build process to generate special Stride artifacts that are used in subsequent build steps and later when running tests against the target. When using the Stride Sandbox, these files are needed on the host computer since this is where we are building the target application. In a production environment, these files are needed only on the computer that performs the target software build.&lt;br /&gt;
&lt;br /&gt;
The [[Stride Runner]] is the program you use to run tests from the host.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;lib&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains a set of Stride specific core scripting libraries along with prebuild binaries intended to be used for Perl based test scripts.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;samples&amp;lt;/tt&amp;gt;==&lt;br /&gt;
The Samples directory contains a number of source files used for training and evaluation.&lt;br /&gt;
&lt;br /&gt;
==&amp;lt;tt&amp;gt;SDK&amp;lt;/tt&amp;gt;==&lt;br /&gt;
This directory contains the sub-directories &amp;lt;tt&amp;gt;Posix/Windows&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Runtime&amp;lt;/tt&amp;gt;, which contain source code that comprises the [[Runtime_Reference|STRIDE Runtime]]. These sources are built in to a static libary (e.g. STRIDE Runtime library - &amp;lt;tt&amp;gt;stride.a/lib&amp;lt;/tt&amp;gt;) as a dependency of your Test Application. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;Posix&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;Windows&amp;lt;/tt&amp;gt; directories contain the target operating system specific source and configuration. If you are interested in the details, consult the articles [[Posix SDK]] and [[Windows SDK]]. Each of them contains the following sub-directories:&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;tt&amp;gt;settings&amp;lt;/tt&amp;gt;&lt;br /&gt;
: This directory contains a set of &amp;lt;tt&amp;gt;stride.XXX.s2scompile&amp;lt;/tt&amp;gt; files, where &amp;lt;tt&amp;gt;XXX&amp;lt;/tt&amp;gt; coresponds to the target CPU architecture (i.e. X86, ARM...). These files, used by the [[s2scompile|STRIDE Compiler]], specify target CPU characteristics (endian-ness, data sizes and alignments). On Windows, this directory also contains a set of files for [[STRIDE_Extensions_for_Visual_Studio|building with Visual Studio]].&lt;br /&gt;
*&amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt;&lt;br /&gt;
: This directory contains the source of the target [[Platform Abstraction Layer]] PAL. In addition there is a sample Makefile used to produce a sandbox TestApp.&lt;br /&gt;
&lt;br /&gt;
= Perl Installation (Optional) =&lt;br /&gt;
If you intend to use &#039;&#039;&#039;Test Scripts&#039;&#039;&#039; you will need a recent version of Perl (x86 with threads support) installed. &lt;br /&gt;
&lt;br /&gt;
As of this writing, we support only the 32-bit versions 5.8.9, 5.10.x, 5.12.x, 5.14.x, 5.16.x and 5.18.x of Perl. &lt;br /&gt;
&lt;br /&gt;
== Windows == &lt;br /&gt;
It is required to use the standard 32-bit Perl distributions from [http://www.activestate.com/activeperl ActiveState].&lt;br /&gt;
&lt;br /&gt;
The following additional (non-standard) Perl packages are also required for full functionality of STRIDE tests in perl:&lt;br /&gt;
&lt;br /&gt;
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]&lt;br /&gt;
&lt;br /&gt;
You can easily install these packages using the [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html ppm tool]. If you access the Internet via a proxy make sure to read [http://docs.activestate.com/activeperl/5.16/faq/ActivePerl-faq2.html#ppm_and_proxies this]. Simple command-line installation of PACKAGE_NAME (the package to install) typically just requires typing:&lt;br /&gt;
&lt;br /&gt;
 ppm install PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
== Linux/FreeBSD ==&lt;br /&gt;
We recommend you to use the standard 32-bit Perl distribution that comes with your OS version. In case you need to manually build from source make sure to configure &amp;quot;shared library&amp;quot; (&amp;lt;tt&amp;gt;-Duseshrplib&amp;lt;/tt&amp;gt;), &amp;quot;thread support&amp;quot; (&amp;lt;tt&amp;gt;-Duseithreads&amp;lt;/tt&amp;gt;) and no &amp;quot;64-bit support&amp;quot; (&amp;lt;tt&amp;gt;-Uuse64bitint -Uuse64bitall&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The following additional (non-standard) Perl packages are also required for full functionality of Stride tests in perl:&lt;br /&gt;
&lt;br /&gt;
* [http://search.cpan.org/perldoc/YAML::XS YAML::XS]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Class::ISA Class::ISA]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Pod::POM Pod::POM]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Devel::Symdump Devel::Symdump]&lt;br /&gt;
* [http://search.cpan.org/perldoc/Config::Tiny Config::Tiny]&lt;br /&gt;
&lt;br /&gt;
If your perl is installed in a system directory (&amp;lt;tt&amp;gt;/usr/bin/perl&amp;lt;/tt&amp;gt;, for instance), you will need root access to install shared modules. The simplest method for installing packages is via the [http://www.perl.com/doc/manual/html/lib/CPAN.html CPAN shell]. If you access the Internet via a proxy make sure to set the appropriate [http://search.cpan.org/dist/CPAN/lib/CPAN.pm#Config_Variables CPAN config variables]. To start the shell in interactive mode:&lt;br /&gt;
&lt;br /&gt;
 sudo perl -MCPAN -eshell&lt;br /&gt;
&lt;br /&gt;
Once in the shell, search for and install the latest stable version of PACKAGE_NAME (the package to install):&lt;br /&gt;
&lt;br /&gt;
 install PACKAGE_NAME&lt;br /&gt;
&lt;br /&gt;
The STRIDE perl packages also need to load your system&#039;s &#039;&#039;&#039;libperl.so&#039;&#039;&#039; (shared object file) at runtime. Depending on your system, this file should be loadable from a perl CORE directory or from one of the shared system directories. If you &#039;&#039;&#039;DO NOT&#039;&#039;&#039; have this shared library on your system, you might need to install a &#039;&#039;libperl-dev&#039;&#039;, &#039;&#039;perl-devel&#039;&#039; or &#039;&#039;perl-libs&#039;&#039; package in order to get it. Here is how you can do that on the console of some Linux distributions:&lt;br /&gt;
&lt;br /&gt;
* Debian / Ubuntu&lt;br /&gt;
 sudo apt-get install libperl-dev&lt;br /&gt;
* Fedora / CentOS / RHEL&lt;br /&gt;
 sudo yum -y install perl-devel&lt;br /&gt;
&lt;br /&gt;
== Validation ==&lt;br /&gt;
Once you have installed Perl we recommend you to run the following command in a console window:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
stride --diagnostics Perl --output PerlCheck&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If everything was properly set up you should get the following output:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Executing diagnostics...&lt;br /&gt;
  script &amp;quot;/Perl&amp;quot;&lt;br /&gt;
    &amp;gt; 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms.&lt;br /&gt;
  ---------------------------------------------------------------------&lt;br /&gt;
  Summary: 2 passed, 0 failed, 0 in progress, 0 not in use, 486.95 ms&lt;br /&gt;
&lt;br /&gt;
Saving result file...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition a report file with name &amp;lt;tt&amp;gt;PerlCheck.xml&amp;lt;/tt&amp;gt; will be created in the current directory. If interested in the details you could open that report file in a browser of your choice.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Perl_Script_Snippets&amp;diff=14414</id>
		<title>Perl Script Snippets</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Perl_Script_Snippets&amp;diff=14414"/>
		<updated>2015-07-06T20:55:30Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Standalone two-line script for invoking a remote function */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Below are some brief examples of script test modules that use the [[Perl Script APIs]] for Stride. Most of these examples are incomplete and are only intended to give a quick overview of how this API can be used. &lt;br /&gt;
&lt;br /&gt;
With any perl module that you write, we recommend that you perform a quick syntax check before attempting to execute the module using the Stride Runner. Syntax checking with warnings is easily accomplished by running with the &amp;lt;tt&amp;gt;-cw&amp;lt;/tt&amp;gt; option, e.g.:&lt;br /&gt;
&lt;br /&gt;
* Windows&lt;br /&gt;
  perl -I %STRIDE_DIR%\lib\perl -I %STRIDE_DIR%\lib\perl\5.10 -cw MyTests.pm&lt;br /&gt;
&lt;br /&gt;
* Linux/FreeBSD&lt;br /&gt;
  perl -I $STRIDE_DIR/lib/perl -I $STRIDE_DIR/lib/perl/5.10 -cw MyTests.pm&lt;br /&gt;
&lt;br /&gt;
This will compile the perl script without running it, and it will emit any syntax errors that are found.&lt;br /&gt;
&lt;br /&gt;
== Canonical module format ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
sub test_one : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub test_two : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Subroutine attributes to declare test methods and fixtures ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sub a_test : Test {&lt;br /&gt;
    # test method&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub startup_method : Test(startup) {&lt;br /&gt;
    # startup fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub shutdown_method : Test(shutdown) {&lt;br /&gt;
    # shutdown fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub setup_method : Test(setup) {&lt;br /&gt;
    # setup fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub teardown_method : Test(teardown) {&lt;br /&gt;
    # teardown fixture&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test module including POD documentation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
=head1 NAME&lt;br /&gt;
&lt;br /&gt;
MyTests - example tests&lt;br /&gt;
&lt;br /&gt;
=head1 DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
This is MyTests_1, a deeply funky piece of Perl code.&lt;br /&gt;
&lt;br /&gt;
=head1 METHODS&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head2 test_one&lt;br /&gt;
&lt;br /&gt;
this is a simple &amp;quot;passing&amp;quot; test.&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
sub test_one : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head2 test_two&lt;br /&gt;
&lt;br /&gt;
this is a simple &amp;quot;failing&amp;quot; test.&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
sub test_two : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simple expectation test ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub sync_exact : Test {    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        ordered =&amp;gt; 1,&lt;br /&gt;
        expected =&amp;gt; [&lt;br /&gt;
            &amp;quot;point a&amp;quot;,&lt;br /&gt;
            &amp;quot;point b&amp;quot;,&lt;br /&gt;
            &amp;quot;point c&amp;quot;&lt;br /&gt;
        ],&lt;br /&gt;
        unexpected =&amp;gt; [ TEST_POINT_EVERYTHING_ELSE ]&lt;br /&gt;
    );&lt;br /&gt;
    &lt;br /&gt;
    #...start source under test, if necessary&lt;br /&gt;
&lt;br /&gt;
    # use Check if the events have all happened by the time &lt;br /&gt;
    # you validate the test points. Otherwise use Wait with &lt;br /&gt;
    # a reasonable timeout value.&lt;br /&gt;
    $h-&amp;gt;Check(); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Expectation test with predicate==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to specify a predicate for validating a test point. The predicate &lt;br /&gt;
shown is just a stub and doesn&#039;t do any actual validation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub _myPredicate&lt;br /&gt;
{&lt;br /&gt;
    my ($test_point, $expected_data) = @_;&lt;br /&gt;
    # $test_point is a hashref with the following fields:&lt;br /&gt;
    #  label, data, size, bin, file, line&lt;br /&gt;
    # use the test point data to perform validation and return &lt;br /&gt;
    # nonzero value on success, 0 on failure.&lt;br /&gt;
&lt;br /&gt;
    return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub use_a_predicate : Test {&lt;br /&gt;
    # use arrayref notation to specify label, count, predicate and expected data&lt;br /&gt;
    # if you want to specify a predicate. Predicates can be specified for some, all&lt;br /&gt;
    # or none of the test points. The fourth field is optional - it is just passed&lt;br /&gt;
    # to the predicate as the second argument and is typically used to specify some &lt;br /&gt;
    # expected data for the predicate to validate against.    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        expected =&amp;gt; [&lt;br /&gt;
            [&amp;quot;point a&amp;quot;, 1, \&amp;amp;_myPredicate, 54321],&lt;br /&gt;
            &amp;quot;point b&amp;quot;,&lt;br /&gt;
            [&amp;quot;point c&amp;quot;, 1, \&amp;amp;_myPredicate]&lt;br /&gt;
        ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    $h-&amp;gt;Check(); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reusing a trace data file as expectation ==&lt;br /&gt;
&lt;br /&gt;
This examples shows a simple way to reuse captured YAML trace data from a file as your expectation (this is an alternative to specifying the &amp;lt;tt&amp;gt;expected&amp;lt;/tt&amp;gt; array directly). This example assumes the &#039;&#039;trace_data.yml&#039;&#039; file lives in the same directory as the test module file, but you are free to change this - just change the &amp;lt;tt&amp;gt;expect_file&amp;lt;/tt&amp;gt; argument accordingly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# these standard modules are only required for the file &lt;br /&gt;
# path logic used to generate a full file path for trace_data.yml&lt;br /&gt;
use File::Basename;&lt;br /&gt;
use File::Spec;&lt;br /&gt;
&lt;br /&gt;
sub trace_data : Test {    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        ordered =&amp;gt; 1,&lt;br /&gt;
        expect_file =&amp;gt; File::Spec-&amp;gt;catfile(dirname(__FILE__), &#039;trace_data.yml&#039;),&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    # make any function calls necessary to start the SUT, &lt;br /&gt;
    # then do a Check or Wait, depending on your scenario&lt;br /&gt;
&lt;br /&gt;
    $h-&amp;gt;Check();   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Invoking a function on the target ==&lt;br /&gt;
&lt;br /&gt;
=== Standalone two-line script for invoking a remote function ===&lt;br /&gt;
This simple script shows the minimal code required to make a remote function call of a function that has been enabled with the [[Scl_function | Function Pragrma]] enabling remoting. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use STRIDE;&lt;br /&gt;
$STRIDE::Remote-&amp;gt;MyRemoteFunction();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
More functions can be added to this script by making additional calls using the &amp;lt;tt&amp;gt;$STRIDE::Remote&amp;lt;/tt&amp;gt; object. If your remote function accepts arguments, they should be added to the function call parameters (see the [[Perl_Script_APIs#STRIDE::Remote|Perl API Reference]] for more information).&lt;br /&gt;
&lt;br /&gt;
=== Making calls with test modules ===&lt;br /&gt;
&lt;br /&gt;
Within test modules, remote functions can be easily invoked using the exported &amp;lt;tt&amp;gt;Remote&amp;lt;/tt&amp;gt; object. The following two examples illustrate this.&lt;br /&gt;
&lt;br /&gt;
==== Blocking syntax (blocks until function returns) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $retval = Remote-&amp;gt;foo(1, &amp;quot;input string&amp;quot;);&lt;br /&gt;
Remote-&amp;gt;bar();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== asynchronous execution (return immediately, function continues to execute on device) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $fh = Remote-&amp;gt;async-&amp;gt;foo(1, &amp;quot;input string&amp;quot;);&lt;br /&gt;
my $retval = $fh-&amp;gt;Wait(1000); #waits up to one second for the function to return&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing compiler macro values (constants) ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* some compilation unit included in the STRIDE compilation process */&lt;br /&gt;
#define SOME_DEFINED_VALUE 42&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $value = Remote-&amp;gt;SOME_DEFINED_VALUE;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Perl_Script_Snippets&amp;diff=14413</id>
		<title>Perl Script Snippets</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Perl_Script_Snippets&amp;diff=14413"/>
		<updated>2015-07-06T20:50:59Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Below are some brief examples of script test modules that use the [[Perl Script APIs]] for Stride. Most of these examples are incomplete and are only intended to give a quick overview of how this API can be used. &lt;br /&gt;
&lt;br /&gt;
With any perl module that you write, we recommend that you perform a quick syntax check before attempting to execute the module using the Stride Runner. Syntax checking with warnings is easily accomplished by running with the &amp;lt;tt&amp;gt;-cw&amp;lt;/tt&amp;gt; option, e.g.:&lt;br /&gt;
&lt;br /&gt;
* Windows&lt;br /&gt;
  perl -I %STRIDE_DIR%\lib\perl -I %STRIDE_DIR%\lib\perl\5.10 -cw MyTests.pm&lt;br /&gt;
&lt;br /&gt;
* Linux/FreeBSD&lt;br /&gt;
  perl -I $STRIDE_DIR/lib/perl -I $STRIDE_DIR/lib/perl/5.10 -cw MyTests.pm&lt;br /&gt;
&lt;br /&gt;
This will compile the perl script without running it, and it will emit any syntax errors that are found.&lt;br /&gt;
&lt;br /&gt;
== Canonical module format ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
sub test_one : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub test_two : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Subroutine attributes to declare test methods and fixtures ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
sub a_test : Test {&lt;br /&gt;
    # test method&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub startup_method : Test(startup) {&lt;br /&gt;
    # startup fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub shutdown_method : Test(shutdown) {&lt;br /&gt;
    # shutdown fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub setup_method : Test(setup) {&lt;br /&gt;
    # setup fixturing&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub teardown_method : Test(teardown) {&lt;br /&gt;
    # teardown fixture&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test module including POD documentation ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
=head1 NAME&lt;br /&gt;
&lt;br /&gt;
MyTests - example tests&lt;br /&gt;
&lt;br /&gt;
=head1 DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
This is MyTests_1, a deeply funky piece of Perl code.&lt;br /&gt;
&lt;br /&gt;
=head1 METHODS&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head2 test_one&lt;br /&gt;
&lt;br /&gt;
this is a simple &amp;quot;passing&amp;quot; test.&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
sub test_one : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=head2 test_two&lt;br /&gt;
&lt;br /&gt;
this is a simple &amp;quot;failing&amp;quot; test.&lt;br /&gt;
&lt;br /&gt;
=cut&lt;br /&gt;
sub test_two : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Simple expectation test ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub sync_exact : Test {    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        ordered =&amp;gt; 1,&lt;br /&gt;
        expected =&amp;gt; [&lt;br /&gt;
            &amp;quot;point a&amp;quot;,&lt;br /&gt;
            &amp;quot;point b&amp;quot;,&lt;br /&gt;
            &amp;quot;point c&amp;quot;&lt;br /&gt;
        ],&lt;br /&gt;
        unexpected =&amp;gt; [ TEST_POINT_EVERYTHING_ELSE ]&lt;br /&gt;
    );&lt;br /&gt;
    &lt;br /&gt;
    #...start source under test, if necessary&lt;br /&gt;
&lt;br /&gt;
    # use Check if the events have all happened by the time &lt;br /&gt;
    # you validate the test points. Otherwise use Wait with &lt;br /&gt;
    # a reasonable timeout value.&lt;br /&gt;
    $h-&amp;gt;Check(); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Expectation test with predicate==&lt;br /&gt;
&lt;br /&gt;
Here&#039;s how to specify a predicate for validating a test point. The predicate &lt;br /&gt;
shown is just a stub and doesn&#039;t do any actual validation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub _myPredicate&lt;br /&gt;
{&lt;br /&gt;
    my ($test_point, $expected_data) = @_;&lt;br /&gt;
    # $test_point is a hashref with the following fields:&lt;br /&gt;
    #  label, data, size, bin, file, line&lt;br /&gt;
    # use the test point data to perform validation and return &lt;br /&gt;
    # nonzero value on success, 0 on failure.&lt;br /&gt;
&lt;br /&gt;
    return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub use_a_predicate : Test {&lt;br /&gt;
    # use arrayref notation to specify label, count, predicate and expected data&lt;br /&gt;
    # if you want to specify a predicate. Predicates can be specified for some, all&lt;br /&gt;
    # or none of the test points. The fourth field is optional - it is just passed&lt;br /&gt;
    # to the predicate as the second argument and is typically used to specify some &lt;br /&gt;
    # expected data for the predicate to validate against.    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        expected =&amp;gt; [&lt;br /&gt;
            [&amp;quot;point a&amp;quot;, 1, \&amp;amp;_myPredicate, 54321],&lt;br /&gt;
            &amp;quot;point b&amp;quot;,&lt;br /&gt;
            [&amp;quot;point c&amp;quot;, 1, \&amp;amp;_myPredicate]&lt;br /&gt;
        ]&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    $h-&amp;gt;Check(); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reusing a trace data file as expectation ==&lt;br /&gt;
&lt;br /&gt;
This examples shows a simple way to reuse captured YAML trace data from a file as your expectation (this is an alternative to specifying the &amp;lt;tt&amp;gt;expected&amp;lt;/tt&amp;gt; array directly). This example assumes the &#039;&#039;trace_data.yml&#039;&#039; file lives in the same directory as the test module file, but you are free to change this - just change the &amp;lt;tt&amp;gt;expect_file&amp;lt;/tt&amp;gt; argument accordingly.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
# these standard modules are only required for the file &lt;br /&gt;
# path logic used to generate a full file path for trace_data.yml&lt;br /&gt;
use File::Basename;&lt;br /&gt;
use File::Spec;&lt;br /&gt;
&lt;br /&gt;
sub trace_data : Test {    &lt;br /&gt;
    my $h = TestPointSetup(&lt;br /&gt;
        ordered =&amp;gt; 1,&lt;br /&gt;
        expect_file =&amp;gt; File::Spec-&amp;gt;catfile(dirname(__FILE__), &#039;trace_data.yml&#039;),&lt;br /&gt;
    );&lt;br /&gt;
&lt;br /&gt;
    # make any function calls necessary to start the SUT, &lt;br /&gt;
    # then do a Check or Wait, depending on your scenario&lt;br /&gt;
&lt;br /&gt;
    $h-&amp;gt;Check();   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Invoking a function on the target ==&lt;br /&gt;
&lt;br /&gt;
=== Standalone two-line script for invoking a remote function ===&lt;br /&gt;
This simple script shows the minimal code required to make a remote function call of a function that has been enabled with [[Function Capturing#Remoting|STRIDE remoting]].&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use STRIDE;&lt;br /&gt;
$STRIDE::Remote-&amp;gt;MyRemoteFunction();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
More functions can be added to this script by making additional calls using the &amp;lt;tt&amp;gt;$STRIDE::Remote&amp;lt;/tt&amp;gt; object. If your remote function accepts arguments, they should be added to the function call parameters (see the [[Perl_Script_APIs#STRIDE::Remote|Perl API Reference]] for more information).&lt;br /&gt;
&lt;br /&gt;
=== Making calls with test modules ===&lt;br /&gt;
&lt;br /&gt;
Within test modules, remote functions can be easily invoked using the exported &amp;lt;tt&amp;gt;Remote&amp;lt;/tt&amp;gt; object. The following two examples illustrate this.&lt;br /&gt;
&lt;br /&gt;
==== Blocking syntax (blocks until function returns) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $retval = Remote-&amp;gt;foo(1, &amp;quot;input string&amp;quot;);&lt;br /&gt;
Remote-&amp;gt;bar();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== asynchronous execution (return immediately, function continues to execute on device) ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $fh = Remote-&amp;gt;async-&amp;gt;foo(1, &amp;quot;input string&amp;quot;);&lt;br /&gt;
my $retval = $fh-&amp;gt;Wait(1000); #waits up to one second for the function to return&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Accessing compiler macro values (constants) ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/* some compilation unit included in the STRIDE compilation process */&lt;br /&gt;
#define SOME_DEFINED_VALUE 42&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $value = Remote-&amp;gt;SOME_DEFINED_VALUE;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Perl_Script_APIs&amp;diff=14412</id>
		<title>Perl Script APIs</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Perl_Script_APIs&amp;diff=14412"/>
		<updated>2015-07-06T20:49:17Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The Stride perl script model requires you to create perl  modules (*.pm files) to group your tests. The following documents the  API for the STRIDE::Test base class that you use when creating these  modules.&lt;br /&gt;
&lt;br /&gt;
=  STRIDE::Test =&lt;br /&gt;
&lt;br /&gt;
This is  the base class for test modules. It provides the following methods.&lt;br /&gt;
&lt;br /&gt;
== Declaring Tests  ==&lt;br /&gt;
&lt;br /&gt;
Once you have created a  package that inherits from STRIDE::Test, you can declare any subroutine  to be a test method by declaring it with the &#039;&#039;: Test&#039;&#039;  attribute. In addition to test methods, the following attributes  declare other kinds of subroutines:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;subroutine attributes&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  attribute!! description&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Test&lt;br /&gt;
| declares a  test method - will be executed automatically when the module is run.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Test(startup)&lt;br /&gt;
| startup method, called once before any of  the test methods have been executed.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Test(shutdown)&lt;br /&gt;
| shutdown method, called once after all  test methods have been executed.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Test(setup)&lt;br /&gt;
| setup  fixture, called before each test method.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Test(teardown)&lt;br /&gt;
| teardown fixture, called after each test  method.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You are free to  declare as many methods as you like with these attributes. When more  than one method has been declared with the same attribute, the methods  will be called at the appropriate time in the order declared.&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
These methods are all  available in the context of a test module that inherits from  STRIDE::Test.&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  name !! description&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source  lang=&amp;quot;perl&amp;quot;&amp;gt;TestCase&amp;lt;/source&amp;gt;&lt;br /&gt;
| returns the default test case object. See [[#TestCase|here]] for more info.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source  lang=&amp;quot;perl&amp;quot;&amp;gt;Remote&amp;lt;/source&amp;gt;&lt;br /&gt;
| Returns a [[#STRIDE::Remote|STRIDE::Remote]] object that was initialized with the active database. This object is used for accessing captured at the time of compilation remote functions and constant values (macros and enums).&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;GetParam(name, defval)&amp;lt;/source&amp;gt;&lt;br /&gt;
| returns an input parameter&#039;s value associated with the default test suite.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;TestCase AddCase(name, description)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates a new test case and adds it to the default test suite.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;TestAnnotation AddAnnotation(level, name, description)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates a new test annotation and adds it to the default test suite. The value of &#039;&#039;level&#039;&#039; could be one of the predefined constants:&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_TRACE&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;const&amp;quot;&amp;gt;symbols like these are exported as perl constants - don&#039;t quote these values  when you use them - rather, use the bare symbols and perl will use the constant value we provide&amp;lt;/ref&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_DEBUG&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_INFO&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_WARNING&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_ERROR&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_FATAL&#039;&#039;&#039;&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;SetData(name, value)&amp;lt;/source&amp;gt;&lt;br /&gt;
| associates a custom name-value pair with the default test suite.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;TestPointSetup( &lt;br /&gt;
  expected =&amp;gt; [], &lt;br /&gt;
  unexpected  =&amp;gt; [],&lt;br /&gt;
  ordered  =&amp;gt; 0|1,&lt;br /&gt;
  strict =&amp;gt;  0|1,&lt;br /&gt;
  continue =&amp;gt; 0|1,&lt;br /&gt;
  expect_file =&amp;gt; filepath,&lt;br /&gt;
  predicate  =&amp;gt; coderef,&lt;br /&gt;
  replay_file  =&amp;gt; filepath,&lt;br /&gt;
  test_case  =&amp;gt; case)&amp;lt;/source&amp;gt;&lt;br /&gt;
| Creates a  new instance of [[#STRIDE::TestPoint|STRIDE::TestPoint]],  automatically passing the default TestCase() as the test case if none  is provided. Options are passed using hash-style arguments. The  supported arguments are:&lt;br /&gt;
; ordered : flag  that specifies whether or not the expectation set must occur in the  order specified. If set to true, the expectation list is treated as an  ordered list, otherwise we assume the list is unordered. Default value  is true (ordered processing). &lt;br /&gt;
; strict : flag that specifies if the list  is exclusive. If strict is specified, then the actual events (within the  specified universe of test points) must match the expectation list  exactly as specified. If strict processing is disabled, then other test  points within the universe are allowed to occur between items specified  in the expectation list. The default value is true (strict processing).&lt;br /&gt;
; continue : flag that specifies whether the expectation should continue to process test points even after the specified expectation has been minimally satisfied. Normally, a test will complete as soon as the expectation is satisfied. In some circumstances, however, it is necessary to continue waiting until the full timeout period (specified to the Wait function) before exiting. The default value is 0, indicating that the test will exit as soon as it is satisfied (or otherwise fails).&lt;br /&gt;
; expected : is  an array reference containing elements that are either  strings  representing the test point labels &#039;&#039;&#039;OR&#039;&#039;&#039;  an anonymous sub-array that contains these four items: &#039;&#039;&#039;[label, count,  predicate, expected_data]&#039;&#039;&#039;. The  four element arrayref elements are:&lt;br /&gt;
* &#039;&#039;label&#039;&#039; is the test point label (same as the  non array argument type). the label is also allowed to be specified  using one of the predefined constant values: &#039;&#039;&#039;TEST_POINT_ANY_IN_SET&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;const&amp;quot;/&amp;gt; or &#039;&#039;&#039;TEST_POINT_ANY_AT_ALL&#039;&#039;&#039;.  &#039;&#039;&#039;TEST_POINT_ANY_IN_SET&#039;&#039;&#039; is used to indicate a place  in the expectation list where &#039;&#039;&#039;any&#039;&#039;&#039;  test point that&#039;s otherwise explicitly defined in the set is permitted. &#039;&#039;&#039;TEST_POINT_ANY_AT_ALL&#039;&#039;&#039; is used to indicate a place in the expectation where &#039;&#039;&#039;any&#039;&#039;&#039; test point in the system is allowed. When either special  value is used in the expectation list, a predicate must &#039;&#039;also&#039;&#039; be specified. The test point is only  considered satisfied when the predicate returns true. These special values can be used to implement, among  other things, startup scenarios where you want to defer your expectation  list processing until a particular test point and/or data state have  been encountered. When specifying either value  in an &#039;&#039;&#039;unordered&#039;&#039;&#039; expectation, it is only allowed to  appear &#039;&#039;&#039;once&#039;&#039;&#039; in the expectation list and, in  that case, it is treated as a startup expectation whereby none of the  other test points are processed until the startup  expectation has been satisfied (when it&#039;s predicate returns true).&lt;br /&gt;
* &#039;&#039;count&#039;&#039; is the number of expected occurrences  - can be any positive integer value, or the special value &#039;&#039;&#039;TEST_POINT_ANY_COUNT&#039;&#039;&#039;&amp;lt;ref  name=&amp;quot;const&amp;quot;/&amp;gt;.&lt;br /&gt;
* &#039;&#039;predicate&#039;&#039;  must be a perl coderef for a function to call as a predicate. You are  free to define your own predicate function OR use on the three [[#Predicates |  standard ones]]  provided by STRIDE::Test.&lt;br /&gt;
* &#039;&#039;expected_data&#039;&#039;  will be passed as an argument to the predicate - intended to be used to  specify expected data. &lt;br /&gt;
If using the array form of  expectation, only the label entry is required - the remaining elements  are optional.&lt;br /&gt;
; unexpected :  is an array reference containing labels that are to be treated as  failure if they are encountered. For either &#039;&#039;expected&#039;&#039;  and &#039;&#039;unexpected&#039;&#039;, the special value &#039;&#039;&#039;TEST_POINT_EVERYTHING_ELSE&#039;&#039;&#039;&amp;lt;ref  name=&amp;quot;const&amp;quot;/&amp;gt; can be used alone to indicate that any test  points not explicitly listed in the set are considered part of this set.&lt;br /&gt;
; expect_file :  if you have previously captured YAML trace data in a file (using the [[Stride Runner]]), you can specify the file as the source of expectations using this  parameter. If you specify a YAML trace file, you should NOT also specify the &#039;&#039;&#039;expected&#039;&#039;&#039; items as they will be overridden by the YAML trace file.&lt;br /&gt;
; predicate : is a perl coderef to a default  predicate function to use for all expectation items. If any specific  entry in the expectation list has a predicate function, the  expectation&#039;s predicate will override this global value. By default, no  global predicate is assumed and no predicate is called unless specified  for each expectation item.&lt;br /&gt;
; replay_file : allows you to specify a YAML trace file and &#039;&#039;&#039;&#039;&#039;input&#039;&#039;&#039;&#039;&#039;  to the current test. If specified, the expectation will be validated  against the events specified in the file rather than live events  generated by a device under test.&lt;br /&gt;
; test_case : allows you to specify a test case to use for reporting the results. This is only useful for advanced users that are generating test cases dynamically within a test method. &lt;br /&gt;
&lt;br /&gt;
The returned object is of type [[#STRIDE::TestPoint|STRIDE::TestPoint]] and has access to all it&#039;s member functions.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Assertions ==&lt;br /&gt;
&lt;br /&gt;
Each of the following  assertion methods are provided for standard comparisons. For each, there  there are three different types, depending on the desired behavior upon  failure: &#039;&#039;&#039;EXPECT&#039;&#039;&#039;, &#039;&#039;&#039;ASSERT&#039;&#039;&#039;,  and &#039;&#039;&#039;EXIT&#039;&#039;&#039;. &#039;&#039;&#039;EXPECT&#039;&#039;&#039;  checks will fail the current test case but continue executing the test  method. &#039;&#039;&#039;ASSERT&#039;&#039;&#039; checks will fail the current test  case and exit the test method immediately.  &#039;&#039;&#039;EXIT&#039;&#039;&#039;  checks will fail the current test case, immediately exit the current  test method AND cease further execution of the test module.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |  &#039;&#039;&#039;Boolean&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
! macro !!  Pass if&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_TRUE(&#039;&#039;cond&#039;&#039;);&lt;br /&gt;
| &#039;&#039;cond&#039;&#039; is true&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_FALSE(&#039;&#039;cond&#039;&#039;);&lt;br /&gt;
| &#039;&#039;cond&#039;&#039; is false&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |  &#039;&#039;&#039;Comparison&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !!  Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_EQ(&#039;&#039;val1&#039;&#039;,  &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; == &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; != &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LT(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039;&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;&#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039;&amp;lt;nowiki&amp;gt; &amp;lt;= &amp;lt;/nowiki&amp;gt;&#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GT(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; &amp;gt; &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; &amp;gt;= &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For  all of the value comparison methods (&#039;&#039;&#039;_EQ&#039;&#039;&#039;,  &#039;&#039;&#039;_NE&#039;&#039;&#039;, etc.), the comparison is numeric if  both arguments are numeric -- otherwise the comparison is a case  sensitive string comparison. If case insensitive comparison is needed,  simply wrap both arguments with perl&#039;s builtin &#039;&#039;&#039;lc()&#039;&#039;&#039;  (lowercase) or &#039;&#039;&#039;uc()&#039;&#039;&#039; (uppercase) functions.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |  &#039;&#039;&#039;Predicates&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !!  Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_PRED(&#039;&#039;coderef&#039;&#039;,  &#039;&#039;data&#039;&#039;)&lt;br /&gt;
| &#039;&#039;&amp;amp;coderef&#039;&#039;(&#039;&#039;data&#039;&#039;)  returns true. The predicate function is specified by &#039;&#039;coderef&#039;&#039; with optional data &#039;&#039;data&#039;&#039;. The predicate can also return the  special value &#039;&#039;&#039;TEST_POINT_IGNORE&#039;&#039;&#039;&amp;lt;ref  name=&amp;quot;const&amp;quot;/&amp;gt;&#039; to indicate that the event should be ignored.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each  of these expectation methods also supports the following optional named  arguments: &lt;br /&gt;
; test_case =&amp;gt; case : allows you to  apply the check to a test case other than the current default&lt;br /&gt;
; message =&amp;gt;  &amp;quot;message&amp;quot; : allows you to specify an additional message to include if  the check fails. &lt;br /&gt;
&lt;br /&gt;
Because these arguments are  optional, they are passed using named argument (hash-style) syntax after  the required parameters that are shown above.&lt;br /&gt;
&lt;br /&gt;
== Annotations ==&lt;br /&gt;
&lt;br /&gt;
The following methods can be used to annotate a test case. Typically these methods are used to add  additional information about the state of the test to the report.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; |  &#039;&#039;&#039;Annotation Methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  name !! description&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source  lang=&amp;quot;perl&amp;quot;&amp;gt;NOTE_INFO(message)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates an info note in your test results report.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source  lang=&amp;quot;perl&amp;quot;&amp;gt;NOTE_WARN(message)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates a warning note in your test results report.&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source  lang=&amp;quot;perl&amp;quot;&amp;gt;NOTE_ERROR(message)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates an error note in your test results report.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each  of these note methods also supports the following optional named arguments: &lt;br /&gt;
; test_case =&amp;gt; case : allows you to add the note to a test case other than the current default&lt;br /&gt;
; file =&amp;gt;  file : allows you to attach a file along with the annotation message. &lt;br /&gt;
; test_point  =&amp;gt; test_point_hashref : If you are annotating your report in the  context of a predicate with a specific test point, you might want to specify the test point using this parameter. This will cause your annotation to be grouped in the final report with the annotation message  that corresponds to the test point hit message. By default, a host  timestamp value is used to generate the NOTE annotation, which generally causes the NOTE annotations to group toward the end of the test case  report.&lt;br /&gt;
&lt;br /&gt;
Because these arguments are optional, they are passed using named argument (hash-style) syntax after the required parameters that are shown above.&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
We  have preliminary support for documentation extraction in the test  modules using the standard perl POD formatting tokens. &lt;br /&gt;
&lt;br /&gt;
The POD  that you include in your test module currently must follow these  conventions:&lt;br /&gt;
&lt;br /&gt;
* it must begin  with a &#039;&#039;head1  NAME&#039;&#039; section and the text of  this section must contain the name of the package, preferably near the  beginning.&lt;br /&gt;
* a &#039;&#039;head1 DESCRIPTION&#039;&#039;  can follow the &#039;&#039;NAME&#039;&#039; section. If provided, it will be  used as the description of the test suite created for the test unit.&lt;br /&gt;
* This  NAME/DESCRIPTION block must finish with an empty &#039;&#039;head1 METHODS&#039;&#039; section.&lt;br /&gt;
* each of the  test methods can be documented by preceding them with a &#039;&#039;head2&#039;&#039; section with the same name as the  test method (subroutine name). The text in this section will be used as  the testcase description.&lt;br /&gt;
&lt;br /&gt;
== Predicates ==&lt;br /&gt;
&lt;br /&gt;
STRIDE expectation testing  allows you to specify predicate functions for sophisticated data  validation. We provide several standard predicates in the STRIDE::Test  package, or you are free to define your own predicate functions.&lt;br /&gt;
&lt;br /&gt;
=== Builtin  Predicates ===&lt;br /&gt;
The  STRIDE::Test library provides a few standard predicates which you are  free to use in your expectations:&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Built-In Predicates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  predicate !! description&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;TestPointStrCmp&#039;&#039;&#039;&lt;br /&gt;
| does a case &#039;&#039;&#039;&#039;&#039;sensitive&#039;&#039;&#039;&#039;&#039;  comparison of the test point data and the &#039;&#039;expected_data&#039;&#039;  (specified as part of the expectation)&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
|  &#039;&#039;&#039;TestPointStrCaseCmp&#039;&#039;&#039;&lt;br /&gt;
| does a case &#039;&#039;&#039;&#039;&#039;insensitive&#039;&#039;&#039;&#039;&#039;  comparison of the test point data and the &#039;&#039;expected_data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
|  &#039;&#039;&#039;TestPointMemCmp&#039;&#039;&#039;&lt;br /&gt;
| does a  bytewise comparison of the test point data and the &#039;&#039;expected_data&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
|  &#039;&#039;&#039;TestPointDefaultCmp&#039;&#039;&#039;&lt;br /&gt;
| pass-through  function that calls &#039;&#039;&#039;TestPointMemCmp&#039;&#039;&#039; for binary test point data or &#039;&#039;&#039;TestPointStrCmp&#039;&#039;&#039; otherwise. This is useful as a  global predicate since it implements an appropriate default data  comparison.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== User Defined  Predicates ===&lt;br /&gt;
User defined  predicates are subroutines of the following form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
sub  myPredicate &lt;br /&gt;
{&lt;br /&gt;
    my  ($test_point, $expected_data) = @_;&lt;br /&gt;
    my $status  = 0;&lt;br /&gt;
     # access the test point data as $test_point-&amp;gt;{data}, &lt;br /&gt;
    # and the  label as $test_point-&amp;gt;{label}&lt;br /&gt;
&lt;br /&gt;
    # set $status according to whether or  not your predicate passes&lt;br /&gt;
    return $status;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The predicate  function is passed two arguments: the current test point and the  expected data that was specified as part of the expectation. The test  point data is a reference to a hash with the following fields: &lt;br /&gt;
; label : the test point label&lt;br /&gt;
; data : the  data payload for the test point (if any)&lt;br /&gt;
; data_as_hex :  an alternate form of the data payload, rendered as a string of hex  characters&lt;br /&gt;
; size : the size of the data payload&lt;br /&gt;
; bin : flag  indicating whether or not the data payload is binary&lt;br /&gt;
; file : the  source file for the test point&lt;br /&gt;
; line :  the line number for the test  point&lt;br /&gt;
&lt;br /&gt;
The expected data is passed as a single  scalar, but you can use references to compound data structures (hashes,  arrays) if you need more complex expected data.&lt;br /&gt;
&lt;br /&gt;
The predicate  function should return a true value if it passes, false if not, or &#039;&#039;&#039;TEST_POINT_IGNORE&#039;&#039;&#039;&amp;lt;ref  name=&amp;quot;const&amp;quot;/&amp;gt; if the test point should be ignored completely.&lt;br /&gt;
&lt;br /&gt;
= STRIDE::Remote =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;STRIDE::Remote&#039;&#039; class uses perl &#039;&#039;&#039;AUTOLOAD&#039;&#039;&#039;-ing to provide a convenient syntax for making simple function calls and retrieving database constants in perl. Given any properly initialized &#039;&#039;STRIDE::Test&#039;&#039; object, any captured function or constant (macro) is available directly as method or properties of the exported &#039;&#039;Remote&#039;&#039; object. Constants can also be accessed via the tied hash &#039;&#039;constants&#039;&#039; member. &lt;br /&gt;
&lt;br /&gt;
For example, given a database with two functions and a macro:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int foo(const char * path);&lt;br /&gt;
void bar(double value);&lt;br /&gt;
&lt;br /&gt;
#define MY_PI_VALUE 3.1415927&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In perl these methods/constants are invokable using the exported &#039;&#039;STRIDE::Test&#039;&#039; Remote object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my  $retval = Remote-&amp;gt;foo(&amp;quot;my string&amp;quot;);&lt;br /&gt;
Remote-&amp;gt;bar(Constants-&amp;gt;{MY_PI_VALUE});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Asynchronous  invocation == &lt;br /&gt;
&lt;br /&gt;
Functions can also be called asynchronously by using the &#039;&#039;async&#039;&#039; delegator within the &#039;&#039;Remote&#039;&#039; object. When invoked this way, the function call will return a handle object that can be used to wait for the function return value - for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
my $h = Remote-&amp;gt;async-&amp;gt;foo(&amp;quot;my string&amp;quot;);&lt;br /&gt;
my $retval = $h-&amp;gt;Wait(1000);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Wait&#039;&#039;&#039; function takes one optional argument -- the timeout duration (in milliseconds) that indicates the maximum  time to wait for the function to return. If the timeout value is not  provided, &#039;&#039;Wait&#039;&#039; will wait indefinitely for the  function to return. If a timeout is specified and expires before the  function returns, the method with &#039;&#039;die&#039;&#039;  with a timeout error message - so you might want to wrap your &#039;&#039;&#039;Wait&#039;&#039;&#039; call in an &amp;lt;tt&amp;gt;eval{};&amp;lt;/tt&amp;gt; statement if you want to  gracefully handle the timeout condition.&lt;br /&gt;
&lt;br /&gt;
= STRIDE::TestPoint =&lt;br /&gt;
&lt;br /&gt;
STRIDE::TestPoint  objects are used to create test point expectation tests. These objects  are created using the exported TestPointSetup factory function of the  STRIDE::Test class. Once a STRIDE::TestPoint object has been created  with the desired expectations, two functions can be called:&lt;br /&gt;
&lt;br /&gt;
; Wait(timeout) : This method processes test  points that have occurred on the target and assesses failure based on  the parameters you provided when creating the TestPoint object. The  timeout parameter indicates how long (in milliseconds) to Wait for the  specified events. If no timeout value is provided, &#039;&#039;&#039;Wait&#039;&#039;&#039; will proceed indefinitely or until a  clear pass/failure determination can be made.&lt;br /&gt;
; Check() : this  is equivalent to Wait with a very small timeout. As such, it  essentially verifies that your specified test points have already been  hit.&lt;br /&gt;
&lt;br /&gt;
= Reporting Model =&lt;br /&gt;
&lt;br /&gt;
The STRIDE perl framework includes an implementation of our [[Reporting Model]] that is common across all STRIDE components. The Test module gives explicit access to key elements of the report model, Cases and Annotaions. Here are a description of the methods available for each of these Objects.&lt;br /&gt;
&lt;br /&gt;
== TestCase ==&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  name !! description&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;SetStatus(status, duration) &amp;lt;/source&amp;gt;&lt;br /&gt;
| sets the test case status. The value of &#039;&#039;status&#039;&#039; could be one of the predefined constants:&lt;br /&gt;
* &#039;&#039;&#039;TEST_FAIL&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;const&amp;quot;/&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;TEST_PASS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;TEST_NOTINUSE&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;TEST_INPROGRESS&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;TEST_DONE&#039;&#039;&#039; - applicable to dynamic cases - sets the status to &#039;&#039;&#039;pass&#039;&#039;&#039; unless already set to &#039;&#039;&#039;fail&#039;&#039;&#039; or &#039;&#039;&#039;not-in-use&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;TestAnnotation AddAnnotation(level, name, description)&amp;lt;/source&amp;gt;&lt;br /&gt;
| creates a new test annotation and adds it to the test case. The value of &#039;&#039;level&#039;&#039; could be one of the predefined consttants:&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_TRACE&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;const&amp;quot;/&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_DEBUG&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_INFO&#039;&#039;&#039; &lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_WARNING&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_ERROR&#039;&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;ANNOTATION_FATAL&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;SetData(name, value)&amp;lt;/source&amp;gt;&lt;br /&gt;
| associates a custom name-value pair with the test case.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TestAnnotation ==&lt;br /&gt;
&lt;br /&gt;
{|  class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Methods&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;  &lt;br /&gt;
!  name !! description&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;AddComment(label, message)&amp;lt;/source&amp;gt;&lt;br /&gt;
| adds a new comment to the test annotation.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Script&amp;diff=14411</id>
		<title>Test Script</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Script&amp;diff=14411"/>
		<updated>2015-07-06T20:46:48Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Running a Test Script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Stride&#039;s test script solution allows users to take advantage of the power of dynamic languages on the host to execute test scenarios on the device under test. Some of the advantages of host based script tests are:&lt;br /&gt;
* &#039;&#039;&#039;test coverage&#039;&#039;&#039; can be &#039;&#039;&#039;expanded&#039;&#039;&#039; without any changes to the target device.&lt;br /&gt;
* sophisticated &#039;&#039;&#039;device automation&#039;&#039;&#039; possible using facilities available on the host.&lt;br /&gt;
* no additional &#039;&#039;&#039;code space&#039;&#039;&#039; requirements on the device once the software under test. &lt;br /&gt;
* powerful &#039;&#039;&#039;data validation&#039;&#039;&#039; techniques are possible using the power of the host (validating large media files generated by the target device, for example).&lt;br /&gt;
* large library of &#039;&#039;&#039;extension modules&#039;&#039;&#039; are available for standard dynamic languages (e.g. [http://search.cpan.org cpan for perl])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Test Script (i.e. MyTest.pm)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt;&lt;br /&gt;
use strict;&lt;br /&gt;
use warnings;&lt;br /&gt;
&lt;br /&gt;
package MyTests;&lt;br /&gt;
use base qw(STRIDE::Test);&lt;br /&gt;
use STRIDE::Test;&lt;br /&gt;
&lt;br /&gt;
sub test_one : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(1);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
sub test_two : Test&lt;br /&gt;
{&lt;br /&gt;
    ASSERT_TRUE(0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
1;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Running a Test Script ==&lt;br /&gt;
Stride executes tests using a runner controlled by a host computer. Refer to [[Running Tests]] for Test Units. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invoking the Runner (aka &amp;lt;tt&amp;gt;[[STRIDE_Runner|stride]]&amp;lt;/tt&amp;gt;) from a console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  stride ..  --run=MyTest.pm&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Log&amp;diff=14410</id>
		<title>Test Log</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Log&amp;diff=14410"/>
		<updated>2015-07-06T20:36:43Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Test Log macros provide a simple means to add information from the source under test to the currently executing test case. This information is added to the test report as annotations with a level of either &#039;&#039;Error&#039;&#039;, &#039;&#039;Warning&#039;&#039;, or &#039;&#039;Info&#039;&#039; according to the macro that is used. The log messages are also captured when tracing is enabled in the [[Stride Runner]].&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;srTEST_LOG_xx()&amp;lt;/tt&amp;gt; macro is intended to be a general instrumentation macro for capturing information in the source under test. Logs differ from test points in that they cannot be used for the basis of expectation tests - they are strictly informational. The Stride log messages are intended to supplement, not supplant a [[Test Point | Test Points]].&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
To use these macros you should include the &#039;&#039;&#039;srtest.h&#039;&#039;&#039; header file from the STRIDE Runtime in your compilation unit. The Test Log macros are active only when &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, therefore it is practical to place these macros in-line in production source. When &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is not &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, these macros evaluate to nothing. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Error Logging&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTEST_LOG_ERROR(&#039;&#039;message&#039;&#039;, ...)&lt;br /&gt;
| &#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Warning Logging&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTEST_LOG_WARN(&#039;&#039;message&#039;&#039;, ...)&lt;br /&gt;
| &#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Info Logging&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srTEST_LOG_INFO(&#039;&#039;message&#039;&#039;, ...)&lt;br /&gt;
| &#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* The maximum length of the message string approximately 1000 characters. If the maximum length is exceeded, the message string is truncated.&lt;br /&gt;
&lt;br /&gt;
=== C++ Only Features ===&lt;br /&gt;
In C++ source the macros above support adding to other content to the message by using the &amp;lt;&amp;lt; operator. &lt;br /&gt;
&lt;br /&gt;
=== Log Level ===&lt;br /&gt;
&lt;br /&gt;
By default only logs with level of either &#039;&#039;Error&#039;&#039; or &#039;&#039;Warning&#039;&#039; are propagated to the host. The [[STRIDE Runner#Options | Stride Runner]] via &amp;lt;tt&amp;gt;--log_level&amp;lt;/tt&amp;gt; &#039;&#039;option&#039;&#039; provides finer control over that behavior.&lt;br /&gt;
&lt;br /&gt;
== Code Snippets ==&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
srTEST_LOG_ERROR(&amp;quot;This is an error message.&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
srTEST_LOG_WARN(&amp;quot;This is a warning message with format string %d.&amp;quot;, 123);&lt;br /&gt;
&lt;br /&gt;
srTEST_LOG_INFO(&amp;quot;This is an info message with format string %s and %s.&amp;quot;, &amp;quot;this&amp;quot;, &amp;quot;that&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
srTEST_LOG_ERROR(&amp;quot;some error: &amp;quot;) &amp;lt;&amp;lt; &amp;quot;stream input supported under c++&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Point_Testing_in_C/C%2B%2B&amp;diff=14409</id>
		<title>Test Point Testing in C/C++</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Point_Testing_in_C/C%2B%2B&amp;diff=14409"/>
		<updated>2015-07-06T20:33:01Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Test code to validate the [[Expectations]] of the Test Points often follows this basic pattern:&lt;br /&gt;
&lt;br /&gt;
# Specify an expectation set consisting of expected (i.e. the test points that are expected to be hit) and optionally unexpected (i.e. the test points that are not expected to be hit) test points&lt;br /&gt;
# Register the expectation set with the STRIDE runtime&lt;br /&gt;
# Invoke the software under test (causing instrumentation points to be hit). This may not be necessary if the instrumented software under test is constantly running).&lt;br /&gt;
# Wait for the expectation set to be satisfied or a timeout to occur&lt;br /&gt;
&lt;br /&gt;
Here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void tf_testpoint_wait(void)&lt;br /&gt;
{&lt;br /&gt;
  /* specify expected set */&lt;br /&gt;
  srTestPointExpect_t expected[]= {&lt;br /&gt;
        {&amp;quot;START&amp;quot;}, &lt;br /&gt;
        {&amp;quot;ACTIVE&amp;quot;}, &lt;br /&gt;
        {&amp;quot;IDLE&amp;quot;},&lt;br /&gt;
        {&amp;quot;END&amp;quot;}, &lt;br /&gt;
        {0}};&lt;br /&gt;
&lt;br /&gt;
  /* specify unexpected set */&lt;br /&gt;
  srTestPointUnexpect_t unexpected[]= {&lt;br /&gt;
        {&amp;quot;INVALID&amp;quot;}, &lt;br /&gt;
        {0}};&lt;br /&gt;
&lt;br /&gt;
  /* register the expectation set with the STRIDE */&lt;br /&gt;
  srWORD handle;&lt;br /&gt;
  srTestPointSetup(expected, unexpected, srTEST_POINT_EXPECT_UNORDERED, srTEST_CASE_DEFAULT, &amp;amp;handle);&lt;br /&gt;
&lt;br /&gt;
  /* start your asynchronous operation */&lt;br /&gt;
  ...&lt;br /&gt;
&lt;br /&gt;
  /* wait for expectation set to be satisfied or a timeout to occur */&lt;br /&gt;
  srTestPointWait(handle, 1000);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(“testfunc”, tf_testpoint_wait)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
=== Expectation Set ===&lt;br /&gt;
An expectation set is specified with an [[Expectations#Expected_List|expected]] array of &#039;&#039;&#039;srTestPointExpect_t&#039;&#039;&#039; structures and a second optional [[Expectations#Unexpected_List|unexpected]] array of &#039;&#039;&#039;srTestPointUnexpect_t&#039;&#039;&#039; structures. &lt;br /&gt;
&lt;br /&gt;
==== Expected Array ====&lt;br /&gt;
srTestPointExpect_t is typedef&#039;d as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    /* the label value is considered the test point&#039;s identity */&lt;br /&gt;
    const srCHAR *          label;&lt;br /&gt;
    /* optional, count specifies the number of times the test point is expected to be hit */ &lt;br /&gt;
    srDWORD                 count;&lt;br /&gt;
    /* optional, predicate function to use for payload validation against user data */ &lt;br /&gt;
    srTestPointPredicate_t  predicate;&lt;br /&gt;
    /* optional, user data to validate the payload against */&lt;br /&gt;
    void *                  user;&lt;br /&gt;
} srTestPointExpect_t;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES:&#039;&#039;&#039;&lt;br /&gt;
* The end of the array has to be marked by a srTestPointExpect_t set to all zero values&lt;br /&gt;
* The &#039;&#039;count&#039;&#039;, &#039;&#039;predicate&#039;&#039; and &#039;&#039;user&#039;&#039; members may be omitted in the array declaration (they will be automatically set to 0 by the compiler)&lt;br /&gt;
* A &#039;&#039;count&#039;&#039; value of either 0 or 1 is interpreted as 1 &lt;br /&gt;
* The &#039;&#039;count&#039;&#039; could be set as &amp;quot;0 or more&amp;quot; by using the [[Expectations#Special_Processing|special]] srTEST_POINT_ANY_COUNT symbolic constant  &lt;br /&gt;
* A &#039;&#039;predicate&#039;&#039; value 0 indicates that any associated data with a test point payload will be ignored.&lt;br /&gt;
* A &#039;&#039;user&#039;&#039; value 0 indicates that there is no user data associated with this test point&lt;br /&gt;
* The &#039;&#039;label&#039;&#039; could be specified to &#039;&#039;any test point&#039;&#039; within the current expected set of test points by using the [[Expectations#Special_Processing|special]] srTEST_POINT_ANY_IN_SET or srTEST_POINT_ANY_AT_ALL symbolic constants.&lt;br /&gt;
&lt;br /&gt;
==== Unexpected Array ====&lt;br /&gt;
srTestPointUnexpect_t is typedef&#039;d as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
typedef struct&lt;br /&gt;
{&lt;br /&gt;
    /* the label value is considered the test point&#039;s identity */&lt;br /&gt;
    const srCHAR *          label;&lt;br /&gt;
} srTestPointUnexpect_t;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES:&#039;&#039;&#039;&lt;br /&gt;
* The end of the array has to be marked by a srTestPointUnexpect_t set to all zero values&lt;br /&gt;
* The &#039;&#039;label&#039;&#039; could be specified to &#039;&#039;everything else&#039;&#039; relative to the &#039;&#039;&#039;expected&#039;&#039;&#039; array by using the [[Expectations#Special_Processing|special]] srTEST_POINT_EVERYTHING_ELSE symbolic constant. &lt;br /&gt;
&lt;br /&gt;
==== srTestPointPredicate_t ====&lt;br /&gt;
When defining the expectation set per entry a [[Expectations#State_Data_Validation|payload validation]] predicate function could be specified. The signature of it should match the following type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot; typedef srBYTE (*srTestPointPredicate_t)(const srTestPoint_t* ptTP, void* pvUser);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ptTP &lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to the currently processed Test Point.&lt;br /&gt;
|-&lt;br /&gt;
| pvUser&lt;br /&gt;
| Input &lt;br /&gt;
| Pointer to opaque user data associated with an entry in the expectation set.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srBYTE &lt;br /&gt;
| srTRUE for valid, srFALSE for invalid, srIGNORE otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE:&#039;&#039;&#039;&lt;br /&gt;
* As part of the standard STRIDE distribution there are three predefined function predicate helpers:&lt;br /&gt;
** srTestPointMemCmp - byte comparison&lt;br /&gt;
** srTestPointStrCmp - string case sensitive comparison&lt;br /&gt;
** srTestPointStrCaseCmp - string case insensitive comparison&lt;br /&gt;
&lt;br /&gt;
==== srTestPointSetup ====&lt;br /&gt;
The srTestPointSetup() routine is used to register an expectation set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
srBOOL srTestPointSetup(srTestPointExpect_t* ptExpected, &lt;br /&gt;
                        srTestPointUnexpect_t* ptUnexpected, &lt;br /&gt;
                        srBYTE yMode, &lt;br /&gt;
                        srTestCaseHandle_t tTestCase, &lt;br /&gt;
                        srWORD* pwHandle);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ptExpected&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to an expectated array.&lt;br /&gt;
|-&lt;br /&gt;
| ptUnexpected&lt;br /&gt;
| Input&lt;br /&gt;
| Pointer to an unexpectated array. This is optional and could be set srNULL.&lt;br /&gt;
|-&lt;br /&gt;
| yMode &lt;br /&gt;
| Input &lt;br /&gt;
| Bitmask that specifies whether the expectated test points occur in [[Expectations#Sequencing_Properties|order and/or strict]]. Possible values are: &amp;lt;br/&amp;gt; &lt;br /&gt;
srTEST_POINT_EXPECT_ORDERED - the test points are expected to be hit exactly in the defined order &amp;lt;br/&amp;gt;&lt;br /&gt;
srTEST_POINT_EXPECT_UNORDERED - the test points could to be hit in any order &amp;lt;br/&amp;gt;&lt;br /&gt;
srTEST_POINT_EXPECT_STRICT - the test points are expected to be hit exactly as specified (no consecutive duplicate hits)&amp;lt;br/&amp;gt;&lt;br /&gt;
srTEST_POINT_EXPECT_NONSTRICT - other test points from the universe could to be hit in between &amp;lt;br/&amp;gt;&lt;br /&gt;
srTEST_POINT_EXPECT_CONTINUE - on successful expectation satisfaction continue processing until the wait timeout expires&lt;br /&gt;
|-&lt;br /&gt;
| tTestCase  &lt;br /&gt;
| Input &lt;br /&gt;
| Handle to a test case. srTEST_CASE_DEFAULT can be used for the default test case.&lt;br /&gt;
|-&lt;br /&gt;
| pwHandle &lt;br /&gt;
| Output &lt;br /&gt;
| Handle that represents the registered expectation set&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srBOOL &lt;br /&gt;
| srTRUE on success, srFALSE otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== srTestPointWait ====&lt;br /&gt;
The srTestPointWait() routine is used to wait for the expectation to be satisfied. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
srBOOL srTestPointWait(srWORD wHandle, &lt;br /&gt;
                       srDWORD dwTimeout);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| wHandle &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a registered expectation set.&lt;br /&gt;
|-&lt;br /&gt;
| dwTimeout &lt;br /&gt;
| Input &lt;br /&gt;
| Timeout value in milliseconds; 0 means just check without waiting.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srBOOL &lt;br /&gt;
| srTRUE on success, srFALSE otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES:&#039;&#039;&#039;&lt;br /&gt;
* The test thread blocks until either the expectation set is satisfied, unless srTEST_POINT_EXPECT_CONTINUE is specified on setup, or the timeout elapses.&lt;br /&gt;
* All test points hit during the wait (both expected and unexpected) are added to the test report as testcase comments&lt;br /&gt;
* Once the wait is over (whether the expectation set has been satisfied or there has been a test failure), the current expectation set is automatically unregistered from the STRIDE runtime and the handle is released&lt;br /&gt;
* If you want to return immediately from a test case if expectation fails then make the check/wait call an argument to the &#039;&#039;srASSERT_TRUE()&#039;&#039; macro.&lt;br /&gt;
&lt;br /&gt;
==== srTestPointCheck ====&lt;br /&gt;
The srTestPointCheck() routine is used to check for the expectation post routine completion. This is useful for verifying a set of expectations events that should have already transpired (thus are waiting to be processed).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
srBOOL srTestPointCheck(srWORD wHandle);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| wHandle &lt;br /&gt;
| Input&lt;br /&gt;
| Handle to a registered expectation set.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Return Value&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| srBOOL &lt;br /&gt;
| srTRUE on success, srFALSE otherwise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTES:&#039;&#039;&#039;&lt;br /&gt;
* All test points hit before the check (both expected and unexpected) are added to the test report as testcase comments&lt;br /&gt;
* Once the check is done (whether the expectation set has been satisfied or there has been a test failure), the current expectation set is automatically unregistered from the STRIDE runtime and the handle is released&lt;br /&gt;
* If you want to return immediately from a test case if expectation fails then make the check/wait call an argument to the &#039;&#039;srASSERT_TRUE()&#039;&#039; macro. &lt;br /&gt;
&lt;br /&gt;
=== C++ Facade Class ===&lt;br /&gt;
The &#039;&#039;srtest.h&#039;&#039; file provides a simple [http://en.wikipedia.org/wiki/Facade_pattern facade] class that wraps the test point APIs described above in a simple C++ class called &#039;&#039;&#039;srTestPointsHandler&#039;&#039;&#039;. If you are writing your unit tests in C++ (using STRIDE test classes), then this class is available for your use. The class implements the following methods, which correspond exactly to the C API equivalents:&lt;br /&gt;
&lt;br /&gt;
; srTestPointsHandler : constructor. Takes four arguments which match exactly the first four parameters of the [[#srTestPointSetup|srTestPointSetup]] function.&lt;br /&gt;
; Wait : instance method that provides same functionality as [[#srTestPointWait|srTestPointWait]]. &lt;br /&gt;
; Check : instance method that provides same functionality as [[#srTestPointCheck|srTestPointCheck]].&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Expectations&amp;diff=14407</id>
		<title>Expectations</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Expectations&amp;diff=14407"/>
		<updated>2015-07-06T20:27:31Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
STRIDE supports &#039;&#039;&#039;Behavior Testing&#039;&#039;&#039;, which is different than Unit Testing or API Testing in that it does not focus on calling functions and validating return values. Behavior Testing validates the &#039;&#039;expected sequencing and state of the software&#039;&#039; executing under normal operating conditions. In order to begin this type of testing, you must &#039;&#039;&#039;(1)&#039;&#039;&#039; instrument the source under test with [[Test Point | Test Points]] and &#039;&#039;&#039;(2)&#039;&#039;&#039; define the &#039;&#039;expectations&#039;&#039; of the Test Points for each test scenario. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Validation Model&#039;&#039;&#039; is based on validating that the &#039;&#039;Expected List&#039;&#039; of Test Points have been hit as well as optionally validating any &#039;&#039;state data&#039;&#039; associated with a Test Point member. Through the use of an &#039;&#039;Unexpected  List&#039;&#039;, it&#039;s possible to simulataneously validate that specified Test Points are NOT hit during the execution of the scenario. &lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Expected List&#039;&#039; and &#039;&#039;Unexpected List&#039;&#039; declared for a specific testing scenario define the &#039;&#039;active&#039;&#039; set of Test Points for the system. All other Test Points within the software are not active and have nominal impact. &lt;br /&gt;
&lt;br /&gt;
= Expected List =&lt;br /&gt;
&lt;br /&gt;
The first step in defining &#039;&#039;&#039;Expectations&#039;&#039;&#039; is describing the set of Test Points expected to be hit during a test scenario. This is the &#039;&#039;&#039;list&#039;&#039;&#039; of Test Points and the expected number of hits (&#039;&#039;&#039;count&#039;&#039;&#039;) for each of the Test Points. Any expected &#039;&#039;&#039;state data&#039;&#039;&#039; associated with a Test Point that requires validation should be included. &lt;br /&gt;
&lt;br /&gt;
The validation of the &#039;&#039;Expected List&#039;&#039; is done when any of the following conditions are met:&lt;br /&gt;
* The &#039;&#039;Expected List&#039;&#039; sequencing has been met completely&lt;br /&gt;
* The time allocated for validation has expired&lt;br /&gt;
* State data associated with a Test Point is declared invalid&lt;br /&gt;
* An out-of-sequence Test Point has been encountered (a concrete failure is identified)&lt;br /&gt;
* An [[Expectations#Unexpected_List | Unexpected Test Point]] has been encountered&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Expected TEST POINTS list:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Label&#039;&#039;&#039; &lt;br /&gt;
| &#039;&#039;&#039;Count&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Expected State Data&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Name 1 &lt;br /&gt;
|   1&lt;br /&gt;
| &#039;&#039;&amp;lt;describe data payload validation requirements if applicable&amp;gt;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Name 2&lt;br /&gt;
| 1 +&lt;br /&gt;
| &#039;&#039;&amp;lt;describe data payload validation requirements if applicable&amp;gt;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;name ...&#039;&#039;&lt;br /&gt;
|  &#039;&#039;n&#039;&#039;&lt;br /&gt;
| &#039;&#039;&amp;lt;...&amp;gt;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Sequencing Properties ===&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Expected List&#039;&#039; requires defining &#039;&#039;sequencing properties&#039;&#039; used for the validation. This involves establishing how to process the &#039;&#039;&#039;ordering&#039;&#039;&#039; of the Test Points being hit, how &#039;&#039;&#039;strict&#039;&#039;&#039; to handle duplications of Test Point members, and if to &#039;&#039;&#039;continue&#039;&#039;&#039; capturing Test Points for the entire time allocated for the test scenario even though the &#039;&#039;Expected List&#039;&#039; sequencing requirements have been met.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Expected TEST POINTS sequencing properties:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;Properties&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039; Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Ordered&#039;&#039; &lt;br /&gt;
| Test Points are expected to be hit in the exact order defined in the list&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Unordered&#039;&#039; &lt;br /&gt;
| Test Points can be hit in any order defined in the list &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Strict&#039;&#039;&lt;br /&gt;
| Test Points specified in the list must match the exact count (i.e. no duplication)&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Non-Strict&#039;&#039;&lt;br /&gt;
| Test Points specified in the list can be duplicated anywhere in the sequence &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;Continue&#039;&#039;&lt;br /&gt;
| Test Points validation will continue even though the &#039;&#039;Expected List&#039;&#039; has been met &#039;&#039;so far&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== State Data Validation ===&lt;br /&gt;
&lt;br /&gt;
State data validation for a Test Point member is optional. The &#039;&#039;Expected List&#039;&#039; can associate a &#039;&#039;predicate&#039;&#039;&amp;lt;ref name=&amp;quot;predicate&amp;quot;&amp;gt;Defined as a necessary condition of the Test Point being valid -- logic within the predicate determines if &#039;&#039;valid&#039;&#039;, &#039;&#039;invalid&#039;&#039;, or &#039;&#039;ignored&#039;&#039; &amp;lt;/ref&amp;gt; as a necessary condition for validation of a Test Point member when being processed. The predicate provides an extra level of validation (beyond sequencing) focusing on the state data associated with the Test Point. &lt;br /&gt;
&lt;br /&gt;
The predicate can declare the Test Point:&lt;br /&gt;
* Valid - successful, thus the expected count is decremented&lt;br /&gt;
* Invalid - the expectations is NOT met, indicating failure&lt;br /&gt;
* Ignored - no affect on the validation, continue to wait on the current Test Point&lt;br /&gt;
&lt;br /&gt;
= Unexpected List =&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;Unexpected List&#039;&#039; of Test Points can optionally be defined. This list works in conjunction with the [[Expectations#Expected_List | &#039;&#039;Expected List&#039;&#039;]]. The list defines a set of Test Points that are to be treated as failures if any one of them is encountered (hit) during a testing scenario.&lt;br /&gt;
&lt;br /&gt;
This list can be made up of the &#039;&#039; &#039;&#039;&#039;complement&#039;&#039;&#039; &#039;&#039; of the &#039;&#039;Expected List&#039;&#039;, thus including &#039;&#039;all&#039;&#039; Test Points not included in that defined set. This type of setting requires enabling all Test Points defined in the software during the execution of the test.&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;Unexpected List&#039;&#039; members intersect with the &#039;&#039;Expected List&#039;&#039; members, that is considered an input error.&lt;br /&gt;
&lt;br /&gt;
= Special Processing =&lt;br /&gt;
&lt;br /&gt;
=== Members ===&lt;br /&gt;
There are two &#039;&#039;special members&#039;&#039; that can be used for the &#039;&#039;Expected List&#039;&#039; called &#039;&#039;&#039;ANY IN SET&#039;&#039;&#039; and &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039;. These special member values are used to customize the success criteria (i.e. trigger condition) for the entry defined within the &#039;&#039;Expected List&#039;&#039;. Both types require a predicate&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; to determine if the Test Point is &#039;&#039;valid, invalid, or ignored&#039;&#039;. The &#039;&#039;&#039;ANY IN SET&#039;&#039;&#039; refers to the set of points defined by the &#039;&#039;Expected List&#039;&#039; while the &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039; refers to all Test Points in the system. By definition the &#039;&#039;&#039;ANY AT ALL&#039;&#039;&#039; member requires enabling all Test Points defined in the software during the execution of the test. &lt;br /&gt;
&lt;br /&gt;
Concerning an &#039;&#039;&#039;Unordered&#039;&#039;&#039; &#039;&#039;Expected List&#039;&#039;, only one special member can be used. It will be processed first independent of its location within the list. The &#039;&#039;&#039;Count&#039;&#039;&#039; attribute is also optionally available to be used with the special members, indicating the number of valid returns from the predicate until the next Test Point in the list is validated. &lt;br /&gt;
&lt;br /&gt;
There is one &#039;&#039;special member&#039;&#039; that can be used for the &#039;&#039;Unexpected List&#039;&#039; called &#039;&#039;&#039;EVERYTHING ELSE&#039;&#039;&#039;. This special member can only be used as a &#039;&#039;&#039;single member only&#039;&#039;&#039; within an &#039;&#039;Unexpected List&#039;&#039;. It takes the &#039;&#039;complement&#039;&#039; of the set of Test Points defined within the &#039;&#039;Expected List&#039;&#039;. This requires enabling all Test Points defined in the software during the execution of the test. Also, by definition any non-expected Test Point hit during the test would be deemed a failure.&lt;br /&gt;
&lt;br /&gt;
=== Counts ===&lt;br /&gt;
There is one &#039;&#039;special count&#039;&#039; value that can be associated with a Test Point defined in the &#039;&#039;Expected List&#039;&#039; called &#039;&#039;&#039;ANY COUNT&#039;&#039;&#039;. This special count is used to focus on capturing a variable number of Test Point hits -- 0 or more. In essences the Test Point has no consequences of the Expected List sequencing, except if a predicate&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; associated with the Test Point returns &#039;&#039;invalid&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Use Cases =&lt;br /&gt;
&lt;br /&gt;
The following use cases provide examples of defining &#039;&#039;&#039;Expectations&#039;&#039;&#039; based on different testing scenarios.&lt;br /&gt;
&lt;br /&gt;
=== Sequencing Properties ===&lt;br /&gt;
Use case examples for validating the [[Expectations#Sequencing_Properties | sequencing]] of Test Points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,D,C]   - FAIL (D hit before C)&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered of Test Points but with duplicates &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,C,D] - FAIL (B duplicated with strict defined)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,C,D] - PASS&lt;br /&gt;
  Hits   = [A,C,B,C,D] - PASS&lt;br /&gt;
  Hits   = [A,B,C,B,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points to be hit, but the order does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,D]   - PASS&lt;br /&gt;
  Hits   = [B,A,C,B,D] - FAIL (B hit twice)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,B,D] - PASS &lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points to be hit, but order and duplications does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,C,B,D] - PASS&lt;br /&gt;
  Hits   = [B,A,A,A,D] - FAIL (C never hit)&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit, but checking for any &#039;&#039;extra&#039;&#039; hits for total duration of test scenario&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;, &#039;&#039;CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,C,D,A] - FAIL (A hit after valid sequence met based on test timeout)&lt;br /&gt;
&lt;br /&gt;
=== Count Attribute ===&lt;br /&gt;
Use case examples that leverage the [[Expectations#Count | Count]] attribute associated with a list member.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting a sequence of Test Points, including multiple hits for 2 members&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D:2]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B,C,D,D]   - PASS&lt;br /&gt;
  Hits   = [A,B,B,C,B,D,D]   - FAIL (B not hit three times before C)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D:2]; &#039;&#039;ORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B,C,B,D,D]  - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting a set of Test Points being hit, including multiple hits (with duplications), but order does not matter&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,B,C,B,D]     - PASS&lt;br /&gt;
  Hits   = [B,A,B,B,C,B,D]   - FAIL (B duplicated on 4th hit)&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3,C,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,A,B,B,C,B,D]   - PASS&lt;br /&gt;
&lt;br /&gt;
=== State Data Validation ===&lt;br /&gt;
Use case examples leveraging predicates&amp;lt;ref name=&amp;quot;predicate&amp;quot;/&amp;gt; to [[Expectations#State_Data_Validation | validate state data]].&lt;br /&gt;
&lt;br /&gt;
Simple example showing associating a predicate with Test Point named &#039;&#039;A&#039;&#039;.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:p1(tp),B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) { return VALID }&lt;br /&gt;
  Hits   = [A,B,C,D]   - PASS&lt;br /&gt;
&lt;br /&gt;
Expecting Test Point &#039;&#039;B&#039;&#039; to be hit 3 times&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:3:p1(tp),C,D]; &#039;&#039;UNORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) { return VALID unless 3rd time called than return INVALID}&lt;br /&gt;
  Hits   = [B,A,B,C,B,D]     - FAIL (predicate returns invalid on 3rd B hit)&lt;br /&gt;
&lt;br /&gt;
=== Special Members ===&lt;br /&gt;
Use case examples using the two [[Expectations#Members | special members]] within an &#039;&#039;Expected List&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Waiting on a single trigger (D) to start the processing of an Expected List&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,C:2,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit otherwise IGNORE}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,B,C,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Waiting on Test Point &#039;&#039;outside&#039;&#039; of the Expected List to trigger processing&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp),A,B,C:2,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when x hit}&lt;br /&gt;
  Hits   = [A,B,A,x*,A,B,C,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
Waiting on a multiple triggers - 1st trigger used to start processing and 2nd used midstream&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,ANY_IN_SET:p2(tp),C:2,D,E]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit}&lt;br /&gt;
  p2(tp) {return VALID when E hit}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,B,A,A,B,E*,C,C,D,E] - PASS&lt;br /&gt;
&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_IN_SET:p1(tp),A,B,C:2,D]; &#039;&#039;UNORDERED, NON-STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID when D hit}&lt;br /&gt;
  Hits   = [A,B,A,D*,A,A,A,D,A,C,B,C,D] - PASS&lt;br /&gt;
&lt;br /&gt;
This test uses the ANY AT ALL along with a fix count of 3&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):3,A,B,C]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  Hits   = [A,z,x,A,B,C]   - PASS&lt;br /&gt;
&lt;br /&gt;
=== Special Counts ===&lt;br /&gt;
Use case examples leveraging the [[Expectations#Special_Counts | special count attributes]] within an &#039;&#039;Expected List&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting between 0 and more Test Point As to be hit before processing the remaining members. &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:ANY_COUNT,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [B,C,D]     - PASS&lt;br /&gt;
  Hits   = [A,A,B,C,D]   - PASS&lt;br /&gt;
 &lt;br /&gt;
This test passes &#039;&#039;immediately&#039;&#039; after the A is hit (example of a weird expectation)&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:ANY_COUNT]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  Hits   = [A,..]      - PASS&lt;br /&gt;
&lt;br /&gt;
This test also passes, but will process all Test Point B hits until the test time expires&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A,B:ANY_COUNT]; &#039;&#039;ORDERED, STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,B,B,B]    - PASS (the wait timeout will complete the validation)&lt;br /&gt;
  Hits   = [A]          - PASS&lt;br /&gt;
&lt;br /&gt;
This test fails because all Test Points are checked once the test time expires&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A]; &#039;&#039;ORDERED, STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  Hits   = [A,A]      - FAILS (the wait timeout than will complete the validation)&lt;br /&gt;
&lt;br /&gt;
This test validates a set of Test Points focusing exclusively on the associated &#039;&#039;state data&#039;&#039;&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [A:p1(tp):ANY_COUNT, B:p2(tp):ANY_COUNT, C:p2(tp):ANY_COUNT]; &#039;&#039;UNORDERED, CONTINUE&#039;&#039; (STRICT NA)&lt;br /&gt;
  Hits   = [A,A,B,A,C,C,C,A,..] - PASS (unless any of the predicates fails)&lt;br /&gt;
  Hits   = [A,B,C,D]            - PASS&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous ===&lt;br /&gt;
The following are miscellaneous use cases.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Expecting an exact ordered sequence of Test Points to be hit, but verifying certain Test Points are NOT hit&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = [A,B,C,D]; &#039;&#039;ORDERED, STRICT&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [x,y]&lt;br /&gt;
  Hits     = [A,B,C,D]    - PASS&lt;br /&gt;
  Hits     = [A,B,B,C,D]  - FAIL&lt;br /&gt;
  Hits     = [A,B,C,y,..] - FAIL&lt;br /&gt;
&lt;br /&gt;
This test will always pass and log every Test Point hit during test time duration. Note all Test Points are active.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):ANY_COUNT]; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  Hits   = [A,A,B,x,y,D, ..]   - PASS (the wait timeout will complete the validation)&lt;br /&gt;
&lt;br /&gt;
This test will log every Test Point hit during test, looking for X and Y as failures. Note all Test Points are active.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039; = [ANY_AT_ALL:p1(tp):ANY_COUNT]; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  p1(tp) {return VALID}&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [X,Y]&lt;br /&gt;
  Hits   = [A,A,B,x,y,D,Y]   - FAIL (last Test Point hit causes a failure)&lt;br /&gt;
&lt;br /&gt;
This test will fail on any Test Point that is hit. Note all Test Points are active. Test will last based on time duration or the 1st Test Point hit.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = NULL; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [EVERYTHING_ELSE]&lt;br /&gt;
  Hits   = [A,..]   - FAIL &lt;br /&gt;
&lt;br /&gt;
This test will ignore any Test Point hit during test, looking for X and Y as failures. &lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = NULL; &#039;&#039;CONTINUE {other sequencing properties NA}&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [X,Y]&lt;br /&gt;
  Hits   = [..,X,..]   - FAIL&lt;br /&gt;
&lt;br /&gt;
This test will fail on any Test Points hit except for A &amp;amp; B. Note all Test Points are active. Test will last until failure or timeout.&lt;br /&gt;
  &#039;&#039;Expect&#039;&#039;   = [A,B]; &#039;&#039;UNORDERED, NON-STRICT, CONTINUE&#039;&#039;&lt;br /&gt;
  &#039;&#039;Unexpect&#039;&#039; = [EVERYTHING_ELSE]&lt;br /&gt;
  Hits   = [..,A,..,X]   - FAIL&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14406</id>
		<title>Test Point</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14406"/>
		<updated>2015-07-06T20:23:07Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Write the Test Unit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Source instrumentation is the process by which developers and domain experts selectively instrument the source under test for the purpose of writing test scenarios against the executing application. Implementing tests that leverage source instrumentation is called &#039;&#039;&#039;Expectation Testing&#039;&#039;&#039;. This validation technique is very useful for verifying proper code sequencing based on the software&#039;s internal design. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
/* a test point with no payload */&lt;br /&gt;
srTEST_POINT(&amp;quot;first test point&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with binary payload */&lt;br /&gt;
srTEST_POINT_DATA(&amp;quot;second test point&amp;quot;, myData, sizeofMyData);&lt;br /&gt;
&lt;br /&gt;
/* a test point with simple string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with simple string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with format string %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;c++ test point&amp;quot;, &amp;quot;&amp;quot;) &amp;lt;&amp;lt; &amp;quot;stream input supported under c++&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike traditional unit testing that drives testing based on input parameters and isolating functionality, &#039;&#039;Expectation&#039;&#039; testing is executed within a fully functional software build running on a real target platform. Test Points are not dependent on input parameters, but often leverage the same types of input/output controls used by functional and black-box testing. &lt;br /&gt;
&lt;br /&gt;
Another unique feature of this type of testing is that domain expertise is not required to implement a test. Developers and domain experts use instrumentation to export design knowledge of the software to the entire team. Furthermore, there is no stubbing required, no special logic to generate input parameters, and no advanced knowledge required of how the application software is coded. &lt;br /&gt;
&lt;br /&gt;
To enable effective test coverage, developers and domain experts are required to insert instrumentation at key locations to gain insight and testability. Here are some general suggested source code areas to consider instrumenting:&lt;br /&gt;
* critical function entry/exit points&lt;br /&gt;
* state transitions&lt;br /&gt;
* critical or interesting data transitions (using optional payload to convey data values)&lt;br /&gt;
* callback routines&lt;br /&gt;
* data persistence&lt;br /&gt;
* error conditions&lt;br /&gt;
&lt;br /&gt;
The steps required to implement an Expectation test are the following:&lt;br /&gt;
#[[#Instrumentation | Instrumentation]]&lt;br /&gt;
#[[#Define your Expectations | Define your Expectations]]&lt;br /&gt;
#[[#Write the Test Unit | Write the Test Unit]]&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
To make the software &#039;&#039;testable&#039;&#039;, the first step in the process is for the experts to selectively insert instrumentation macros into the source code. Test Points themselves have nominal impact on the performance of the application – they are only active during test data collection&amp;lt;ref name=&amp;quot;n1&amp;quot;&amp;gt; Test data collection is typically implemented in a low priority background thread. The data is captured in the calling routine&#039;s thread context (no context switch) but processed in the background or on the host. Instrumentation macros return immediately to the caller (i.e. no-op) when testing is not active.&amp;lt;/ref&amp;gt;. Test Points contain names and optional payload data. When Test Points are activated, they are collected in the background, along with timing and any associated data. The set of Test Points hit, their order, timing, and data content can all be used to validate that the software is behaving as expected. [[Test_Log | Test Logs]] can also be added to the source code to provide additional information in the context of an executing test. &lt;br /&gt;
&lt;br /&gt;
To specify a test point you should include the &#039;&#039;&#039;srtest.h&#039;&#039;&#039; header file from the STRIDE Runtime in your compilation unit. The Test Point macros are active only when &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, therefore it is practical to place these macros in-line in production source. When &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is not &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, these macros evaluate to nothing.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Test Point Macros&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_DATA&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;data&#039;&#039;, &#039;&#039;size&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;data&#039;&#039; is a pointer to a byte sequence&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;size&#039;&#039; is the size of the &#039;&#039;data&#039;&#039; in bytes&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_STR&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;message&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&amp;lt;br/&amp;gt;&lt;br /&gt;
When used in the context of a c++ compilation unit, this macro also supports the streaming operator to append to the message string (see example below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Define your Expectations ==&lt;br /&gt;
&lt;br /&gt;
In addition to instrumenting the source code with Test Points, you must also define the [[Expectations]] of the Test Points. This involves defining the list of Test Points expected to be hit during a given test scenario. Expectation can also include any &#039;&#039;&#039;data&#039;&#039;&#039; associated with a Test Point that requires validation.&lt;br /&gt;
&lt;br /&gt;
== Write the Test Unit ==&lt;br /&gt;
Once the source under test has been instrumented and the [[Expectations]] defined, Stride offers a number of techniques that can be used for implementing &#039;&#039;&#039;expectation tests&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* Tests can be written in [[Expectation_Tests_in_C/C%2B%2B | C or C++]] and executed on the device under test using the Stride framework. &lt;br /&gt;
* Tests can be written in [[Perl_Script_APIs | Perl]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Name_Mangling&amp;diff=14404</id>
		<title>Name Mangling</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Name_Mangling&amp;diff=14404"/>
		<updated>2015-07-06T20:12:15Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What is Name Mangling?  ==&lt;br /&gt;
&lt;br /&gt;
Name mangling describes the automatic source transformation required for an interceptor to insert itself between caller and callee. There are two options for handling name mangling, one of which must be chosen when using interceptors:&lt;br /&gt;
&lt;br /&gt;
*A call to a function f() is transformed to &amp;quot;__im_f()” to allow interception the call. This is referred to as &#039;&#039;&#039;reference mangling&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
*The implemention of f() can be transformed to &amp;quot;__im_f()”. This is referred to as &#039;&#039;&#039;definition mangling&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For example, to use a interceptor to trace all calls to a function, f():&lt;br /&gt;
&lt;br /&gt;
*If we use &#039;&#039;&#039;reference mangling&#039;&#039;&#039;, all calls to f() are transformed to be calls to __im_f(). The interceptor is implemented as __im_f(). The original implementation of f() remains unchanged. This allows interception of all calls and takes the appropriate action.&lt;br /&gt;
&lt;br /&gt;
*If we use &#039;&#039;&#039;definition mangling&#039;&#039;&#039;, the implementation of f() is changed from f(){...} to __im_f(){...}. The interceptor is implemented as f() in order to intercept all calls.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The name mangling is either done &#039;&#039;&#039;implicitly&#039;&#039;&#039; or &#039;&#039;&#039;explicitly&#039;&#039;&#039; during the compile process. By default, &#039;&#039;&#039;implicit&#039;&#039;&#039; mangling is used; this means that selected routines will be mangled by using a chosen [[Intercept_Module#Group_ID|Group ID]] and including the Intercept Module header file. Where &#039;&#039;&#039;explicit&#039;&#039;&#039; mangling requires the additional step of adding a macro.&lt;br /&gt;
&lt;br /&gt;
== Name Mangling Conflicts  ==&lt;br /&gt;
&lt;br /&gt;
A mangling conflict applies only to interceptors. It exists when the name of a routine requires mangling, but there also exists other references to the same name within the same source file. The other references will inadvertently be mangled by the preprocessor. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;Explicit_Mangling&amp;quot;&amp;gt;&#039;&#039;&#039;Explicit mangling&#039;&#039;&#039;&amp;lt;/span&amp;gt; is used to resolve these type of name mangling conflicts. Explicit mangling uses the explicit macro &amp;quot;&#039;&#039;&#039;srTEST_INTERCEPT(&#039;&#039;&#039;&amp;amp;lt;function_name&amp;amp;gt;&#039;&#039;&#039;)&#039;&#039;&#039;&amp;quot;, which explicitly mangles the name of &amp;quot;f()&amp;quot; to &amp;quot;__im_f()&amp;quot;. The explicit macro is defined in the Intercept Module name mangling header file (xxxIM.h). Explicit mangling requires [[Intercept Module#Group ID|Group ID(s)]] to be defined (#define MyGroupID) in the source file of the caller/callee of the routine to protect against the inclusion of unnecessary defined types. &lt;br /&gt;
&lt;br /&gt;
The following examples demonstrate situations where explicit mangling can be used to resolve mangling conflicts: &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;The reference and the definition of the same routine, f(), exist in the same source file&#039;&#039; ====&lt;br /&gt;
&lt;br /&gt;
If the reference and the definition of the same routine, f(), exist in the same source file, the use of explicit mangling is required to resolve the mangling conflict. If the conflict is not resolved, the user will bypass the interceptor by using the mangled name when making the call to the routine. &lt;br /&gt;
&lt;br /&gt;
==== &#039;&#039;Two (or more) references of a routine, f(), exist in the same source file, but only one is a reference interceptor&#039;&#039; ====&lt;br /&gt;
&lt;br /&gt;
By default, interceptors are definition-focused. An referenced-focused interceptor is used to mangle the actual routine; thus, every caller of the routine goes through the interceptor. There are use cases when source code for the routines cannot be accessed (i.e., as with libraries). A referenced-focused interceptor can be used to mangle the caller instead of the routine to be called (callee). Reference-focused interceptors typically do not have mangling conflicts, except when multiple callers exist in the same source file, but only a subset is targeted to go through the interceptor. Explicit mangling is used to avoid this type of mangling conflict. &lt;br /&gt;
&lt;br /&gt;
The Group ID(s) must be defined before including the Intercept Module name mangling header file (xxxIM.h) and after all defined types (additional header files) in the source file(s) of the caller/callee of the routine.&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;quot;MyHeader.h&amp;quot;&lt;br /&gt;
#define MyGroupID&lt;br /&gt;
#include &amp;quot;xxxIM.h&amp;quot; &lt;br /&gt;
&amp;lt;/source&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To enable Intercept Modules to be regenerated continuously and to allow the user the option to add and/or remove interceptors, an [[#Explicit_Mangling|explicit macro]] is generated for each routine. If a routine is not selected as an interceptor, an explicit macro will be generated so that name mangling will not occur. Also, if use of the Intercept Module is turned off via the source file (e.g., &amp;lt;tt&amp;gt;#undef STRIDE_ENABLED&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;#define STRIDE_ENABLED 0&amp;lt;/tt&amp;gt;), the macros will not perform name mangling. This allows users to leave explicit macros in their source code, even if the Intercept Module is not being used.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Scl_function&amp;diff=14403</id>
		<title>Scl function</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Scl_function&amp;diff=14403"/>
		<updated>2015-07-06T20:09:44Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The &#039;&#039;SCL function&#039;&#039; pragma allows capturing a global function for doubling or remoting. During the build process the [[Build Tools | Stride Build Tools]] generates [[Intercept Module]] that provides the correct logic for the test.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
int foo(int x); &lt;br /&gt;
&lt;br /&gt;
void boo(void);&lt;br /&gt;
&lt;br /&gt;
#pragma scl_function(foo)&lt;br /&gt;
#pragma scl_function(boo, &amp;quot;DEFINITION&amp;quot;, &amp;quot;IMPLICIT&amp;quot;, &amp;quot;TEST_GROUP&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
The &#039;&#039;scl_function&#039;&#039; pragma allows the user to capture a function. When captured for the purpose of interception (&#039;&#039;&#039;intercept-able&#039;&#039;&#039;) the optional arguments are used to specify how the intercept should be executed. The [[s2sinstrument|Instrument Build Tool]] will use those options to generate appropriate function interception code.&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_function(function-name [,context, name-mangling, group-id])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;function-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of the function to capture.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;context&#039;&#039;&lt;br /&gt;
| String&lt;br /&gt;
| Optional. Context in which the function is going to be intercepted. Possible values are &#039;&#039;&amp;quot;REFERENCE&amp;quot;&#039;&#039; - intercept at the function call (i.e. where the function is called) or &#039;&#039;&amp;quot;DEFINITION&amp;quot;&#039;&#039; - intercept at the function definition (i.e. where the function is implemented).&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;name-mangling&#039;&#039;&lt;br /&gt;
| String&lt;br /&gt;
| Optional. Type of [[Name_Mangling|name mangling]] to be used when intercepted. Possible values are &#039;&#039;&amp;quot;EXPLICIT&amp;quot;&#039;&#039; or &#039;&#039;&amp;quot;IMPLICIT&amp;quot;&#039;&#039;. If the &#039;&#039;context&#039;&#039; argument is defined the default will be &#039;&#039;&#039;IMPLICIT&#039;&#039;&#039;. Note that if &#039;&#039;&#039;EXPLICIT&#039;&#039;&#039; is set the &#039;&#039;&#039;srTEST_INTERCEPT(&amp;lt;function_name&amp;gt;)&amp;quot;&#039;&#039;&#039; macro is required. &lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;group-id&#039;&#039;&lt;br /&gt;
| String&lt;br /&gt;
| Optional. User defined identifier representing the group to which this function belongs when enabling interception. The default &#039;&#039;group-id&#039;&#039; is set to &#039;&#039;&#039;STRIDE_TEST_GROUP&#039;&#039;&#039;. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The function must be declared as a designator with external linkage. &lt;br /&gt;
* A compilation error is reported if an attempt is made to capture a function more than once.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
Using the defaults for &#039;&#039;IMPLICIT&#039;&#039; and &#039;&#039;STRIDE_TEST_GROUP&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
void boo(void);&lt;br /&gt;
&lt;br /&gt;
#pragma scl_function(boo, &amp;quot;DEFINITION&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Setting a specific &#039;&#039;GROUP ID&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
void boo(void);&lt;br /&gt;
&lt;br /&gt;
#pragma scl_function(boo, &amp;quot;DEFINITION&amp;quot;, &#039;&#039;IMPLICIT&#039;&#039;, &#039;&#039;MY_TEST_GROUP&#039;&#039;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Using_Test_Doubles&amp;diff=14402</id>
		<title>Using Test Doubles</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Using_Test_Doubles&amp;diff=14402"/>
		<updated>2015-07-06T20:08:38Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Creating Double Intercepts in the IM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The &#039;&#039;Test Double&#039;&#039; feature provides a means for intercepting C/C++ language &#039;&#039;&#039;global functions&#039;&#039;&#039; on the target, and directing the call to a substitute function with identical parameters and return value. The use case is a unit test where the function under test uses a function during its execution, and this dependency is simulated by a substitute or double function during testing. The unit test is able to control the substitution of the dependency during run time, and thereby verify the behavior of the function under test.&lt;br /&gt;
The following sample illustrates the relationship of the function under test and a dependency:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.h&lt;br /&gt;
int depend(int x);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.c&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
int depend(int x)&lt;br /&gt;
{&lt;br /&gt;
    return x + x;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// test.h&lt;br /&gt;
int test(int x, int y);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// test.c&lt;br /&gt;
#include &amp;quot;test.h&amp;quot;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
int test(int x, int y)&lt;br /&gt;
{&lt;br /&gt;
    return depend(x) * y;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above sample, &#039;&#039;test()&#039;&#039; is the function under test and &#039;&#039;depend()&#039;&#039; is a dependency candidate for doubling.&lt;br /&gt;
&lt;br /&gt;
The steps required to achieve doubling of a dependency function are as follows:&lt;br /&gt;
#[[#Configuring the Double Using Function Pragma | Configuring the Double Using Function Pragma]] &lt;br /&gt;
#[[#Creating_Double_Intercepts_in_the_IM|Create Double Intercepts in the IM]]&lt;br /&gt;
#[[#Switching_the_Double_Function_During_Runtime|Switch Double Function During Runtime]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuring the Double Using Function Pragma==&lt;br /&gt;
&lt;br /&gt;
The syntax of the [[Scl_function|function pragma]] supports a set of &#039;&#039;&#039;&#039;&#039;optional&#039;&#039;&#039;&#039;&#039; attributes that allow the specification of function interception parameters. When captured for the purpose of interception (&#039;&#039;&#039;intercept-able&#039;&#039;&#039;) the optional arguments are &#039;&#039;&#039;required&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_function(function-name [,context, name-mangling, group-id])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Refer to the actual [[Scl_function | function pragma]] definition for an explanation of &lt;br /&gt;
* &#039;&#039;&#039;context&#039;&#039;&#039; - set to &#039;&#039;DEFINITION&#039;&#039; or &#039;&#039;REFERENCE&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;name-mangling&#039;&#039;&#039; - set to &#039;&#039;EXPLICIT&#039;&#039; or &#039;&#039;IMPLICIT&#039;&#039;. Note if set to explicit requires usage of the &#039;&#039;srTEST_INTERCEPT&#039;&#039; macro&lt;br /&gt;
* &#039;&#039;&#039;group-id&#039;&#039;&#039; - user defined to enable or disable interception&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the above sample, &#039;&#039;depend()&#039;&#039; needs to be captured via the pragma and enabled for interception in the following manner.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend_scl.h&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#pragma scl_function(depend, &amp;quot;DEFINITION&amp;quot;, &amp;quot;IMPLICIT&amp;quot;, &amp;quot;TEST_GROUP&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Creating Double Intercepts in the IM==&lt;br /&gt;
If a function has been configured as a double candidate using the function pragma as outlined in the above step, the [[Build_Tools|Stride Build Tools]] will automatically create the [[Intercept Module]], aka IM, that contains the intercept for the double function. This all happens automatically during the build process. &lt;br /&gt;
&lt;br /&gt;
But to enable the interception the source file containing the &amp;lt;tt&amp;gt;depend()&amp;lt;/tt&amp;gt; implementation &#039;&#039;&#039;must be altered&#039;&#039;&#039; to [[Name_Mangling|mangle the function&#039;s name]] by defining the Group ID and including the generated Intercept Module header file (xxxIM.h):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// depend.c&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
/* define the Group ID before including the IM header */&lt;br /&gt;
#define TEST_GROUP&lt;br /&gt;
#include &amp;quot;strideIM.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
int depend(int x)&lt;br /&gt;
{&lt;br /&gt;
    return x + x;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Switching the Double Function During Runtime==&lt;br /&gt;
In the context of the test unit code the following STRIDE runtime macros, defined in the STRIDE runtime header file &#039;&#039;&#039;srtest.h&#039;&#039;&#039;, could be used for substituting a stub function for a double candidate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
srDOUBLE_SET(fn, fnDbl)&lt;br /&gt;
srDOUBLE_RESET(fn)&lt;br /&gt;
&lt;br /&gt;
srDOUBLE_GET(fn, pfnDbl) // used for more advanced scenarios &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
*&#039;&#039;&#039;fn&#039;&#039;&#039; is the function qualified by &amp;lt;tt&amp;gt;scl_function&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;scl_func&amp;lt;/tt&amp;gt; as a dependency candidate, as above.&lt;br /&gt;
*&#039;&#039;&#039;pfnDbl&#039;&#039;&#039; is a pointer to a object of type &amp;lt;tt&amp;gt;srFunctionDouble_t&amp;lt;/tt&amp;gt;, declared to hold the current value of the active double function.&lt;br /&gt;
*&#039;&#039;&#039;fnDbl&#039;&#039;&#039; is a function that is to be the current active double. &#039;&#039;The function passed in should &#039;&#039;&#039;always&#039;&#039;&#039; match the signature of the dependency candidate specified by &#039;&#039;&#039;fn&#039;&#039;&#039;.&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; the initial value of the current active double is always the dependency candidate function.&lt;br /&gt;
&lt;br /&gt;
=== Example 1 ===&lt;br /&gt;
The following example shows how to double a routine for the lifetime of a C++ Test Unit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; int depend_dbl(int a) { return a * a; }&lt;br /&gt;
&lt;br /&gt;
class Test: public stride::srTest&lt;br /&gt;
{ &lt;br /&gt;
public:&lt;br /&gt;
&lt;br /&gt;
    Test()&lt;br /&gt;
    {&lt;br /&gt;
        srDOUBLE_SET(depend, depend_dbl);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ~Test()&lt;br /&gt;
    {&lt;br /&gt;
        srDOUBLE_RESET(depend);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    int test1(void) { return test(1, 2); }&lt;br /&gt;
    int test2(void) { return test(5, 6); }&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(Test)&lt;br /&gt;
#pragma scl_function(depend, &amp;quot;DEFINITION&amp;quot;, &amp;quot;IMPLICIT&amp;quot;, &amp;quot;TEST_GROUP&amp;quot;)&lt;br /&gt;
#endif &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example 2 ===&lt;br /&gt;
The following example shows how to make a call to the original routine in the context of a double by safely handling any nested doubling:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
#include &amp;quot;depend.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
extern &amp;quot;C&amp;quot; int depend_dbl(int a) &lt;br /&gt;
{&lt;br /&gt;
    int ret;&lt;br /&gt;
&lt;br /&gt;
    srFunctionDouble_t fn;&lt;br /&gt;
    srDOUBLE_GET(depend, &amp;amp;fn);&lt;br /&gt;
    srDOUBLE_RESET(depend);&lt;br /&gt;
    ret = depend(a);&lt;br /&gt;
    srDOUBLE_SET(depend, fn);&lt;br /&gt;
    &lt;br /&gt;
    return ret; &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Macros&amp;diff=14401</id>
		<title>Test Macros</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Macros&amp;diff=14401"/>
		<updated>2015-07-06T19:53:27Z</updated>

		<summary type="html">&lt;p&gt;Marku: /* Guidelines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The Stride implementation of [http://en.wikipedia.org/wiki/Assertion_(software_development) assertions] are provided with a set of Test Macros (declared in srtest.h) available for use within test methods. The macros are optional - you are not required to use them in your &#039;&#039;&#039;Test Units&#039;&#039;&#039;. They provide shortcuts for testing assertions and automatic report annotation in the case of failures.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example Test Macros&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;mytest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void MyTest::CheckFoo() {&lt;br /&gt;
    ..  &lt;br /&gt;
    srEXPECT_EQ(foo(2 + 2), 4); &lt;br /&gt;
}&lt;br /&gt;
void MyTest::CheckBoo() {&lt;br /&gt;
    ..&lt;br /&gt;
    srEXPECT_GT(boo(3 * 3), 7); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
There are three types of macros: &#039;&#039;&#039;EXPECT&#039;&#039;&#039;, &#039;&#039;&#039;ASSERT&#039;&#039;&#039;, and &#039;&#039;&#039;EXIT&#039;&#039;&#039; macros. They have slight but important differences in their behavior.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;srEXPECT_&#039;&#039;xx&#039;&#039;(&#039;&#039;&#039;&#039;&#039;condition&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039; &lt;br /&gt;
* If the condition &amp;lt;u&amp;gt;does&amp;lt;/u&amp;gt; match the expectation, this macro:&lt;br /&gt;
** sets the current test case status to PASS&lt;br /&gt;
* If the condition &amp;lt;u&amp;gt;does not&amp;lt;/u&amp;gt; match the expectation, this macro:&lt;br /&gt;
** sets the current test case status to FAIL&lt;br /&gt;
** adds a comment to the current test case&#039;s results report which includes the condition as well as file and line number&lt;br /&gt;
** does not alter code execution  &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;srASSERT_&#039;&#039;xx&#039;&#039;(&#039;&#039;&#039;&#039;&#039;condition&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039; &lt;br /&gt;
* If the condition &amp;lt;u&amp;gt;does&amp;lt;/u&amp;gt; match the assertion, this macro:&lt;br /&gt;
** sets the current test case status to PASS&lt;br /&gt;
* If the condition &amp;lt;u&amp;gt;does not&amp;lt;/u&amp;gt; match the expectation, this macro:&lt;br /&gt;
** sets the current test case status to FAIL &lt;br /&gt;
** adds a comment to the current test case&#039;s results report which includes the condition as well as file and line number&lt;br /&gt;
** &amp;lt;u&amp;gt;immediately returns&amp;lt;/u&amp;gt; from the current test function. The return specifies no value, therefore a function or method that uses &amp;lt;tt&amp;gt;srASSERT_xx&amp;lt;/tt&amp;gt; &amp;lt;u&amp;gt;should be declared to return &amp;lt;tt&amp;gt;void&amp;lt;/tt&amp;gt;&amp;lt;/u&amp;gt;. &amp;lt;i&amp;gt;In case when a test function is required to return other type then &amp;lt;tt&amp;gt;void&amp;lt;/tt&amp;gt;, a simple trick could be applied - in &amp;lt;b&amp;gt;C++ test code&amp;lt;/b&amp;gt; postpend any value of the required type using the &amp;lt;u&amp;gt;C/C++ &amp;lt;tt&amp;gt;comma&amp;lt;/tt&amp;gt; operator&amp;lt;/u&amp;gt; (e.g. &amp;lt;tt&amp;gt;srASSERT_TRUE(cond),1;&amp;lt;/tt&amp;gt;); in &amp;lt;b&amp;gt;C only test code&amp;lt;/b&amp;gt; postpend the value &amp;lt;u&amp;gt;space&amp;lt;/u&amp;gt; separated (e.g. &amp;lt;tt&amp;gt;srASSERT_TRUE(cond) 1;&amp;lt;/tt&amp;gt;).&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;srEXIT_&#039;&#039;xx&#039;&#039;(&#039;&#039;&#039;&#039;&#039;condition&#039;&#039;&#039;&#039;&#039;)&#039;&#039;&#039; &lt;br /&gt;
* The behavior and restrictions of the exit macros are identical to the &#039;&#039;&#039;ASSERT&#039;&#039;&#039; macros. &#039;&#039;&#039;EXIT&#039;&#039;&#039; macros differ only in that they cause the test unit to cease execution. That is, no subsequent test methods within the currently running test unit are executed once an EXIT macro has failed in its assertion. This macro is useful in test units that implement behavioral testing where each test methods depends on the successful completion of the preceding test method.&lt;br /&gt;
* If a teardown fixture is declared, and the srEXIT_xx() fires within a test method, the teardown method will be called.&lt;br /&gt;
* If srEXIT_xx() fires within a scl_test_cclass test unit, its de-init function will be called if declared.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the supplemental information is put into the test report only if the macro fails. In the case above, if a equals 10, then no action is taken; if a is not equal to 10, then the normal srEXPECT actions are taken, and--in addition--the supplemental information is added to the failure record in the test report. The &#039;&#039;srEXIT_xx()&#039;&#039; macro does not support this feature. &lt;br /&gt;
&lt;br /&gt;
The following sections document the several types of testing macros that are provided by the STRIDE Framework. For simplicity, we refer to all the macros using a &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039; tag - when using the macros in test code, the &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039; should be replaced by one of the following: &#039;&#039;&#039;srEXPECT&#039;&#039;&#039;, &#039;&#039;&#039;srASSERT&#039;&#039;&#039;, or &#039;&#039;&#039;srEXIT&#039;&#039;&#039;, depending on how the test writer wants failures to be handled.&lt;br /&gt;
&lt;br /&gt;
== Boolean Macros ==&lt;br /&gt;
The boolean macros take a single condition expression, &#039;&#039;cond&#039;&#039;, that evaluates to an integral type or bool. &lt;br /&gt;
&lt;br /&gt;
The condition will be evaluated once. When a failure is detected, the report will be annotated. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Boolean&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_TRUE(&#039;&#039;cond&#039;&#039;);&lt;br /&gt;
| &#039;&#039;cond&#039;&#039; is non-zero&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_FALSE(&#039;&#039;cond&#039;&#039;);&lt;br /&gt;
| &#039;&#039;cond&#039;&#039; is zero&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
int a = 5; &lt;br /&gt;
int b = 5; &lt;br /&gt;
srEXPECT_TRUE(a == b); &lt;br /&gt;
&lt;br /&gt;
srEXPECT_FALSE(2 &amp;lt; 1);&lt;br /&gt;
&lt;br /&gt;
srEXPECT_FALSE(a != b);&lt;br /&gt;
srEXPECT_TRUE(1 &amp;lt; 2); &lt;br /&gt;
srEXPECT_TRUE(1);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; &#039;&#039;Hint:&#039;&#039; A simple way to add supplemental information to test failures&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;&#039;C++ compiler mode&#039;&#039;&#039; is enabled then the &#039;&#039;srEXPECT_xx()&#039;&#039; and &#039;&#039;srASSERT_xx()&#039;&#039; macros also support adding to a test&#039;s annotations using the &#039;&#039;&#039;&amp;lt;&amp;lt; operator&#039;&#039;&#039;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
srEXPECT_TRUE(a == 10) &amp;lt;&amp;lt; &amp;quot;My custom message&amp;quot; &amp;lt;&amp;lt; &amp;quot; a equals: &amp;quot; &amp;lt;&amp;lt; a;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Comparison Macros ==&lt;br /&gt;
&lt;br /&gt;
Comparison macros take two operands and compare them using the indicated operator. &lt;br /&gt;
&lt;br /&gt;
The comparison macros will work for scalar types as well as C++ objects that have the corresponding comparison operator implemented.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Comparison&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_EQ(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; == &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; != &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LT(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039;&amp;lt;nowiki&amp;gt; &amp;lt; &amp;lt;/nowiki&amp;gt;&#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039;&amp;lt;nowiki&amp;gt; &amp;lt;= &amp;lt;/nowiki&amp;gt;&#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GT(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; &amp;gt; &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GE(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;val1&#039;&#039; &amp;gt;= &#039;&#039;val2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
int a = 5; &lt;br /&gt;
int b = 5; &lt;br /&gt;
&lt;br /&gt;
srEXPECT_EQ( 4, 4 ); &lt;br /&gt;
srEXPECT_NE( 6, 7 );&lt;br /&gt;
srEXPECT_EQ( a, b ); &lt;br /&gt;
srEXPECT_GT( 2 , 1 );&lt;br /&gt;
srEXPECT_GE( 2 , 1 );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== C String Comparison Macros ==&lt;br /&gt;
&lt;br /&gt;
C String Comparison Macros are intended only for use with C-style null terminated strings. The strings can be char or wchar_t based. &lt;br /&gt;
&lt;br /&gt;
Don&#039;t use these macros to compare C++ objects representing strings since such classes typically have overloaded comparison operators. The standard comparison macros should be used instead. &lt;br /&gt;
&lt;br /&gt;
* An empty string will appear in error message output as “”. A null string will appear as NULL with no surrounding quotes. Otherwise all output strings are quoted. &lt;br /&gt;
* The type of str1 and str2 must be compatible with &#039;&#039;const char*&#039;&#039; or &#039;&#039;const wchar_t*&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;C-string comparison&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STREQ(&#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;str1&#039;&#039; and &#039;&#039;str2&#039;&#039; have the same content&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRNE(&#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;str1&#039;&#039; and &#039;&#039;str2&#039;&#039; have different content&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRCASEEQ(&#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;str1&#039;&#039; and &#039;&#039;str2&#039;&#039; have the same content, ignoring case.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRCASENE(&#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
| &#039;&#039;str1&#039;&#039; and &#039;&#039;str2&#039;&#039; have different content, ignoring case.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
const char* s1 = &amp;quot;This String is unique&amp;quot;; &lt;br /&gt;
const char* s2 = &amp;quot;This String has an equivalent&amp;quot;; &lt;br /&gt;
const char* s2Twin = &amp;quot;This String has an equivalent&amp;quot;; &lt;br /&gt;
const char* s2TwinNoCase = &amp;quot;this string has an equivalent&amp;quot;; &lt;br /&gt;
&lt;br /&gt;
srEXPECT_STREQ( s2, s2Twin); &lt;br /&gt;
srEXPECT_STREQ( s2, &amp;quot;This String has an equivalent&amp;quot;); &lt;br /&gt;
srEXPECT_STRCASEEQ(s2, s2TwinNoCase); &lt;br /&gt;
&lt;br /&gt;
srEXPECT_STRNE(s1, s2);  &lt;br /&gt;
srEXPECT_STRNE(s2, s2TwinNoCase); &lt;br /&gt;
srEXPECT_STRCASENE(s1, s2);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Predicate Macros ==&lt;br /&gt;
Predicate macros allow user control over the pass/fail decision making. &lt;br /&gt;
&lt;br /&gt;
A predicate is a function returning bool that is implemented by the user that is the macro. Up to four arguments can also passed to the predicate through the macro.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Predicates&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_PRED1(&#039;&#039;pred&#039;&#039;, &#039;&#039;val1&#039;&#039;)&lt;br /&gt;
| &#039;&#039;pred&#039;&#039;(&#039;&#039;val1&#039;&#039;) returns true&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_PRED2(&#039;&#039;pred&#039;&#039;, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;)&lt;br /&gt;
| &#039;&#039;pred&#039;&#039;(&#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;) returns true&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| …(up to arity of 4)&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
static int alwaysTrueOneArg(int i)&lt;br /&gt;
{&lt;br /&gt;
    return 1; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static int alwaysTrueTwoArgs(int i, int j)&lt;br /&gt;
{&lt;br /&gt;
    return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static void Pass()&lt;br /&gt;
{&lt;br /&gt;
    // examples of passing expectations using predicates.&lt;br /&gt;
&lt;br /&gt;
    srEXPECT_PRED1(alwaysTrueOneArg, 25); &lt;br /&gt;
    srEXPECT_PRED2(alwaysTrueTwoArgs, 100, 33); &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Floating Point Comparison Macros ==&lt;br /&gt;
Floating point macros are for comparing equivalence (or near equivalence) of floating point numbers. &lt;br /&gt;
&lt;br /&gt;
These macros are are very useful for dealing with floating point round-off effects. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Floating Point comparison&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NEAR(val1, val2, epsilon);&lt;br /&gt;
| The absolute value of the difference between val1 and val2 is less than or equal to epsilon.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
float x =           2.00005f;&lt;br /&gt;
float nearX =       2.00006f; &lt;br /&gt;
float nearXEpsilon = .000019f;&lt;br /&gt;
&lt;br /&gt;
double y =           1.2345; &lt;br /&gt;
double nearY =       1.23456; &lt;br /&gt;
double nearYEpsilon = .00019;&lt;br /&gt;
    &lt;br /&gt;
srEXPECT_NEAR(x, nearX, nearXEpsilon); &lt;br /&gt;
srEXPECT_NEAR(y, nearY, nearYEpsilon);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Exception Macros ==&lt;br /&gt;
Exception macros are used to ensure that expected exceptions are thrown. They are applicable to &amp;lt;u&amp;gt;C++ code only&amp;lt;/u&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These macros require exception support from the target compiler. If the target compiler does not have exception support the macros cannot be used.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Exceptions&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
! macro !! Pass if&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_THROW(statement, ex_type);&lt;br /&gt;
| &#039;&#039;statement&#039;&#039; throws an exception of type &#039;&#039;ex_type&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_THROW_ANY(&#039;&#039;statement&#039;&#039;);&lt;br /&gt;
| &#039;&#039;statement&#039;&#039; throws an exception (type not important)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NO_THROW(&#039;&#039;statement&#039;&#039;);&lt;br /&gt;
| &#039;&#039;statement&#039;&#039; does not throw an exception&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&amp;lt;source lang=&#039;cpp&#039;&amp;gt;&lt;br /&gt;
srEXPECT_THROW(throwStdException(), std::exception); &lt;br /&gt;
srEXPECT_THROW(throwInt(), int);&lt;br /&gt;
&lt;br /&gt;
srEXPECT_THROW_ANY(throwStdException()); &lt;br /&gt;
srEXPECT_THROW_ANY(throwInt()); &lt;br /&gt;
&lt;br /&gt;
srEXPECT_NO_THROW(doesntThrow()); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Dynamic Test Case Macros ==&lt;br /&gt;
The macros presented so far assume that their actions are directed at the currenly in-scope test case. However, test cases can be created dynamically using STRIDE&#039;s [Runtime Test Services]. &lt;br /&gt;
&lt;br /&gt;
In order to handle dynamic test cases, each of the macros requires another parameter which specifies the test case to report against. Other than this, these macros provide exactly equivalent functionality to the non-dynamic peer. The dynamic macros are listed below. All require a test case, value of type &#039;&#039;&#039;srTestCaseHandle_t&#039;&#039;&#039; from srtest.h, to be passed as the first parameter).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
! macro &lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;Boolean&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_TRUE_DYN(tc, &#039;&#039;cond&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_FALSE_DYN(tc, &#039;&#039;cond&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;Comparison&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_EQ_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NE_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LT_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_LE_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GT_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_GE_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;C-string comparison&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STREQ_DYN(tc, &#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRNE_DYN(tc, &#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRCASEEQ_DYN(tc, &#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_STRCASENE_DYN(tc, &#039;&#039;str1&#039;&#039;, &#039;&#039;str2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;Exceptions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_THROW_DYN(statement, ex_type);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_THROW_ANY_DYN(tc, &#039;&#039;statement&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NO_THROW_DYN(tc, &#039;&#039;statement&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;Predicates&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_PRED1_DYN(tc, &#039;&#039;pred&#039;&#039;, &#039;&#039;val1&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_PRED2_DYN(tc, &#039;&#039;pred&#039;&#039;, &#039;&#039;vall&#039;&#039;, &#039;&#039;val2&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| …(up to arity of 4)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;1&amp;quot; | &#039;&#039;&#039;Floating Point&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;&#039;&#039;prefix&#039;&#039;&#039;&#039;&#039;_NEAR_DYN(tc, &#039;&#039;val1&#039;&#039;, &#039;&#039;val2&#039;&#039;, &#039;&#039;epsilon&#039;&#039;);&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Pragmas&amp;diff=14400</id>
		<title>Test Pragmas</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Pragmas&amp;diff=14400"/>
		<updated>2015-07-06T19:50:28Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Test Unit [http://en.wikipedia.org/wiki/Directive_(programming) pragmas] are a set of compiler directives that allow annotations within C and C++ source files that are meaningful to the Stride Build Tools but &#039;&#039;&#039;ignored&#039;&#039;&#039; by standard C/C++ compilers. During the build process the [[Build Tools]] generates an [[Intercept Module]] that provides [http://en.wikipedia.org/wiki/Test_harness harnessing] for the tests. Refer to the following header file that contains the &#039;&#039;scl_test_class&#039;&#039; pragma.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Header file&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source  lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
class MyTest {&lt;br /&gt;
public: &lt;br /&gt;
    void CheckFoo();&lt;br /&gt;
    void CheckBoo();&lt;br /&gt;
};&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= scl_test_class =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;scl_test_class&#039;&#039; pragma is used to declare a C++ class as a &#039;&#039;&#039;Test Unit&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_test_class(class-name)&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;class-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| The name of the test unit. This is must be the name of an existing C++ class or a struct.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* This pragma requires the compilation language to be C++. If the compilation language is not C++ and this pragma is encountered, then an error is issued and this pragma is ignored.&lt;br /&gt;
&lt;br /&gt;
* The test class identified:&lt;br /&gt;
** must have single public constructor - default or explicit.&lt;br /&gt;
** must not be a templated class&lt;br /&gt;
** must not be a nested class&lt;br /&gt;
** must not be a pure virtual class&lt;br /&gt;
** must have one or more member functions that is suitable as a test method. For a member function to be a test method it:&lt;br /&gt;
*** must be declared within the test class (a method that is inherited from a base class cannot be a test method)&lt;br /&gt;
*** must be declared with public access&lt;br /&gt;
*** must have a return type of bool, an integral type (signed or unsigned long, int, short, char) or void.&lt;br /&gt;
*** must have an empty parameter list - declared as f() or f(void).&lt;br /&gt;
*** must not be a templatized function&lt;br /&gt;
*** must not be an overloaded operator&lt;br /&gt;
*** must not be a static member.&lt;br /&gt;
&lt;br /&gt;
* Optionally if desired a set of setup/teardown fixtures could be applied.&lt;br /&gt;
&lt;br /&gt;
* Optionally if desired the public constructor may have arguments (they must all be of [http://en.wikipedia.org/wiki/Null-terminated_string C-string] and numeric types).&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class MyOtherTest &lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
  // Declaring a constructor for an scl_test_class is optional, but&lt;br /&gt;
  // if a constructor is declared all arguments must be of plain old data (POD) type.&lt;br /&gt;
  MyOtherTest(int i, const char* s);&lt;br /&gt;
&lt;br /&gt;
  void CheckItOut();&lt;br /&gt;
};&lt;br /&gt;
#ifdef _SCL    &lt;br /&gt;
#pragma scl_test_class(MyOtherTest)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= scl_test_cclass =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;scl_test_cclass&#039;&#039; pragma is used to declare a &amp;quot;C&amp;quot; language struct (class) to be captured as a &#039;&#039;&#039;Test Unit&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_test_cclass(cclass-name, init-function-name { , deinit-function-name })&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| width=&amp;quot;180&amp;quot; | &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| width=&amp;quot;60&amp;quot; | &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;cclass-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| The name of the test unit. This is must be the name of an existing struct in C/C++ or a class in C++.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;init-function-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| The initialization function name. This is synonymous with a class constructor. There must be a prior user-declared function with this name. The first parameter must be a pointer to cclass-name. Additional parameters are left up to the user&#039;s implementation.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;deinit-function-name (optional)&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| The deinitialization function name. This is synonymous with a class destructor. If declared, there must be a user-declared function with this name. The first parameter must be a pointer to cclass-name. Additional parameters are left up to the user&#039;s implementation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The cclass-name identified:&lt;br /&gt;
** may not appear as a specifier of a prior pragma.&lt;br /&gt;
** must be a struct in C.&lt;br /&gt;
** must be either a struct or class in C++.&lt;br /&gt;
** must be [http://en.wikipedia.org/wiki/Plain_Old_Data_Structures POD] type.&lt;br /&gt;
** must not be a template class.&lt;br /&gt;
** must not be a nested class.&lt;br /&gt;
** must contain at least one member function pointer with a prototype that:&lt;br /&gt;
*** returns integral type: void, int, or bool (bool accepted only for C++). &lt;br /&gt;
*** has a first parameter that is a pointer to cclass-name.&lt;br /&gt;
&lt;br /&gt;
* The init-function-name identified:&lt;br /&gt;
** must be declared prior to this pragma&#039;s declaration.&lt;br /&gt;
** must not have been used in any prior or subsequent SCL pragma.&lt;br /&gt;
** must have its first parameter declared as a pointer to the identified cclass.&lt;br /&gt;
** optionally if desired it may have additional parameters (they must all be of [http://en.wikipedia.org/wiki/Null-terminated_string C-string] and numeric types). &lt;br /&gt;
&lt;br /&gt;
* The deinit-function-name:&lt;br /&gt;
** is optional.&lt;br /&gt;
** must be declared prior to this pragma&#039;s declaration if it appears in pragma.&lt;br /&gt;
** must not have been used in any prior or subsequent SCL pragma.&lt;br /&gt;
** must have its first parameter declared as a pointer to the identified class.&lt;br /&gt;
&lt;br /&gt;
* Optionally if desired a set of setup/teardown fixtures could be applied.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef struct CClass_Basic_Simple {&lt;br /&gt;
  int   (*pf_TestMethod)(struct CClass_Basic_Simple* pcc);&lt;br /&gt;
} CClass_Basic_Simple;&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#endif&lt;br /&gt;
void CClass_Basic_Simple_init(struct CClass_Basic_Simple* pcc);&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_cclass(CClass_Basic_Simple, CClass_Basic_Simple_init)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= scl_test_flist =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;scl_test_flist&#039;&#039; pragma is used to declare a list of external functions as a &#039;&#039;&#039;Test Unit&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_test_flist(test-unit-name, function-1, function-2..n)&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;test-unit-name&#039;&#039;&lt;br /&gt;
| String&lt;br /&gt;
| The name of the test unit. A special &#039;&#039;&#039;identifier&#039;&#039;&#039; with that name will be synthesized into which the list of external functions will be assembled. &lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039; this string may not contain a space.&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;function-1&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of the first external function to be captured.&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;function-2..n [Optional]&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Optional names of second and subsequent external functions to be captured.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
* The external functions must meet the following conditions:&lt;br /&gt;
** Their parameter lists must be empty (void).&lt;br /&gt;
** They cannot be overloaded.&lt;br /&gt;
** They cannot be overloaded operators.&lt;br /&gt;
** They may not be template functions.&lt;br /&gt;
** They may throw exceptions when compiled in CPP mode.&lt;br /&gt;
** They cannot have been previously captured with the &#039;&#039;scl_function&#039;&#039; pragram or the &#039;&#039;scl_test_flist&#039;&#039; pragma. &lt;br /&gt;
** They cannot be &#039;&#039;public static class methods&#039;&#039;. &lt;br /&gt;
** They must return a pass/fail result. The return type may be declared void or an integer type (bool is acceptable in C++ mode). If void is the return type, any calls to the test function default to successful.&lt;br /&gt;
&lt;br /&gt;
* Once an external function has been captured with scl_test_flist, that function may not then be captured again with the &#039;&#039;scl_function&#039;&#039; pragma, or the &#039;&#039;scl_test_flist&#039;&#039; pragma, or used with any other qualification pragmas.&lt;br /&gt;
* Use of this pragma requires an include of &#039;&#039;srtest.h&#039;&#039;.&lt;br /&gt;
* The test-unit-name may not have been specified with a prior scl_test_flist pragma.&lt;br /&gt;
* The test-unit-name may not be the name of an existing routine.&lt;br /&gt;
* Optionally if desired a set of setup/teardown fixtures could be applied.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
extern &amp;quot;C&amp;quot; {&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
int test1();&lt;br /&gt;
int test2();&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
}&lt;br /&gt;
#endif&lt;br /&gt;
 &lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_flist(&amp;quot;Foo&amp;quot;, test1, test2)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= scl_test_setup =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;scl_test_setup&#039;&#039; pragma declares a member method to be a setup fixture for an existing &#039;&#039;&#039;Test Unit&#039;&#039;&#039;. The setup method will be called before the execution of each test method.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_test_setup(test-unit-name, function-name)&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;test-unit-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of a captured test unit.&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;function-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of a member function of the test unit to be used as a setup fixture. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* This pragma identifies the setup fixture of an existing test unit, i.e. either a class with &#039;&#039;scl_test_class&#039;&#039; applied to it, a set of functions with &#039;&#039;scl_test_flist&#039;&#039; applied to it, or a C struct with &#039;&#039;scl_test_cclass&#039;&#039; applied to it.&lt;br /&gt;
* There may be only one setup fixture per test unit.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class MyTest {&lt;br /&gt;
public:&lt;br /&gt;
  void FooSetup();&lt;br /&gt;
  void CheckFoo();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
#pragma scl_test_setup(MyTest, FooSetup)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= scl_test_teardown =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;scl_test_teardown&#039;&#039; pragma declares a member method to be a teardown fixture for an existing &#039;&#039;&#039;Test Unit&#039;&#039;&#039;. The teardown method will be called after the execution of each test method.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
 #pragma scl_test_teardown(test-unit-name, function-name)&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;10&amp;quot; style=&amp;quot;align:left;&amp;quot;  &lt;br /&gt;
| &#039;&#039;&#039;Parameters&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Type&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;test-unit-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of a captured test unit.&lt;br /&gt;
|- &lt;br /&gt;
| &#039;&#039;function-name&#039;&#039;&lt;br /&gt;
| Identifier&lt;br /&gt;
| Name of a member function of the test unit to be used as a teardown fixture. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* This pragma identifies the setup fixture of an existing test unit, i.e. either a class with &#039;&#039;scl_test_class&#039;&#039; applied to it, a set of functions with &#039;&#039;scl_test_flist&#039;&#039; applied to it, or a C struct with &#039;&#039;scl_test_cclass&#039;&#039; applied to it.&lt;br /&gt;
* There may be only one teardown fixture per test unit.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
class MyTest {&lt;br /&gt;
public:&lt;br /&gt;
  void FooSetup();&lt;br /&gt;
  void FooTeardown();&lt;br /&gt;
  void CheckFoo();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#ifdef _SCL&lt;br /&gt;
#pragma scl_test_class(MyTest)&lt;br /&gt;
#pragma scl_test_setup(MyTest, FooSetup)&lt;br /&gt;
#pragma scl_test_teardown(MyTest, FooTeardown)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14397</id>
		<title>Test Point</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Point&amp;diff=14397"/>
		<updated>2015-07-06T19:40:33Z</updated>

		<summary type="html">&lt;p&gt;Marku: Marku moved page Test Point2 to Test Point&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Source instrumentation is the process by which developers and domain experts selectively instrument the source under test for the purpose of writing test scenarios against the executing application. Implementing tests that leverage source instrumentation is called &#039;&#039;&#039;Expectation Testing&#039;&#039;&#039;. This validation technique is very useful for verifying proper code sequencing based on the software&#039;s internal design. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
/* a test point with no payload */&lt;br /&gt;
srTEST_POINT(&amp;quot;first test point&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with binary payload */&lt;br /&gt;
srTEST_POINT_DATA(&amp;quot;second test point&amp;quot;, myData, sizeofMyData);&lt;br /&gt;
&lt;br /&gt;
/* a test point with simple string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with simple string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with format string %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;c++ test point&amp;quot;, &amp;quot;&amp;quot;) &amp;lt;&amp;lt; &amp;quot;stream input supported under c++&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike traditional unit testing that drives testing based on input parameters and isolating functionality, &#039;&#039;Expectation&#039;&#039; testing is executed within a fully functional software build running on a real target platform. Test Points are not dependent on input parameters, but often leverage the same types of input/output controls used by functional and black-box testing. &lt;br /&gt;
&lt;br /&gt;
Another unique feature of this type of testing is that domain expertise is not required to implement a test. Developers and domain experts use instrumentation to export design knowledge of the software to the entire team. Furthermore, there is no stubbing required, no special logic to generate input parameters, and no advanced knowledge required of how the application software is coded. &lt;br /&gt;
&lt;br /&gt;
To enable effective test coverage, developers and domain experts are required to insert instrumentation at key locations to gain insight and testability. Here are some general suggested source code areas to consider instrumenting:&lt;br /&gt;
* critical function entry/exit points&lt;br /&gt;
* state transitions&lt;br /&gt;
* critical or interesting data transitions (using optional payload to convey data values)&lt;br /&gt;
* callback routines&lt;br /&gt;
* data persistence&lt;br /&gt;
* error conditions&lt;br /&gt;
&lt;br /&gt;
The steps required to implement an Expectation test are the following:&lt;br /&gt;
#[[#Instrumentation | Instrumentation]]&lt;br /&gt;
#[[#Define your Expectations | Define your Expectations]]&lt;br /&gt;
#[[#Write the Test Unit | Write the Test Unit]]&lt;br /&gt;
&lt;br /&gt;
== Instrumentation ==&lt;br /&gt;
To make the software &#039;&#039;testable&#039;&#039;, the first step in the process is for the experts to selectively insert instrumentation macros into the source code. Test Points themselves have nominal impact on the performance of the application – they are only active during test data collection&amp;lt;ref name=&amp;quot;n1&amp;quot;&amp;gt; Test data collection is typically implemented in a low priority background thread. The data is captured in the calling routine&#039;s thread context (no context switch) but processed in the background or on the host. Instrumentation macros return immediately to the caller (i.e. no-op) when testing is not active.&amp;lt;/ref&amp;gt;. Test Points contain names and optional payload data. When Test Points are activated, they are collected in the background, along with timing and any associated data. The set of Test Points hit, their order, timing, and data content can all be used to validate that the software is behaving as expected. [[Test_Log | Test Logs]] can also be added to the source code to provide additional information in the context of an executing test. &lt;br /&gt;
&lt;br /&gt;
To specify a test point you should include the &#039;&#039;&#039;srtest.h&#039;&#039;&#039; header file from the STRIDE Runtime in your compilation unit. The Test Point macros are active only when &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, therefore it is practical to place these macros in-line in production source. When &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is not &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, these macros evaluate to nothing.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Test Point Macros&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_DATA&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;data&#039;&#039;, &#039;&#039;size&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;data&#039;&#039; is a pointer to a byte sequence&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;size&#039;&#039; is the size of the &#039;&#039;data&#039;&#039; in bytes&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_STR&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;message&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&amp;lt;br/&amp;gt;&lt;br /&gt;
When used in the context of a c++ compilation unit, this macro also supports the streaming operator to append to the message string (see example below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Define your Expectations ==&lt;br /&gt;
&lt;br /&gt;
In addition to instrumenting the source code with Test Points, you must also define the [[Expectations]] of the Test Points. This involves defining the list of Test Points expected to be hit during a given test scenario. Expectation can also include any &#039;&#039;&#039;data&#039;&#039;&#039; associated with a Test Point that requires validation.&lt;br /&gt;
&lt;br /&gt;
== Write the Test Unit ==&lt;br /&gt;
Once the source under test has been instrumented and the [[Expectations | expectations]] defined, Stride offers a number of techniques that can be used for implementing &#039;&#039;&#039;expectation tests&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
* Tests can be written in [[Expectation_Tests_in_C/C%2B%2B | C or C++]] and executed on the device under test using the Stride framework. &lt;br /&gt;
* Tests can be written in [[Test_Modules_Overview | Perl Test Scripts]]&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14396</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14396"/>
		<updated>2015-07-06T19:38:55Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;#color:#0067A5&amp;quot;&amp;gt; &amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt; Welcome to the STRIDE™ Wiki &amp;lt;/font&amp;gt; &amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
STRIDE™ has been designed specifically for &#039;&#039;&#039;On-Target White-box Testing&#039;&#039;&#039;. STRIDE™ is &#039;&#039;&#039;test infrastructure&#039;&#039;&#039; used by engineers to implement and execute [[Types_of_Testing_Supported_by_STRIDE | &#039;&#039;&#039;tests&#039;&#039;&#039;]] for validating embedded software executing On-Target. The STRIDE™ system consists of a [[STRIDE Overview | &#039;&#039;&#039;framework&#039;&#039;&#039;]] for testing and a [[STRIDE_Test_Space | &#039;&#039;&#039;hosted web application&#039;&#039;&#039;]] for storing and analyzing test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For an overview of STRIDE™ [[STRIDE Overview| PLEASE CLICK HERE]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:screen_icon.png]] [[STRIDE Overview Video | STRIDE Overview Screencast]]&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot; style=&amp;quot;border-right: rgb(187,204,204) 1px solid; border-top: rgb(187,204,204) 1px solid; vertical-align: top; border-left: rgb(187,204,204) 1px solid; border-bottom: rgb(187,204,204) 1px solid&amp;quot; cellspacing=&amp;quot;5&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Source Instrumentation | Instrumentation]] &lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Tests in Script| Tests in Script]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Test Units| Tests in C/C++]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Running Tests | Running Tests]] &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 1&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Source Instrumentation Overview | Overview]]&lt;br /&gt;
* [[Test Point (old) | Test Points]]&lt;br /&gt;
* [[Test Log | Test Logs]]&lt;br /&gt;
* [[Function_Capturing  | Functions]]&lt;br /&gt;
* [[Expectations | Expectations]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 2&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Modules Overview | Overview]]&lt;br /&gt;
* [[Perl Script APIs | Perl Script APIs]]&lt;br /&gt;
* [[Perl Script Snippets]]&lt;br /&gt;
* [[Script_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 3&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Units Overview | Overview]]&lt;br /&gt;
* [[Test Units]]&lt;br /&gt;
* [[Test Macros | Test Macros]]&lt;br /&gt;
* [[Test API | Test APIs]]&lt;br /&gt;
* [[C/C%2B%2B_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 4&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Running Tests (old) | Running Tests]]&lt;br /&gt;
* [[Listing Functions and Test Units|Listing Tests]]&lt;br /&gt;
* [[Tracing  | Tracing]]&lt;br /&gt;
* [[Organizing Tests into Suites | Organizing Tests]]&lt;br /&gt;
* [[Setting up your CI Environment | Setting up CI]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category: Test Space|Test Space]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Reference | Reference]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Installation | Installation]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Training | Training]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ROW 2 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 5&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[STRIDE_Test_Space|Overview]]&lt;br /&gt;
* [[User Administration]]&lt;br /&gt;
* [[Creating Test Spaces]]&lt;br /&gt;
* [[Uploading Test Results]]&lt;br /&gt;
* [[Notifications]]&lt;br /&gt;
* [[Reporting Entities]]&lt;br /&gt;
* [[Creating And Using Baselines | Using Baselines]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 6&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[STRIDE Runner]]&lt;br /&gt;
* [[STRIDE Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime]]&lt;br /&gt;
* [[STRIDE Off-Target Environment]]&lt;br /&gt;
* [[Platform Abstraction Layer]]&lt;br /&gt;
* [[Intercept Module]]&lt;br /&gt;
* [[Test Unit Pragmas]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 7&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Installation Overview | Overview]]&lt;br /&gt;
* [[Desktop Installation | Framework setup]]&lt;br /&gt;
* [[Runtime Integration]]&lt;br /&gt;
* [[Build Integration]]&lt;br /&gt;
* [[Stride Sandbox]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 8&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Training Getting Started | Getting Started]]&lt;br /&gt;
* [[Training Test Macros | Test Macros]]&lt;br /&gt;
* [[Training File IO | File IO]]&lt;br /&gt;
* [[Training Parameters | Parameters]]&lt;br /&gt;
* [[Training Fixturing | Fixturing]]&lt;br /&gt;
* [[Training Expectations | Test Points]]&lt;br /&gt;
* [[Training Doubling | Test Doubles]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click here for [[:Category:Release Notes| Release Notes]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Point_(old)&amp;diff=14394</id>
		<title>Test Point (old)</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Point_(old)&amp;diff=14394"/>
		<updated>2015-07-06T19:38:22Z</updated>

		<summary type="html">&lt;p&gt;Marku: Marku moved page Test Point to Test Point (old)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Expectations|Expectation]] testing is made possible by selective developer instrumentation of the source under test. The instrumentation is unobtrusive and powerful, supporting the ability to optionally attach string or binary data to the Test Point.&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
To specify a test point you should include the &#039;&#039;&#039;srtest.h&#039;&#039;&#039; header file from the STRIDE Runtime in your compilation unit. The Test Point macros are active only when &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, therefore it is practical to place these macros in-line in production source. When &amp;lt;tt&amp;gt;STRIDE_ENABLED&amp;lt;/tt&amp;gt; is not &amp;lt;tt&amp;gt;#define&amp;lt;/tt&amp;gt;d, these macros evaluate to nothing.  &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;2&amp;quot; | &#039;&#039;&#039;Test Point Macros&#039;&#039;&#039;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_DATA&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;data&#039;&#039;, &#039;&#039;size&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;data&#039;&#039; is a pointer to a byte sequence&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;size&#039;&#039; is the size of the &#039;&#039;data&#039;&#039; in bytes&lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;srTEST_POINT_STR&#039;&#039;&#039;(&#039;&#039;label&#039;&#039;, &#039;&#039;message&#039;&#039;)&lt;br /&gt;
| &#039;&#039;label&#039;&#039; is a pointer to a null-terminated string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;message&#039;&#039; is a pointer to a null-terminated format string&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;...&#039;&#039; variable list matching the format string&amp;lt;br/&amp;gt;&lt;br /&gt;
When used in the context of a c++ compilation unit, this macro also supports the streaming operator to append to the message string (see example below)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== C++ Only Features ===&lt;br /&gt;
In C++ source the string variants of the macros above support adding to other content to the message by using the &amp;lt;&amp;lt; operator. For more information please read [[C%2B%2B_Only_Features|this]].&lt;br /&gt;
&lt;br /&gt;
== Code Snippets ==&lt;br /&gt;
The source under test is instrumented simply by placing lines of the following form into the source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&#039;c&#039;&amp;gt;&lt;br /&gt;
#include &amp;lt;srtest.h&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
/* a test point with no payload */&lt;br /&gt;
srTEST_POINT(&amp;quot;first test point&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with binary payload */&lt;br /&gt;
srTEST_POINT_DATA(&amp;quot;second test point&amp;quot;, myData, sizeofMyData);&lt;br /&gt;
&lt;br /&gt;
/* a test point with simple string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with simple string&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
/* a test point with formatted string payload */&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;third test point&amp;quot;, &amp;quot;payload with format string %d&amp;quot;, myVar);&lt;br /&gt;
&lt;br /&gt;
#ifdef __cplusplus&lt;br /&gt;
srTEST_POINT_STR(&amp;quot;c++ test point&amp;quot;, &amp;quot;&amp;quot;) &amp;lt;&amp;lt; &amp;quot;stream input supported under c++&amp;quot;;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When this code is executed it broadcasts a message via the STRIDE Runtime which is detected by the test code if it is currently looking for test points in an expectation test. We refer to the receipt of a test point as a &#039;&#039;test point hit&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Source Instrumentation]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14393</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Main_Page&amp;diff=14393"/>
		<updated>2015-07-06T19:36:31Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;span style=&amp;quot;#color:#0067A5&amp;quot;&amp;gt; &amp;lt;font size=&amp;quot;5&amp;quot;&amp;gt; Welcome to the STRIDE™ Wiki &amp;lt;/font&amp;gt; &amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
STRIDE™ has been designed specifically for &#039;&#039;&#039;On-Target White-box Testing&#039;&#039;&#039;. STRIDE™ is &#039;&#039;&#039;test infrastructure&#039;&#039;&#039; used by engineers to implement and execute [[Types_of_Testing_Supported_by_STRIDE | &#039;&#039;&#039;tests&#039;&#039;&#039;]] for validating embedded software executing On-Target. The STRIDE™ system consists of a [[STRIDE Overview | &#039;&#039;&#039;framework&#039;&#039;&#039;]] for testing and a [[STRIDE_Test_Space | &#039;&#039;&#039;hosted web application&#039;&#039;&#039;]] for storing and analyzing test results. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;For an overview of STRIDE™ [[STRIDE Overview| PLEASE CLICK HERE]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:screen_icon.png]] [[STRIDE Overview Video | STRIDE Overview Screencast]]&lt;br /&gt;
&amp;lt;hr/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
{| class=&amp;quot;FCK__ShowTableBorders&amp;quot; style=&amp;quot;border-right: rgb(187,204,204) 1px solid; border-top: rgb(187,204,204) 1px solid; vertical-align: top; border-left: rgb(187,204,204) 1px solid; border-bottom: rgb(187,204,204) 1px solid&amp;quot; cellspacing=&amp;quot;5&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Source Instrumentation | Instrumentation]] &lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Tests in Script| Tests in Script]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Test Units| Tests in C/C++]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Running Tests | Running Tests]] &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 1&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Source Instrumentation Overview | Overview]]&lt;br /&gt;
* [[Test Point | Test Points]]&lt;br /&gt;
* [[Test Log | Test Logs]]&lt;br /&gt;
* [[Function_Capturing  | Functions]]&lt;br /&gt;
* [[Expectations | Expectations]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 2&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Modules Overview | Overview]]&lt;br /&gt;
* [[Perl Script APIs | Perl Script APIs]]&lt;br /&gt;
* [[Perl Script Snippets]]&lt;br /&gt;
* [[Script_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 3&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Test Units Overview | Overview]]&lt;br /&gt;
* [[Test Units]]&lt;br /&gt;
* [[Test Macros | Test Macros]]&lt;br /&gt;
* [[Test API | Test APIs]]&lt;br /&gt;
* [[C/C%2B%2B_Samples | Samples]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 4&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Running Tests (old) | Running Tests]]&lt;br /&gt;
* [[Listing Functions and Test Units|Listing Tests]]&lt;br /&gt;
* [[Tracing  | Tracing]]&lt;br /&gt;
* [[Organizing Tests into Suites | Organizing Tests]]&lt;br /&gt;
* [[Setting up your CI Environment | Setting up CI]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category: Test Space|Test Space]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Reference | Reference]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Installation | Installation]]&lt;br /&gt;
&lt;br /&gt;
! style=&amp;quot;border-right: rgb(163,176,191) 1px solid; padding-right: 0.4em; border-top: rgb(163,176,191) 1px solid; padding-left: 0.4em; font-weight: bold; font-size: 120%; background: rgb(206,223,242) 0% 50%; padding-bottom: 0.2em; margin: 0pt; border-left: rgb(163,176,191) 1px solid; color: rgb(0,0,0); padding-top: 0.2em; border-bottom: rgb(163,176,191) 1px solid; text-align: left; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial&amp;quot; | [[:Category:Training | Training]]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- ROW 2 --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 5&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[STRIDE_Test_Space|Overview]]&lt;br /&gt;
* [[User Administration]]&lt;br /&gt;
* [[Creating Test Spaces]]&lt;br /&gt;
* [[Uploading Test Results]]&lt;br /&gt;
* [[Notifications]]&lt;br /&gt;
* [[Reporting Entities]]&lt;br /&gt;
* [[Creating And Using Baselines | Using Baselines]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 6&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[STRIDE Runner]]&lt;br /&gt;
* [[STRIDE Build Tools]]&lt;br /&gt;
* [[STRIDE Runtime]]&lt;br /&gt;
* [[STRIDE Off-Target Environment]]&lt;br /&gt;
* [[Platform Abstraction Layer]]&lt;br /&gt;
* [[Intercept Module]]&lt;br /&gt;
* [[Test Unit Pragmas]]&lt;br /&gt;
* [[Reporting Model]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 7&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | &lt;br /&gt;
* [[Installation Overview | Overview]]&lt;br /&gt;
* [[Desktop Installation | Framework setup]]&lt;br /&gt;
* [[Runtime Integration]]&lt;br /&gt;
* [[Build Integration]]&lt;br /&gt;
* [[Stride Sandbox]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Cell 8&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
* [[Training Getting Started | Getting Started]]&lt;br /&gt;
* [[Training Test Macros | Test Macros]]&lt;br /&gt;
* [[Training File IO | File IO]]&lt;br /&gt;
* [[Training Parameters | Parameters]]&lt;br /&gt;
* [[Training Fixturing | Fixturing]]&lt;br /&gt;
* [[Training Expectations | Test Points]]&lt;br /&gt;
* [[Training Doubling | Test Doubles]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click here for [[:Category:Release Notes| Release Notes]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Implementation&amp;diff=14392</id>
		<title>Test Implementation</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Implementation&amp;diff=14392"/>
		<updated>2015-07-06T19:35:22Z</updated>

		<summary type="html">&lt;p&gt;Marku: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[Test Unit]]&lt;br /&gt;
* [[Test Pragmas]]&lt;br /&gt;
* [[Test Macros]]&lt;br /&gt;
* [[Notes]]&lt;br /&gt;
* [[Parameterized_Test_Units | Parameters]]&lt;br /&gt;
* [[File Transfer Services | Remote Files]]&lt;br /&gt;
* [[Test_Documentation_in_C/C%2B%2B | Documenting Tests]]&lt;br /&gt;
* [[Running Tests]]&lt;br /&gt;
* [[Runtime Test Services | Test Services]]&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Running_Tests&amp;diff=14389</id>
		<title>Running Tests</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Running_Tests&amp;diff=14389"/>
		<updated>2015-07-06T19:34:25Z</updated>

		<summary type="html">&lt;p&gt;Marku: Marku moved page Running Tests2 to Running Tests&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
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 &#039;&#039;connection&#039;&#039; between the &#039;&#039;Runner&#039;&#039; and &#039;&#039;Runtime&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Block diagram&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Running_Tests.jpg|400px|Connection Block Diagram]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Invoking the Runner (aka &amp;lt;tt&amp;gt;stride&amp;lt;/tt&amp;gt;) from a console&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
  stride --database=&amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or for Linux/FreeBSD&lt;br /&gt;
&lt;br /&gt;
  stride --database=&amp;quot;$STRIDE_DIR%/SDK/Posix/out/TestApp.sidb&amp;quot; --device=TCP:localhost:8000 --run=&amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Option files can be helpful (i.e. my.opt)&lt;br /&gt;
&lt;br /&gt;
  --database &amp;quot;%STRIDE_DIR%\SDK\Windows\out\TestApp.sidb&amp;quot;&lt;br /&gt;
  --device TCP:localhost:8000&lt;br /&gt;
&lt;br /&gt;
  stride --options_file my.opt --run &amp;quot;*&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Reviewing your Results&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:Runner_Test_Report.jpg |Example Report]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Input ==&lt;br /&gt;
In order to run tests, you must provide the following information to stride.exe:&lt;br /&gt;
&lt;br /&gt;
;database file&lt;br /&gt;
: This is the .sidb file that is created by the &#039;&#039;Stride Compiler&#039;&#039; during the target build process. This file contains meta-information used to run tests.&lt;br /&gt;
&lt;br /&gt;
;device parameters&lt;br /&gt;
: This tells stride.exe how to connect to the target.&lt;br /&gt;
&lt;br /&gt;
;tests to run&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
Upon test completion, test output is always written as follows:&lt;br /&gt;
&lt;br /&gt;
;console output&lt;br /&gt;
: A quick summary of results is written to standard output. Test counts are shown for the categories of &#039;&#039;&#039;passed&#039;&#039;&#039;, &#039;&#039;&#039;failed&#039;&#039;&#039;, &#039;&#039;&#039;in progress&#039;&#039;&#039;, and &#039;&#039;&#039;not in use&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
;local xml file&lt;br /&gt;
: 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 &amp;quot;.xml&amp;quot;. If you open this file in a web browser, an xsl transform is automatically downloaded and applied before rendering.&lt;br /&gt;
&lt;br /&gt;
Optionally, you may also publish the results to [http://www.testspace.com Test Space] upon test completion.&lt;/div&gt;</summary>
		<author><name>Marku</name></author>
	</entry>
</feed>