Home Dashboard Directory Help
Search

Failed to serialize WebTestResultDetails. ... The Web test result details will be lost if the Web test result viewer window is closed by ArdianD


Status: 

Resolved
 as Not Reproducible Help for as Not Reproducible


2
0
Sign in
to vote
Type: Bug
ID: 575762
Opened: 7/16/2010 6:13:10 AM
Access Restriction: Public
0
Workaround(s)
view
2
User(s) can reproduce this bug

Description

Error: System.Exception: An error occurred writing Web test result file 'D:\SourceCode\XXX.IIS.XXXXX\Main\XXX.IIS.XXXXX.PerformanceTest\XXX.IIS.XXXXX.PerfTest2010\TestResults\Perftest _2010-07-13 08_30_25_\In\a8c83b9d-47ea-433c-95f0-b648d2f2da4c\R_Scenario_5_1_1.webtestResult': Failed to serialize WebTestResultDetails.. The Web test result details will be lost if the Web test result viewer window is closed. This seems to be intermittent when saving large webtestResult files into disk.

I tried to deserialize the webtestResult file using the Deserialize method of the WebTestResultDetails class and got the same error as above and the inner error message was "End of Stream encountered before parsing was completed" which leads me to believe that somehow the webtestResult file is not properly written to disk.

The error reported in EventViewer is:

Event Type: Error
Event Source: VSTTExecution
Event Category: None
Event ID: 0
Date: 7/14/2010
Time: 9:46:12 AM
User: N/A
Computer: MY_PC_NAME
Description:
The description for Event ID ( 0 ) in Source ( VSTTExecution ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: (devenv.exe, PID 4536, Thread 28) WebLoadTestAdapter: Exception occurred writing Web test result file 'D:\SourceCode\...\TestResults\Perftest _2010-07-14 09_37_26_\In\38add15d-4e1d-47f8-afe1-3a4708413dbc\R_Scenario_3_1_2.webtestResult': Microsoft.VisualStudio.TestTools.WebTesting.WebTestException: Failed to serialize WebTestResultDetails. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Runtime.Serialization.ObjectIDGenerator.Rehash()
at System.Runtime.Serialization.ObjectIDGenerator.GetId(Object obj, Boolean& firstTime)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.InternalGetId(Object obj, Boolean assignUniqueIdToValueType, Type type, Boolean& isNew)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteString(NameInfo memberNameInfo, NameInfo typeNameInfo, Object stringObject)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteKnownValueClass(NameInfo memberNameInfo, NameInfo typeNameInfo, Object data)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMembers(NameInfo memberNameInfo, NameInfo memberTypeNameInfo, Object memberData, WriteObjectInfo objectInfo, NameInfo typeNameInfo, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMemberSetup(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String memberName, Type memberType, Object memberData, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String[] memberNames, Type[] memberTypes, Object[] memberData, WriteObjectInfo[] memberObjectInfos)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArrayMember(WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Object data)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at Microsoft.VisualStudio.TestTools.WebTesting.WebTestResultDetailsSerializer.Serialize(WebTestResultDetails details, String filePath)
--- End of inner exception stack trace ---
at Microsoft.VisualStudio.TestTools.WebTesting.WebTestResultDetailsSerializer.Serialize(WebTestResultDetails details, String filePath)
at Microsoft.VisualStudio.TestTools.WebStress.WebTestResult.TestCompleted().

I used MDbg debugging tool to try to get closer to the source got a little closer to the source. The error seem to be caused by the process that writes the webtestResults file into the disk. The OutOfMemory exception is thrown at System.Runtime.Serialization.ObjectIDGenerator.Rehash call if the webtestResults file is too large.

The same webtest ran fine in VS2008. I believe this is the same as bug id 478165.
Details
Sign in to post a comment.
Posted by Tumatawhero on 11/8/2010 at 4:28 PM
I too am receiving this error when publishing the results to TFS. I have set up a batch file to run as a scheduled service that runs mstest and publishes the result to TFS. 2 out of the 3 times this has run after clicking on the test Results in Visual Studio I get the error. I am using VS 2010 ultimate.
Here is my batch file script

::Set environment variables for VS Tools
call "D:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

::Map network drive where the Test script are located
net use x: "\\<buildservername>\builds\Clarity Web Test Builds\Clarity Web Test Builds_20101108.1\Clarity add a child Web Test"

::CD X Drive
x:

ping -n 2 127.0.0.1

::run the mstest
MSTEST /testcontainer:"PROD List all resouc.webtest" /publish:"http://<servname>:8080/tfs/Software Support - Other" /publishbuild:"vstfs:///Build/Build/4" /teamproject:"Clarity" /platform:"Any CPU" /flavor:"Debug"

::Change to C Drive before removing X Drive
c:

net use x: /delete

After the batch executes it says published successfully to TFS. Well I assume it does as it does appear in TFS, just not correctly :-/
Posted by Microsoft on 8/2/2010 at 6:15 AM
Thanks for reporting the issue.
We tried with large web tests but couldn't reproduce the issue in our local lab. One web test was having 5000 requests and 20% of requests were having reponse size as large as 10MB. Size of web test result file was approximately 25MB. We even tried on low config client as well but no help.
If you see this issue again then, if possible, please share your web test and web test result file as well so that we can try to repro it.

Thanks.
Posted by Microsoft on 7/18/2010 at 6:56 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by Microsoft on 7/16/2010 at 5:05 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.