I am running a data driven unit test and I am receiving the following error:
The connection to the controller was lost.
Other detail from the test result summary:
Test run name: 1 rcollet@RCOLLET 2006-07-20 14:13:39
Run result: 0/1 tests passed, 1 failed, 0 skipped
Run configuration: Local Test Run
Submitted by: HSB-CORP\rcollet
Started on: 07/20/2006 2:13:45 PM
Completed on: 07/20/2006 2: 2:17:46 PM
The test code does function properly when used with a small data set. As
the data set size is increased, I encounter the error.
The test is being run in run mode (not debug)
Test purpose:
Compare input and output data exported from an existing system being
migrated to .NET to insure the .NET version creates the same output from the
object.
Test method:
Read input and expected data from a .csv file, place input data into object
properties, place expected properties into another object instance, execute
object method which modifies its properties, use object's equals method to
determine if actual meets expected results.
Test Code:
<code>
<TestMethod()> _
<DeploymentItem("Schema.ini")> _
<DeploymentItem("NormalizedAddresses.csv")> _
<DataSource("System.Data.OleDb", "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=.\;Extended Properties=""text;HDR=No;FMT=Delimited""",
"NormalizedAddresses#csv", DataAccessMethod.Sequential)> _
Public Sub normalizeTest()
Dim target As Address = New Address
Dim expected As New Address
With testContextInstance
Dim row As System.Data.DataRow = .DataRow
target.Address2 = .DataRow("Address2").ToString
target.Address3 = .DataRow("Address3").ToString
target.Address4 = .DataRow("Address4").ToString
target.City = .DataRow("City").ToString
target.State = .DataRow("State").ToString
target.PostalCode = .DataRow("PostalCode").ToString
target.CountryCode3 = .DataRow("CountryCode3").ToString
expected.Address2 = .DataRow("NormalizedAddress2").ToString
expected.Address3 = .DataRow("NormalizedAddress3").ToString
expected.Address4 = .DataRow("NormalizedAddress4").ToString
expected.City = .DataRow("NormalizedCity").ToString
expected.State = .DataRow("NormalizedState").ToString
expected.PostalCode = .DataRow("NormalizedPostalCode").ToString
expected.CountryCode3 =
.DataRow("NormalizedCountryCode3").ToString
End With
target.Normalize()
Assert.IsTrue(target.Equals(expected),
"com.hsb.genesys.core.Address.normalize did not return the expected value.
Target Address: " + vbNewLine + target.ToString + vbNewLine + "Expected
Address:" + vbNewLine + expected.ToString)
End Sub
</code>
Luke Zhang [MSFT] - 21 Jul 2006 08:40 GMT
Hello,
Will this issue be improved if you export the data to a Access MDB database
or SQL server database? CSV file is a data source without index and data
type definition, and may not be trusted if the data is huge.
And, instead of comparing the two objects directly (target and expected),
compare each of their properties, this may help found the root cause of
this issue.
Sincerely,
Luke Zhang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.