<?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=Studio%3ATestCase.pm</id>
	<title>Studio:TestCase.pm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.stridewiki.com/index.php?action=history&amp;feed=atom&amp;title=Studio%3ATestCase.pm"/>
	<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;action=history"/>
	<updated>2026-05-03T17:33:12Z</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=Studio:TestCase.pm&amp;diff=10847&amp;oldid=prev</id>
		<title>Timd: Text replace - &#039;Category:Libraries&#039; to &#039;Category:Studio:Libraries&#039;</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=10847&amp;oldid=prev"/>
		<updated>2009-08-20T23:25:31Z</updated>

		<summary type="html">&lt;p&gt;Text replace - &amp;#039;Category:Libraries&amp;#039; to &amp;#039;Category:Studio:Libraries&amp;#039;&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 23:25, 20 August 2009&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-l106&quot;&gt;Line 106:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&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;:Text of the comment to be added.&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;:Text of the comment to be added.&lt;/div&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;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; 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: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Libraries]]&lt;/div&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;[[Category&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Studio&lt;/ins&gt;:Libraries]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=10518&amp;oldid=prev</id>
		<title>Timd: TestCase.pm moved to Studio:TestCase.pm</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=10518&amp;oldid=prev"/>
		<updated>2009-08-18T22:05:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=TestCase.pm&quot; class=&quot;mw-redirect&quot; title=&quot;TestCase.pm&quot;&gt;TestCase.pm&lt;/a&gt; moved to &lt;a href=&quot;/index.php?title=Studio:TestCase.pm&quot; title=&quot;Studio:TestCase.pm&quot;&gt;Studio:TestCase.pm&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:05, 18 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=8543&amp;oldid=prev</id>
		<title>Timd at 23:44, 9 December 2008</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=8543&amp;oldid=prev"/>
		<updated>2008-12-09T23:44:09Z</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 23:44, 9 December 2008&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-l105&quot;&gt;Line 105:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 105:&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;;$comment&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;;$comment&lt;/div&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;:Text of the comment to be added.&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;:Text of the comment to be added.&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:Libraries]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=8542&amp;oldid=prev</id>
		<title>Timd: New page: ==Example== &lt;source lang=&quot;perl&quot;&gt; use strict; use warnings; use diagnostics; use Carp; use Win32::TieRegistry(Delimiter=&gt;&quot;/&quot;); use File::Spec; use Win32::OLE; Win32::OLE-&gt;Option(Warn =&gt; 3);...</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:TestCase.pm&amp;diff=8542&amp;oldid=prev"/>
		<updated>2008-12-09T23:43:16Z</updated>

		<summary type="html">&lt;p&gt;New page: ==Example== &amp;lt;source lang=&amp;quot;perl&amp;quot;&amp;gt; use strict; use warnings; use diagnostics; use Carp; use Win32::TieRegistry(Delimiter=&amp;gt;&amp;quot;/&amp;quot;); use File::Spec; use Win32::OLE; Win32::OLE-&amp;gt;Option(Warn =&amp;gt; 3);...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Example==&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;
