<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>PowerShell Scripts for Testing</title><link>http://www.codeplex.com/psexpect/Project/ProjectRss.aspx</link><description>PowerShell Scripts for Testing is a function library for PowerShell, Microsoft&amp;#39;s .NET scripting language.  The library brings xUnit-style assertions such as Assert and AssertEquals to PowerShell.</description><item><title>NEW POST: Test results in XML format?</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=29039</link><description>&lt;div style="line-height: normal;"&gt;Let's take the second approach, where I post the code to the forum and you commit it.  That seems like the easiest at this point.  It will take me a while to get to this, since I have several other tasks on my plate that take precedence.  :)  I was hoping that someone had already done the work. &lt;br&gt;
&lt;br&gt;
BTW - I am using the PsExpect library on a daily basis, and am very, very happy with it.  It is now a standard module in all of my automated tests. Thanks!
&lt;/div&gt;</description><author>Kibi78704</author><pubDate>Thu, 05 Jun 2008 15:36:05 GMT</pubDate><guid isPermaLink="false">NEW POST: Test results in XML format? 20080605033605P</guid></item><item><title>NEW POST: Tutorial (French language)</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=28630</link><description>&lt;div style="line-height: normal;"&gt;Merci! &lt;br&gt;
&lt;div style="border-style:dotted none;border-color:rgb(170, 170, 170) -moz-use-text-color;border-width:0.1em medium;margin:1em 0em 2.5em 3em;padding:0.2em;font-style:italic"&gt;&lt;br&gt;
Batchman wrote:&lt;br&gt;
I've created a tutorial&amp;nbsp;(French language):&lt;br&gt;
&lt;a href="ftp://ftp-developpez.com/laurent-dardenne/articles/Windows/PowerShell/TestsUnitairesSousPowerShell/fichiers/Tests-unitaires-sous-PowerShell.pdf"&gt;ftp://ftp-developpez.com/laurent-dardenne/articles/Windows/PowerShell/TestsUnitairesSousPowerShell/fichiers/Tests-unitaires-sous-PowerShell.pdf&lt;/a&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>ageras</author><pubDate>Thu, 05 Jun 2008 01:35:25 GMT</pubDate><guid isPermaLink="false">NEW POST: Tutorial (French language) 20080605013525A</guid></item><item><title>NEW POST: Tutorial</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=10946</link><description>&lt;div style="line-height: normal;"&gt;thanks very much! I will!&lt;br&gt;
&lt;/div&gt;</description><author>ageras</author><pubDate>Thu, 05 Jun 2008 01:34:03 GMT</pubDate><guid isPermaLink="false">NEW POST: Tutorial 20080605013403A</guid></item><item><title>NEW POST: Test results in XML format?</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=29039</link><description>&lt;div style="line-height: normal;"&gt;&lt;br&gt;
&lt;div style="border-style:dotted none;border-color:rgb(170, 170, 170) -moz-use-text-color;border-width:0.1em medium;margin:1em 0em 2.5em 3em;padding:0.2em;font-style:italic"&gt;&lt;br&gt;
Kibi78704 wrote:&lt;br&gt;
&lt;span style="font-family:arial"&gt;I've been using this library since roughly January, and have had great success with it.&amp;nbsp; &lt;br&gt;
&lt;br&gt;
I find that I am going to have to extend the library to send output not only to both the console and to a log file, but also to an XML file so that eventually we can store the test results in a custom database.&amp;nbsp; If anyone else has already done this, I'd appreciate an update to the code base.&amp;nbsp; If not,&amp;nbsp;d&lt;span style="font-family:arial"&gt;oes anyone else have need for XML output?&amp;nbsp; If so, I will submit my modifications here; otherwise, I'll keep them for just my company's use.&lt;/span&gt;&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;
Great to hear that you've had some success with it.&amp;nbsp; I have heard that requirement from one other group, albeit for different reasons - they wanted to transform it into HTML and automatically post it to Sharepoint (that's what they do with their Quick Test Pro test results).&amp;nbsp; I can add you as a contributor if you're interested, otherwise just post the code in the forum and I'll commit it on your behalf.&amp;nbsp; Whatever is easier for you.&lt;br&gt;
&lt;/div&gt;</description><author>ageras</author><pubDate>Thu, 05 Jun 2008 01:32:27 GMT</pubDate><guid isPermaLink="false">NEW POST: Test results in XML format? 20080605013227A</guid></item><item><title>NEW POST: Test results in XML format?</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=29039</link><description>&lt;div style="line-height: normal;"&gt;&lt;span style="font-family:arial"&gt;I've been using this library since roughly January, and have had great success with it.  &lt;br&gt;
&lt;br&gt;
I find that I am going to have to extend the library to send output not only to both the console and to a log file, but also to an XML file so that eventually we can store the test results in a custom database.  If anyone else has already done this, I'd appreciate an update to the code base.  If not, d&lt;span style="font-family:arial"&gt;oes anyone else have need for XML output?  If so, I will submit my modifications here; otherwise, I'll keep them for just my company's use.&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;</description><author>Kibi78704</author><pubDate>Wed, 04 Jun 2008 15:23:55 GMT</pubDate><guid isPermaLink="false">NEW POST: Test results in XML format? 20080604032355P</guid></item><item><title>NEW POST: Tutorial (French language)</title><link>http://www.codeplex.com/psexpect/Thread/View.aspx?ThreadId=28630</link><description>&lt;div style="line-height: normal;"&gt;I've created a tutorial (French language):&lt;br&gt;
&lt;a href="ftp://ftp-developpez.com/laurent-dardenne/articles/Windows/PowerShell/TestsUnitairesSousPowerShell/fichiers/Tests-unitaires-sous-PowerShell.pdf"&gt;ftp://ftp-developpez.com/laurent-dardenne/articles/Windows/PowerShell/TestsUnitairesSousPowerShell/fichiers/Tests-unitaires-sous-PowerShell.pdf&lt;/a&gt;
&lt;/div&gt;</description><author>Batchman</author><pubDate>Thu, 29 May 2008 13:33:25 GMT</pubDate><guid isPermaLink="false">NEW POST: Tutorial (French language) 20080529013325P</guid></item><item><title>CREATED ISSUE: Bug in AssertThrows ?</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=16536</link><description>Hello,&lt;br /&gt;no entry is created in &amp;#36;Assertions for the second use case, it this a bug or not &amp;#63;&lt;br /&gt;Thanks.&lt;br /&gt;&lt;br /&gt;&amp;#35; -------- begin code &lt;br /&gt;&amp;#36;Assertions.Clear&amp;#40;&amp;#41;&lt;br /&gt;&amp;#36;msg &amp;#61; &amp;#34;Required.&amp;#34;&lt;br /&gt;&lt;br /&gt; &amp;#35;First&lt;br /&gt;Function Test-Parameter&amp;#40;&amp;#36;Required&amp;#61;&amp;#36;&amp;#40;throw &amp;#36;msg&amp;#41;&amp;#41; &amp;#123; write &amp;#34;...&amp;#34; &amp;#125;&lt;br /&gt;&amp;#36;sbTest &amp;#61; &amp;#123; Test-Parameter Test&amp;#125;&lt;br /&gt;AssertThrows System.Management.Automation.RuntimeException &amp;#36;msg &amp;#36;sbTest &amp;#34;With parameter&amp;#34; &lt;br /&gt;AssertThrows System.Management.Automation.RuntimeException &amp;#36;msg &amp;#36;sbTest &amp;#34;With parameter&amp;#34; -Intent &amp;#36;Intention.ShouldFail &lt;br /&gt;&lt;br /&gt; &amp;#35;Second&lt;br /&gt;Function Test-Parameter&amp;#40;&amp;#36;Required&amp;#61;&amp;#36;&amp;#40;throw &amp;#36;msg&amp;#41;&amp;#41; &amp;#123; write &amp;#34;fait qq chose&amp;#34;&amp;#124;out-null&amp;#125;&lt;br /&gt;   &amp;#35;no assertion&lt;br /&gt;AssertThrows System.Management.Automation.RuntimeException &amp;#36;msg &amp;#36;sbTest &amp;#34;With parameter&amp;#34;&lt;br /&gt;   &amp;#35;No assertion &lt;br /&gt;AssertThrows System.Management.Automation.RuntimeException &amp;#36;msg &amp;#36;sbTest &amp;#34;With parameter&amp;#34; -Intent &amp;#36;Intention.ShouldFail &lt;br /&gt;&lt;br /&gt;&amp;#36;sbTest &amp;#61; &amp;#123; Test-Parameter &amp;#125;&lt;br /&gt;AssertThrows System.Management.Automation.RuntimeException &amp;#36;msg &amp;#36;sbTest &amp;#34;With no parameter&amp;#34;  &lt;br /&gt;RaiseAssertions&lt;br /&gt;</description><author>Batchman</author><pubDate>Sat, 10 May 2008 14:36:53 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: Bug in AssertThrows ? 20080510023653P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Kibi78704 ** &lt;p&gt;.NET &amp;#38; PowerShell are new to me, so this is all probably just a newbie mistake on my part.  I&amp;#39;ll check out your suggestions.  Thanks for the pointers&amp;#33;&lt;/p&gt;&lt;p&gt;BTW - the only reason I was deep-checking the entire data structure was because I was not getting the results I expected.  I&amp;#39;d love to be able to do one and only one assert on the &amp;#42;appropriate&amp;#42; object for the verification.&lt;/p&gt;</description><author>Kibi78704</author><pubDate>Fri, 18 Jan 2008 20:41:56 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118084156P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Kibi78704 ** &lt;p&gt;I believe that I am not using System.Data.Dataset correctly, and that is the actual problem, rather than your code.&lt;/p&gt;</description><author>Kibi78704</author><pubDate>Fri, 18 Jan 2008 20:34:14 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118083414P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: ageras ** &lt;p&gt;Sorry - some background - sp_table_validation is a SQL Server stored procedure.&lt;/p&gt;</description><author>ageras</author><pubDate>Fri, 18 Jan 2008 18:04:20 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118060420P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: ageras ** &lt;p&gt;Yes, it looks like a framework feature and how they have implemented the .Equals method on those objects.  You might be able to write a function for getting the CRC for the contents and use that as the basis for comparison instead of deep-checking the entire data structure in your test code.  Look at the help documentation for sp_table_validation for an example of what I mean - it generates a CRC for an entire table.&lt;/p&gt;</description><author>ageras</author><pubDate>Fri, 18 Jan 2008 18:02:31 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118060231P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Kibi78704 ** &lt;p&gt;I followed your suggestion.  It looks like the problem is deeper than your code.&lt;/p&gt;&lt;p&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/p&gt;&lt;p&gt;Code Excerpt&amp;#58;&lt;/p&gt;&lt;p&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;expQuery &amp;#61; &amp;#36;expQuery&amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows&lt;br /&gt;  write-host &amp;#34;actQuery &amp;#61; &amp;#36;actQuery&amp;#34;&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset.Tables -eq &amp;#36;expDataset.Tables&amp;#41;   &amp;#123;write-host &amp;#34;actDataset.Tables &amp;#61; expDataset.Tables&amp;#34;&amp;#125;&lt;br /&gt;    else  &amp;#123;write-host &amp;#34;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&amp;#34;&amp;#125;&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset -eq &amp;#36;expDataset&amp;#41; &amp;#123;write-host &amp;#34;actDataset &amp;#61; expDataset&amp;#34;&amp;#125;&lt;br /&gt;    else &amp;#123;write-host &amp;#34;actDataset &amp;#33;&amp;#61; expDataset&amp;#34;&amp;#125;&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset.Tables -eq &amp;#36;expDataset.Tables&amp;#41; &amp;#123;write-host &amp;#34;actDataset.Tables &amp;#61; expDataset.Tables&amp;#34;&amp;#125;&lt;br /&gt;    else&amp;#123;write-host &amp;#34;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&amp;#34;&amp;#125;&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -eq &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;&amp;#41; &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93; &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;&amp;#34;&amp;#125;&lt;br /&gt;    else &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93; &amp;#33;&amp;#61; expDataset.Tables&amp;#91;0&amp;#93;&amp;#34;&amp;#125;&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -eq &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table&amp;#41; &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table&amp;#34;&amp;#125;&lt;br /&gt;    else &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#33;&amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table&amp;#34;&amp;#125;&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  if &amp;#40;&amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -eq &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row&amp;#41; &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table.Row&amp;#34;&amp;#125;&lt;br /&gt;    else &amp;#123;write-host &amp;#34;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#33;&amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table.Row&amp;#34;&amp;#125;&lt;br /&gt;  RaiseAssertions&lt;/p&gt;&lt;p&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/p&gt;&lt;p&gt;Output to Console&amp;#58;&lt;/p&gt;&lt;p&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/p&gt;&lt;p&gt;expQuery &amp;#61; select count&amp;#40;&amp;#42;&amp;#41; from maintenance44.dbo.Process&lt;br /&gt;                                                                                                                     45&lt;br /&gt;actQuery &amp;#61; select count&amp;#40;&amp;#42;&amp;#41; from maintenance56.dbo.Process&lt;br /&gt;                                                                                                                     45&lt;br /&gt;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&lt;br /&gt;actDataset &amp;#33;&amp;#61; expDataset&lt;br /&gt;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93; &amp;#33;&amp;#61; expDataset.Tables&amp;#91;0&amp;#93;&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table.Row&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;46 AM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;46 AM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.DataTableCollection&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;46 AM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDPASS,PASSED,TC-Process-test&lt;/p&gt;&lt;p&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/p&gt;&lt;p&gt;expQuery &amp;#61; select count&amp;#40;&amp;#42;&amp;#41; from maintenance44.dbo.ProcessLog&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;actQuery &amp;#61; select count&amp;#40;&amp;#42;&amp;#41; from maintenance56.dbo.ProcessLog&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&lt;br /&gt;actDataset &amp;#33;&amp;#61; expDataset&lt;br /&gt;actDataset.Tables &amp;#33;&amp;#61; expDataset.Tables&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93; &amp;#33;&amp;#61; expDataset.Tables&amp;#91;0&amp;#93;&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table&lt;br /&gt;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#61; expDataset.Tables&amp;#91;0&amp;#93;.Table.Row&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDFAIL,FAILED,TC-ProcessLog-Should display on console in yellow-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDFAIL,FAILED,TC-ProcessLog-Should display on console in yellow-test,System.Data.DataTableCollection expected but was System.Data.DataTableCollection&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDFAIL,FAILED,TC-ProcessLog-Should display on console in yellow-test,Table expected but was Table&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDFAIL,PASSED,TC-ProcessLog-Should display on console in yellow-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;18&amp;#47;2008 11&amp;#58;12&amp;#58;47 AM,SHOULDFAIL,PASSED,TC-ProcessLog-Should display on console in yellow-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;/p&gt;&lt;p&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;/p&gt;</description><author>Kibi78704</author><pubDate>Fri, 18 Jan 2008 17:33:15 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118053315P</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: ageras ** &lt;p&gt;I&amp;#39;ll work up my own example first - but one thing you can try is to use the -eq operator with the comparisons that unexpectedly fail - and see if it reports an equality.&lt;/p&gt;</description><author>ageras</author><pubDate>Fri, 18 Jan 2008 01:16:08 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080118011608A</guid></item><item><title>COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: Kibi78704 ** &lt;p&gt;I&amp;#39;ll be happy to send you my code, if it will help.  I&amp;#39;ve used your TestLib.ps1 &amp;#38; TestLibConstants.ps1 paradigm for creating my own library &amp;#38; constants.&lt;/p&gt;</description><author>Kibi78704</author><pubDate>Thu, 17 Jan 2008 22:31:36 GMT</pubDate><guid isPermaLink="false">COMMENTED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080117103136P</guid></item><item><title>CREATED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet</title><link>http://www.codeplex.com/psexpect/WorkItem/View.aspx?WorkItemId=14797</link><description>I am verifying a series of SQL query results, and need to assert that the results are equal.  At the moment, I am just comparing the count of rows in the same table in two separate database instances.  I can easily get the results instantiated in objects of type System.Data.DataSet, but am having an interesting time trying to compare them.&lt;br /&gt;&lt;br /&gt;I am using a customized version of Lee Holmes&amp;#39; Invoke-SqlCommand.ps1 &amp;#40;see http&amp;#58;&amp;#47;&amp;#47;www.leeholmes.com&amp;#47;blog&amp;#47;InteractingWithSQLDatabasesInPowerShellInvokeSqlCommand.aspx&amp;#41; to run my queries, but the basic design is the same.  The query results are returned in a couple of instances of System.Data.DataSet called &amp;#36;expDataset and &amp;#36;actDataset. &lt;br /&gt;&lt;br /&gt;I tested with 3 sets of values.  Below are code excerpts and a copy of the displayed results.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Code excerpt&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  write-host &amp;#34;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#34;&lt;br /&gt;  write-host &amp;#34; &amp;#34;&lt;br /&gt;  &amp;#36;expDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  &amp;#36;actDataset.Tables &amp;#124; Select-Object -Expand Rows -Last 1&lt;br /&gt;  AssertEqual &amp;#36;expDataset &amp;#36;actDataset -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables &amp;#36;actDataset.Tables -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93; &amp;#36;actDataset.Tables&amp;#91;0&amp;#93; -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  AssertEqual &amp;#36;expDataset.Tables&amp;#91;0&amp;#93;.Table.Row &amp;#36;actDataset.Tables&amp;#91;0&amp;#93;.Table.Row -Label &amp;#36;label -Intent &amp;#36;intent&lt;br /&gt;  RaiseAssertions&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&amp;#42;Display&amp;#58;&amp;#42;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62; C&amp;#58;&amp;#92;global&amp;#92;SPi&amp;#92;TestAssertEqual-TableCount.ps1&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLibConstants.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;Security Warning&lt;br /&gt;Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your&lt;br /&gt;computer. Do you want to run C&amp;#58;&amp;#92;global&amp;#92;psexpect&amp;#92;Ps1TestLib&amp;#92;src&amp;#92;TestLib.ps1&amp;#63;&lt;br /&gt;&amp;#91;D&amp;#93; Do not run  &amp;#91;R&amp;#93; Run once  &amp;#91;S&amp;#93; Suspend  &amp;#91;&amp;#63;&amp;#93; Help &amp;#40;default is &amp;#34;D&amp;#34;&amp;#41;&amp;#58; r&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                                                                                                                Column1&lt;br /&gt;                                                                                                                -------&lt;br /&gt;                                                                                                                     45&lt;br /&gt;                                                                                                                     45&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,System.Data.DataTableCollection expected but was System.Data.Data&lt;br /&gt;TableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,FAILED,TC-Process-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDPASS,PASSED,TC-Process-test&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                 156067&lt;br /&gt;                                                                                                                 156224&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,System.Data.DataTableCollection expected but was System.Data.D&lt;br /&gt;ataTableCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;06 PM,SHOULDFAIL,FAILED,TC-ProcessLog-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-ProcessLog-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&amp;#42;&lt;br /&gt;&lt;br /&gt;                                                                                                                   8904&lt;br /&gt;                                                                                                                   8905&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataSet expected but was System.Data.DataSet&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,System.Data.DataTableCollection expected but was System.Data.DataTa&lt;br /&gt;bleCollection&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,FAILED,TC-Error-test,Table expected but was Table&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;1&amp;#47;17&amp;#47;2008 2&amp;#58;45&amp;#58;07 PM,SHOULDFAIL,PASSED,TC-Error-test,Expected &amp;#39;FAILED&amp;#39; but was &amp;#39;PASSED&amp;#39;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PS C&amp;#58;&amp;#92;Global&amp;#92;SPi&amp;#62;&lt;br /&gt;</description><author>Kibi78704</author><pubDate>Thu, 17 Jan 2008 21:01:50 GMT</pubDate><guid isPermaLink="false">CREATED ISSUE: AssertEqual is not playing nicely with System.Data.DataSet 20080117090150P</guid></item><item><title>UPDATED RELEASE: 0.4 Alpha (Jan 08, 2008)</title><link>http://www.codeplex.com/psexpect/Release/ProjectReleases.aspx?ReleaseId=9727</link><description>Includes functions and aliases for them so that you can write test scripts in the &amp;#39;given-when-then&amp;#39; behaviour-driven development &amp;#40;BDD&amp;#41; style.  This time the source code for the sample applications is included, not just the Powershell script.&lt;br /&gt;&lt;br /&gt;The BDD example is in samples&amp;#92;Test-VcsBehave.ps1.</description><author></author><pubDate>Tue, 08 Jan 2008 21:14:39 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: 0.4 Alpha (Jan 08, 2008) 20080108091439P</guid></item><item><title>UPDATED RELEASE: 0.4 Alpha (Jan 08, 2008)</title><link>http://www.codeplex.com/psexpect/Release/ProjectReleases.aspx?ReleaseId=9727</link><description>Includes aliases so that you can write test scripts in the &amp;#39;given-when-then&amp;#39; behaviour-driven development &amp;#40;BDD&amp;#41; style.  This time the source code for the sample applications is included, not just the Powershell script.&lt;br /&gt;&lt;br /&gt;The BDD example is in samples&amp;#92;Test-VcsBehave.ps1.</description><author></author><pubDate>Tue, 08 Jan 2008 21:13:45 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: 0.4 Alpha (Jan 08, 2008) 20080108091345P</guid></item><item><title>UPDATED RELEASE: 0.4 Alpha</title><link>http://www.codeplex.com/psexpect/Release/ProjectReleases.aspx?ReleaseId=9727</link><description>Includes aliases so that you can write test scripts in the &amp;#39;given-when-then&amp;#39; behaviour-driven development &amp;#40;BDD&amp;#41; style.  This time the source code for the sample applications is included, not just the Powershell script.&lt;br /&gt;&lt;br /&gt;The BDD example is in samples&amp;#92;Test-VcsBehave.ps1.</description><author></author><pubDate>Tue, 08 Jan 2008 21:13:22 GMT</pubDate><guid isPermaLink="false">UPDATED RELEASE: 0.4 Alpha 20080108091322P</guid></item><item><title>UPDATED WIKI: user guide</title><link>http://www.codeplex.com/psexpect/Wiki/View.aspx?title=user guide&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
&lt;h2&gt;
PSExpect - PowerShell Scripts for Testing
&lt;/h2&gt; &lt;br /&gt;&lt;h3&gt;
Installation
&lt;/h3&gt; &lt;br /&gt;The PowerShell Scripts for Testing is a function library that implements the familiar xUnit-style assert* statements in PowerShell, Microsoft's new scripting language and command shell.&lt;br /&gt; &lt;br /&gt;To be able to use the function library, you must have the following on your computer:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Microsoft .NET Framework 2.0&lt;/li&gt;&lt;li&gt;Microsoft PowerShell 1.0&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;To install the function library, follow these steps:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Obtain the source code from the PowerShell Scripts for Testing site http://www.codeplex.com/psexpect&lt;/li&gt;&lt;li&gt;Before un-zipping the downloaded source code, right-click on the .zip archive file and view the file properties.&lt;/li&gt;
&lt;/ol&gt;If you see a message that says, &amp;quot;This file came from another computer and might be blocked to help protect this computer&amp;quot;&lt;br /&gt;then click the 'Unblock' button beside the message.  This will cause Powershell to treat the scripts as local when&lt;br /&gt;you go to run them.  Note - do this BEFORE unzipping the files to save yourself some time.&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Unzip the library files into a known location on your hard drive, something like c:\global\psexpect (does not have&lt;/li&gt;
&lt;/ol&gt;to be in your path).&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Ensure that you have set the execution policy on your machine to match your expectations.  For example, if you&lt;/li&gt;
&lt;/ol&gt;want to run local scripts that are unsigned (as the scripts are provided in PSExpect) then change the execution policy &lt;br /&gt;to 'Unrestricted'.  The commands you will need are get-executionpolicy and set-executionpolicy.  Remember - only do&lt;br /&gt;this if you understand what it means.  See http://technet.microsoft.com/en-us/library/bb978644.aspx?wt.slv=RightRail for&lt;br /&gt;more information.&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Run the provided library test script by first navigating to the folder it is located in&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;set-location &amp;lt;&amp;lt;install-dir&amp;gt;&amp;gt;\Ps1TestLib\src&lt;br /&gt; &lt;br /&gt;replacing &amp;lt;&amp;lt;install-dir&amp;gt;&amp;gt; with the location where you unzipped the downloaded files, and then running the script&lt;br /&gt;using the command,&lt;br /&gt; &lt;br /&gt;.\TestAll.ps1&lt;br /&gt; &lt;br /&gt;Note: Alternatively, you can run the script by specifying it's full path at the Powershell command prompt.&lt;br /&gt; &lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Confirm that the script ran.  There is a mix of passing and failing test conditions.  All of the test cases that have labels ending with &amp;quot;-test&amp;quot; should be marked as having PASSED.  In addition, you should see a file created in the same directory that contains log entries - one per assert statement - that are a record of the test run.&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;Note: Test conditions that fail are presented in RED in the console and ones that pass are presented in GREEN.  You will also see YELLOW in the console output to represent tests that are designed to fail.  You will see some errors thrown during the tests for AssertThrows that you can safely ignore that contain the text, &lt;br /&gt; &lt;br /&gt;'Get-WmiObject : Command execution stopped because the shell variable &amp;quot;ErrorActionPreference&amp;quot; is set to Stop: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)'.  &lt;br /&gt; &lt;br /&gt;These errors are expected, getting the error does not mean that you have to make changes to your Powershell environment or to the shell you are executing the tests in.&lt;br /&gt; &lt;br /&gt;Note: The last couple of assertions test the Windows service pack level and the Windows installation date.  These are there for illustration purposes on using Windows Management Instrumentation (WMI) from Powershell.  Running WMI easily is one of Powershell's strengths and I wanted to demonstrate it to the masses.&lt;br /&gt;  &lt;br /&gt;If these assertions FAIL on your machine, you can adjust them test itself to make it pass.  For instance, if you are running Windows XP SP2, then the service level test should specify '2' as the expected result.  If you're running Vista (as of Jan. 1, 2008) then the service pack level would be '0'. You can modify the installation date test in a similar way to see if it passes or fails.&lt;br /&gt; &lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Use any of the provided library test scripts TestAssert*.ps1 as an example for getting your own test script started, or see the samples in the samples folder.&lt;/li&gt;&lt;li&gt;Also included in the /doc folder is a syntax highlighting file for EditPadPro (http://www.editpadpro.com/).&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;h3&gt;
Usage Guide
&lt;/h3&gt; &lt;br /&gt;There are some unique features in the PowerShell Scripts for Testing functions that distinguish it from other testing frameworks such as xUnit.  In the following text, 'test condition' refers to any Assert* statement.&lt;br /&gt; &lt;br /&gt;First, when the test script runs and evaluates a test condition, there is a log entry created in the file referred to by the variable $LogFileName.  You can modify the default simply by re-assigning the value of this variable at any time in your script.  The log file is intended to provide a digital record of a test run.  You can eliminate this feature by setting $LogFileName = $null.&lt;br /&gt; &lt;br /&gt;Second, every test condition can be supplied with a &amp;quot;label&amp;quot; parameter - this label parameter appears in the log entry every time the test condition is evaluated.  The label is intended to provide a trace back into your test script so that you can quickly identify a failing test condition.&lt;br /&gt; &lt;br /&gt;The label for the test condition can also be used to limit the test conditions that run.  The variable $TestConditionFilter is a regular expression that defaults to match every label - you can set it to any valid regular expression.  If the test condition label matches the regular expression in that variable, then it will be evaluated.&lt;br /&gt; &lt;br /&gt;Similarly, the variable $RaiseAssertionFilter limits the test condition results that are displayed to the console during a test run.  It defaults so that every test condition result is displayed, but you can change that by setting this variable to any valid regular expression.  This filter applies to the combination of the result of the test condition as well as the label so that you can raise only failed test results with a particular label.&lt;br /&gt; &lt;br /&gt;&lt;i&gt;Displays results from only test conditions that failed&lt;/i&gt;&lt;br /&gt;$RaiseAssertionFilter = $FailPrefix&lt;br /&gt; &lt;br /&gt;&lt;i&gt;Displays results from failed test conditions that have the word 'test' in the label&lt;/i&gt;&lt;br /&gt;$RaiseAssertionFilter = $FailPrefix + &amp;quot;*test&amp;quot;&lt;br /&gt; &lt;br /&gt;Ideally the rest of the library is straight-forward to use based on your experience with NUnit or some other xUnit testing framework.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
FAQ
&lt;/h3&gt;&lt;b&gt;Why are there so many functions when I can just use AssertBlock for everything?&lt;/b&gt;&lt;br /&gt;This is something that Jeffrey Snover pointed out when I first asked about unit testing in PowerShell (I had originally suggested cmdlets with an 'assert' verb.  He even wrote an AssertBlock function to demonstrate it.  My own answer was that the tester's intentions were clearer if aptly-named functions were used.  I asked around and found another good answer to come from Brian Marick - that the other functions are there so that the error message was more specific if there was a failing assertion.  My advice - make your intentions clear so that other testers don't have to evaluate a script block in their heads.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Why not just provide a wrapper around NUnit?&lt;/b&gt;&lt;br /&gt;I almost did this, but opted for a simpler implementation that has no external (at least external to PowerShell) dependencies.  A dependency on NUnit might be a barrier to running smoke tests on production servers.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Why the log file?&lt;/b&gt;&lt;br /&gt;As a tester, I need a record of tests that are run - whether they pass or fail - for audit and for other test effectiveness studies.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Why the labels?&lt;/b&gt;&lt;br /&gt;At higher test levels, it becomes less and less convenient to maintain a &amp;quot;one test method, one test assertion&amp;quot; philosophy that would enable you to trace exactly to the test condition that failed.  There are almost always multiple test conditions for each user story at the acceptance test level, for example, and this means many test assertions within a single test script.  The label is there to regain the traceability we typically would encode within xUnit as part of automated unit testing.&lt;br /&gt; &lt;br /&gt;&lt;b&gt;Why is everything global?&lt;/b&gt;&lt;br /&gt;I'm not sure this is the right thing to do, yet. Answering this question is on our to-do list.  We felt it was more important to get something out there and try it than to worry about the scope question.&lt;br /&gt;
&lt;/div&gt;</description><author>ageras</author><pubDate>Tue, 08 Jan 2008 21:03:55 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: user guide 20080108090355P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/psexpect/Wiki/View.aspx?title=Home&amp;version=8</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;PowerShell Scripts for Testing&lt;/b&gt;&lt;br /&gt;Microsoft PowerShell is Microsoft's new scripting language and shell first implemented and released in late 2006 in preparation for the Exchange Server 2007 release.  Its initial audience seems to be systems administrators, and many of the built-in cmdlets (command-lets) focus on making calls to infrastructure-oriented features such as Windows Management Instrumentation (WMI) and Active Directory (ADSI).&lt;br /&gt; &lt;br /&gt;This project envisions an expanded purpose for PowerShell - testing.  With simple supporting functions, we believe that PowerShell could be used for application testing and infrastructure testing.  In fact, it is well-suited for such purposes given its support for control structures, exception handling, and access to .NET system classes.&lt;br /&gt; &lt;br /&gt;All that is missing is a set of xUnit-style assert* functions.  Given this library, developers that are used to NUnit or other testing tools that use the assert* metaphor can adapt quickly to writing tests in PowerShell.  Some of the testing that we envision this could be used for:&lt;br /&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;GUI bypass testing - write workflow scenarios that are either data- or keyword-driven that call your business services layer directly&lt;/li&gt;&lt;li&gt;Behaviour Driven Development - write test cases in the 'given-when-then' style of writing functional test scripts&lt;/li&gt;&lt;li&gt;GUI testing - adapt the workflow scenarios from GUI bypass testing to your GUI - PowerShell can access .NET classes from both custom or system namespaces&lt;/li&gt;&lt;li&gt;deployment testing - create a script that verifies your release went as expected - check running processes, services, database metadata, database content, application file versions, configuration file contents, etc.&lt;/li&gt;&lt;li&gt;infrastructure testing - create a script that verifies the hardware, operating system, running services, running processes, etc. match your expectations&lt;/li&gt;&lt;li&gt;... (the list goes on and on)&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;There is a companion blog for PSExpect here: &lt;a href="http://testfirst.spaces.live.com" class="externalLink"&gt;http://testfirst.spaces.live.com&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;a href="http://www.codeplex.com/psexpect/Wiki/View.aspx?title=Project%20Charter&amp;amp;referringTitle=Home"&gt;Project Charter&lt;/a&gt; &lt;a href="http://www.codeplex.com/psexpect/Wiki/View.aspx?title=User%20Guide&amp;amp;referringTitle=Home"&gt;User Guide&lt;/a&gt; &lt;a href="http://www.codeplex.com/psexpect/Wiki/View.aspx?title=Data-driven%20Testing%20Using%20Excel&amp;amp;referringTitle=Home"&gt;Data-driven Testing Using Excel&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>ageras</author><pubDate>Tue, 08 Jan 2008 21:00:56 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080108090056P</guid></item></channel></rss>