<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.stridewiki.com/index.php?action=history&amp;feed=atom&amp;title=Test_Fixturing_in_C%2FC%2B%2B</id>
	<title>Test Fixturing in C/C++ - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.stridewiki.com/index.php?action=history&amp;feed=atom&amp;title=Test_Fixturing_in_C%2FC%2B%2B"/>
	<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Fixturing_in_C/C%2B%2B&amp;action=history"/>
	<updated>2026-04-30T09:54:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Fixturing_in_C/C%2B%2B&amp;diff=12586&amp;oldid=prev</id>
		<title>Mikee at 22:40, 28 May 2010</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Fixturing_in_C/C%2B%2B&amp;diff=12586&amp;oldid=prev"/>
		<updated>2010-05-28T22:40:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:40, 28 May 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot;&gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 40:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;STRIDE  offers an integrated solution to file fixturing  that makes it possible  from your target test code to specify a  host-based file and transfer its  data to the target. Refer to the [[File_Services_Samples  | File  Services  Samples]] that demonstrates techniques and   syntax for performing basic tasks using the [[File  Transfer  Services|File Transfer Services API]].&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;STRIDE  offers an integrated solution to file fixturing  that makes it possible  from your target test code to specify a  host-based file and transfer its  data to the target. Refer to the [[File_Services_Samples  | File  Services  Samples]] that demonstrates techniques and   syntax for performing basic tasks using the [[File  Transfer  Services|File Transfer Services API]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category: Test Units]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mikee</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Test_Fixturing_in_C/C%2B%2B&amp;diff=12579&amp;oldid=prev</id>
		<title>Mikee: Created page with &#039;== What is  Test  Fixturing? == Recall  that  generic xUnit testing comprises four discrete phases: # Setup # Exercise # Verify # Teardown  &#039;&#039;Test fixturing&#039;&#039; refers to the Setup…&#039;</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Test_Fixturing_in_C/C%2B%2B&amp;diff=12579&amp;oldid=prev"/>
		<updated>2010-05-28T22:26:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;== What is  Test  Fixturing? == Recall  that  generic xUnit testing comprises four discrete phases: # Setup # Exercise # Verify # Teardown  &amp;#039;&amp;#039;Test fixturing&amp;#039;&amp;#039; refers to the Setup…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== What is  Test  Fixturing? ==&lt;br /&gt;
Recall  that  generic xUnit testing comprises four discrete phases:&lt;br /&gt;
# Setup&lt;br /&gt;
# Exercise&lt;br /&gt;
# Verify&lt;br /&gt;
# Teardown&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Test fixturing&amp;#039;&amp;#039; refers to the Setup and Teardown   phases of the testing.&lt;br /&gt;
&lt;br /&gt;
In the &amp;#039;&amp;#039;&amp;#039;Setup&amp;#039;&amp;#039;&amp;#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 &amp;#039;&amp;#039;&amp;#039;Tear down&amp;#039;&amp;#039;&amp;#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;
== The Importance  of  Fixturing ==&lt;br /&gt;
The proper use  of  fixturing can simplify test writing and lead to these benefits:&lt;br /&gt;
&lt;br /&gt;
* Separation of   initialization/deinitialization code from your test code&lt;br /&gt;
* Reuse of   setup and teardown code within a test unit&lt;br /&gt;
*  Simplification  of resource cleanup in test methods&lt;br /&gt;
&lt;br /&gt;
== STRIDE  Fixturing Resources ==&lt;br /&gt;
===Specifying   Fixturing Methods===&lt;br /&gt;
Within   your source code, you can optionally specify &amp;#039;&amp;#039;&amp;#039;setup&amp;#039;&amp;#039;&amp;#039;   and &amp;#039;&amp;#039;&amp;#039;teardown&amp;#039;&amp;#039;&amp;#039; methods using the [[Test Unit Pragmas|scl pragmas]]: &lt;br /&gt;
&lt;br /&gt;
*[[Scl test setup|scl_test_setup()]]&lt;br /&gt;
*[[Scl test teardown|scl_test_teardown()]]&lt;br /&gt;
&lt;br /&gt;
When   declaring these pragmas, you specify 1) the test unit the pragma   applies to; and 2) the name of the method that will be called by the   STRIDE framework to perform the Setup or Teardown fixturing. If   specifed, the STRIDE framework will call the Setup method before each   test method in the test unit, and the Teardown method after each test   method in the test unit.&lt;br /&gt;
&lt;br /&gt;
You can see examples of fixturing   delcarations in these test samples:&lt;br /&gt;
*[[Test Class Samples]]&lt;br /&gt;
*[[Test CClass Samples]]&lt;br /&gt;
&lt;br /&gt;
===Advanced   Fixturing===&lt;br /&gt;
A common test   pattern--especially in the area of multimedia--is to create a test that   is parametrized by an input file. The test is run multiple times with  a  different input file used for each run. &lt;br /&gt;
&lt;br /&gt;
In this case the  setup  fixturing makes the file data available to the test (typically  opening a  file on the host, then copying data from host to target), and  the  teardown fixturing removes any files created on the target and so  forth.&lt;br /&gt;
&lt;br /&gt;
STRIDE  offers an integrated solution to file fixturing  that makes it possible  from your target test code to specify a  host-based file and transfer its  data to the target. Refer to the [[File_Services_Samples  | File  Services  Samples]] that demonstrates techniques and   syntax for performing basic tasks using the [[File  Transfer  Services|File Transfer Services API]].&lt;/div&gt;</summary>
		<author><name>Mikee</name></author>
	</entry>
</feed>