use diagnostics;&lt;br /&gt;
use Carp;&lt;br /&gt;
use Win32::TieRegistry(Delimiter=&amp;gt;&amp;quot;/&amp;quot;);&lt;br /&gt;
use File::Spec;&lt;br /&gt;
use Win32::OLE;&lt;br /&gt;
Win32::OLE-&amp;gt;Option(Warn =&amp;gt; 3);&lt;br /&gt;
&lt;br /&gt;
# setup the lib path&lt;br /&gt;
use vars qw(&lt;br /&gt;
    $studio&lt;br /&gt;
    $testSuite&lt;br /&gt;
    $ascript&lt;br /&gt;
    $StrideDir&lt;br /&gt;
    $StrideLibDir&lt;br /&gt;
);&lt;br /&gt;
BEGIN {&lt;br /&gt;
    $StrideDir =  &lt;br /&gt;
        $Registry-&amp;gt;{&amp;quot;LMachine/SOFTWARE/S2 Technologies/STRIDE/InstallDir&amp;quot;} ||&lt;br /&gt;
        $ENV{&amp;#039;STRIDE_DIR&amp;#039;} ||&lt;br /&gt;
        &amp;#039;C:\\STRIDE&amp;#039;;&lt;br /&gt;
    $StrideLibDir = File::Spec-&amp;gt;catdir($StrideDir, &amp;#039;lib&amp;#039;, &amp;#039;perl&amp;#039;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
###############################&lt;br /&gt;
# Imported Libs &lt;br /&gt;
###############################&lt;br /&gt;
use lib $StrideLibDir; # Use the above calculated path to finf the lib&amp;#039;s&lt;br /&gt;
&lt;br /&gt;
use S2S::TestCase;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$main::testSuite-&amp;gt;Tests-&amp;gt;RemoveAll();&lt;br /&gt;
&lt;br /&gt;
my $tc1 = S2S::TestCase-&amp;gt;new(&amp;#039;testcase 1&amp;#039;, &amp;#039;description: testcase 1&amp;#039;);&lt;br /&gt;
$tc1-&amp;gt;passTest();&lt;br /&gt;
&lt;br /&gt;
my $tc2 = S2S::TestCase-&amp;gt;new(&amp;#039;testcase 2&amp;#039;, &amp;#039;description: testcase 2&amp;#039;);&lt;br /&gt;
$tc2-&amp;gt;addInfo(&amp;#039;Separate info comment&amp;#039;);&lt;br /&gt;
$tc2-&amp;gt;passTest(&amp;#039;info comment gets added&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
my $tc3 = S2S::TestCase-&amp;gt;new(&amp;#039;testcase 3&amp;#039;, &amp;#039;description: testcase 3&amp;#039;);&lt;br /&gt;
$tc3-&amp;gt;failTest();&lt;br /&gt;
&lt;br /&gt;
my $tc4 = S2S::TestCase-&amp;gt;new(&amp;#039;testcase 4&amp;#039;, &amp;#039;description: testcase 4&amp;#039;);&lt;br /&gt;
$tc4-&amp;gt;addError(&amp;#039;Separate error comment&amp;#039;);&lt;br /&gt;
$tc4-&amp;gt;failTest(&amp;#039;error comment gets added&amp;#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Description==&lt;br /&gt;
This module provides a thin wrapper over the reporter::TestCase object to provide some convenience functions.&lt;br /&gt;
&lt;br /&gt;
==Instance Methods==&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;new($name[, $description, $parentsuite])&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Creates an instance of the TestCase object, performing the following: &lt;br /&gt;
&lt;br /&gt;
* Creates a new test case with the name as specified by the $name argument as a child of the specified $parentsuite. (Or if the specified test case already exists, uses it.)&lt;br /&gt;
&lt;br /&gt;
* Sets the test case description using the $description argument; if the test case already exists and has a non-empty description, $description is appended to the existing text.&lt;br /&gt;
&lt;br /&gt;
;$name&lt;br /&gt;
:Name of the test case to be wrapped by this object; if the test case already exists as a child of $parentsuite, it will be used, otherwise a new test case is created.&lt;br /&gt;
&lt;br /&gt;
;$description&lt;br /&gt;
:[optional] Description to be added to the specified test case, If the test case already exists and has a  non-empty description, $description will be appended to the existing text with a &amp;#039; | &amp;#039; separator.&lt;br /&gt;
&lt;br /&gt;
;$parentsuite&lt;br /&gt;
:[optional] Parent suite of the target test. If omitted this value defaults to $main::testSuite, which is the suite corresponding to the workspace folder that the using script belongs to.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;getInternalTestCase()&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Returns the Resporter::TestCase object wrapped by this object &lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;failTest([$failMessage])&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Sets the status of the wrapped testcase to &amp;quot;FAIL&amp;quot; and optionally adds an Error comment &lt;br /&gt;
&lt;br /&gt;
;$failMessage&lt;br /&gt;
:[optional] If provided, this string will be added as a comment to the test case with the label &amp;quot;Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;passTest([$passMessage])&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Sets the status of the wrapped testcase to &amp;quot;PASS&amp;quot; and optionally adds an Info comment. &lt;br /&gt;
&lt;br /&gt;
;$passMessage&lt;br /&gt;
:[optional] If provided, this string will be added as a comment to the test case with the label &amp;quot;Infor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;addError([$comment])&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Adds a text comment to the test case with the label &amp;quot;Error&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
;$comment&lt;br /&gt;
:Text of the comment to be added.&lt;br /&gt;
&lt;br /&gt;
===&amp;lt;code&amp;gt;addInfo([$comment])&amp;lt;/code&amp;gt;===&lt;br /&gt;
&lt;br /&gt;
Adds a text comment to the test case with the label &amp;quot;Info&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
;$comment&lt;br /&gt;
:Text of the comment to be added.&lt;/div&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
</feed>