This is a migrated thread and some comments may be shown as answers.

Cannot build test project with WebUI 2011 Runtime Edition in TFS

14 Answers 142 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shashi
Top achievements
Rank 1
Shashi asked on 08 Sep 2011, 03:46 PM
Hello,

I am setting up a server to build TestStudio 2011 tests using TestStudio 2011 Runtime in a TFS environment - and run them using Microsoft Test Manager.  See this thread for details of my environment.

I have setup TFS Build Service, created a build controller and build agent, and installed TestStudio 2011 Runtime (2011.1.712.0) on the server.  I have also checked in the 2011 version of the project to TFS - and have created a build definition to build that project. 

The test project builds with no problems on the local computer with the full version of TestStudio 2011 installed.  However, when I try to build it using the build definition, I am getting many instances of each of the following errors:

Error #1:

 

<P>Attempting to load test 
C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC\WebTest1.tstest</P>
<P>Error in line 1 position 373. Element 
contains data from a type that maps to the name 
deserializer has no knowledge of any type that maps to this name. Consider using 
a DataContractResolver or add the type corresponding to 'HtmlFindExpression' to 
the list of known types - for example, by using the KnownTypeAttribute attribute 
or by adding it to the list of known types passed to DataContractSerializer.</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at ReadKeyValuePairOfTechnologyTypeanyTypeHXKb0FV5FromXml(XmlReaderDelegator 
, XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] 
)</P>
<P>at 
System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at 
ReadArrayOfKeyValuePairOfTechnologyTypeanyTypeHXKb0FV5FromXml(XmlReaderDelegator 
, XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , 
CollectionDataContract )</P>
<P>at 
System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at ReadFindExpressionElementFromXml(XmlReaderDelegator , 
XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] 
)</P>
<P>at 
System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at ReadElementDescriptorFromXml(XmlReaderDelegator , 
XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] 
)</P>
<P>at 
System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at ReadArrayOfElementDescriptorFromXml(XmlReaderDelegator , 
XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , 
CollectionDataContract )</P>
<P>at 
System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String 
ns)</P>
<P>at ReadWebAiiTestFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext 
, XmlDictionaryString[] , XmlDictionaryString[] )</P>
<P>at 
System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator 
xmlReader, XmlObjectSerializerReadContext context)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract 
dataContract, XmlReaderDelegator reader)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
reader, String name, String ns, Type declaredType, DataContract& 
dataContract)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator 
xmlReader, Type declaredType, DataContract dataContract, String name, String 
ns)</P>
<P>at 
System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator 
xmlReader, Boolean verifyObjectName, DataContractResolver 
dataContractResolver)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator 
reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)</P>
<P>at 
System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader 
reader)</P>
<P>at ArtOfTest.WebAii.Design.ProjectModel.Project.GetTestFromPath(String 
testPath, LoadTestResult& result, Boolean reloading)</P>

Error #2:

 

<P>CreateAppointment.aii.cs(85,27): error CS1061: 'FusionUITestsPOC.Pages' does 
not contain a definition for 'QAAUTOSYNC1228183918' and no extension method 
'QAAUTOSYNC1228183918' accepting a first argument of type 
'FusionUITestsPOC.Pages' could be found (are you missing a using directive or an 
assembly reference?) 
[C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC\FusionUITestsPOC.csproj]</P>

The project was upgraded from WebUI 2010 Developer and mostly contains aii,resx and cs files - however, it does contain one tstest file (with associated resx).

The above errors do not appear when the 2010 version of the project is built with its corresponding build definition - and the build definition for the 2011 version is identical to the 2010 version except for the location and name of the solution file to be built.

Any ideas on possible causes of the above build errors?

Note that I have installed TestStudio 2011 Runtime and I believe I have configured it to run as an Execution Server. However, I am not sure if I have done everything I need to do - there is a dialog that comes up with three tabs - Machine configuration, Test Run information and Test Run results.  I am not sure what (if anything) I should specify on that dialog for my situation (I only want to use it the Runtime for building and running the tests - do not need scheduling and other capabilities).

I also suspect that the second error may be a result of the first error - I see that none of the aii files are in the drop folder specified in the build definition after the build is complete (all the aii files are in the drop folder after a build using the 2010 build definition).

I need to get this up and running pretty quickly - so your prompt response to this would be very much appreciated.

Thanks,
Shashi 

14 Answers, 1 is accepted

Sort by
0
Shashi
Top achievements
Rank 1
answered on 08 Sep 2011, 04:19 PM
In case this helps, here is the first part of the log (the first error I provided earlier appears right after the last line in the following):

Build started 9/8/2011 10:06:55 AM.
Project "C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC2011.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Project "C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC2011.sln" (1) is building "C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC\FusionUITestsPOC.csproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "obj\Release\".
PreBuildEvent:
@del C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Binaries\*.aii* *.txt *.xml

Could Not Find C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Binaries\*.aii*
GenerateElementsTarget:
InitFunction: ArtOfTest.WebAiiVSIP.CodeGeneration.GenerateElementsTask.Execute()
Project: C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\FusionUITestsPOC\FusionUITestsPOC.csproj
Hostless-mode detected
Loaded assemblies:
Assembly: ArtOfTest.WebAii, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=4fd5f65be123776c
Assembly: Telerik.WebAii.Controls.Html, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=528163f3e645de45
Assembly: Telerik.WebAii.Controls.Xaml, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=528163f3e645de45
Assembly: Telerik.WebAii.Design.Translators.Html, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=528163f3e645de45
Assembly: Telerik.WebAii.Design.Translators.Xaml, Version=2011.1.712.0, Culture=neutral, PublicKeyToken=528163f3e645de45
Loading project into memory
Found 102 tests

Shashi
0
Shashi
Top achievements
Rank 1
answered on 08 Sep 2011, 05:29 PM
Another update:

Upon closer examination of the log file,  I found that there was actually another type of error also occurring:
Attempting to load test C:\Builds\93\Fusion_2010\FusionUITestBuild2011\Sources\Main\Tests\WeUiPoc\FusionUITestsPOC2011\DemoTests\DataDrivenTestBuiltInGrid.aii
  Error in line 1 position 251. Element 'http://artoftest.com/schemas/WebAiiDesignCanvas/1.0.0:AutomationStep' contains data from a type that maps to the name 'http://artoftest.com/schemas/WebAiiDesignCanvas/1.0.0:AutomationStep'. The deserializer has no knowledge of any type that maps to this name. Consider using a DataContractResolver or add the type corresponding to 'AutomationStep' to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the list of known types passed to DataContractSerializer.
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
     at ReadAutomationStepListFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString , XmlDictionaryString , CollectionDataContract )
     at System.Runtime.Serialization.CollectionDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Int32 id, RuntimeTypeHandle declaredTypeHandle, String name, String ns)
     at ReadWebAiiTestFromXml(XmlReaderDelegator , XmlObjectSerializerReadContext , XmlDictionaryString[] , XmlDictionaryString[] )
     at System.Runtime.Serialization.ClassDataContract.ReadXmlValue(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.ReadDataContractValue(DataContract dataContract, XmlReaderDelegator reader)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
     at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
     at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
     at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
     at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader)
     at ArtOfTest.WebAii.Design.ProjectModel.Project.GetTestFromPath(String testPath, LoadTestResult& result, Boolean reloading)
   Failed.

This is similar to Error #1 but with one difference:  This references an element in the http://artoftest.com/schemas/WebAiiDesignCanvas/1.0.0 XML namespace whereas Error #1 is looking for an element in the http://artoftest.com/schemas/WebAiiDesignCanvas/2.0.0 XML namespace.

Also, I am able to reproduce these issues with a solution that contains the sample test project which are installed with the product.

Finally, the server building the 2011 version is different from the one building 2010 version - so network issues cannot be ruled out as a cause of this issue.  Please let me know if there are any specific requirements in this area that I need to check on.

I look forward to your prompt response to this issue.

Thanks,
Shashi 
0
Cody
Telerik team
answered on 12 Sep 2011, 05:56 PM
Hello Shashi,

That is a very odd error message. This is happening on a build agent or test agent machine? It's almost as if the Visual Studio plug-in for Test Studio did not get installed. Does this computer have Visual Studio installed on it? Our installer won't install the necessary components for building/running tests as part of a TFS build if VS is not installed.

Greetings,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shashi
Top achievements
Rank 1
answered on 12 Sep 2011, 06:22 PM
Yes - this happens on a build agent/test agent machine (does not happen when building locally on my own machine).  The machine does have Visual Studio installed.  However, it has the TestStudio Runtime installed - not the Developer plug-in (unless the latter is installed with the Runtime version).  I was told that the Runtime was sufficient for building and running the tests (see the following thread):

http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/general-discussions/runtime-edition-question.aspx

In case this was missed in my last posting (which was quite long - sorry about that):

a) The problem does occur when I build the Telerik sample tests on this build agent/test agent machine using the TFS build definition (so it is not my tests that is causing the problem).
b) I have activated the Execution Server component but I am not sure if I have configured it completely/correctly. 

Let me know if you need more information or want to get together for a net meeting.

Shashi   
0
Cody
Telerik team
answered on 13 Sep 2011, 06:08 PM
Hello Shashi,

When you mention "Execution Server" are you referring to our Execution Server that comes with full Test Studio? Just for clarification this is not used by TFS builds. TFS builds will use almost 100% Microsoft code for doing the builds and executing tests... including using it's own "execution server" aka the Microsoft Test Agent for running the test.

I'd like to eliminate a possible installer problem. Can you try installing full Test Studio (instead of Run-Time edition) on this machine, then see if it behaves any differently?

Thanks!

Kind regards,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shashi
Top achievements
Rank 1
answered on 13 Sep 2011, 06:40 PM
Cody,

When I install the Runtime, I see two entries on my Start menu (Start > Telerik > Test Execution 2011.1) - Configure as Execution Server and Configure as Scheduling Server.  That is what I am referring to by "Execution Server".  I see that these are present in the full install as well.

Yes - behavior is different with the full install of TestStudio (trial version of TestStudio Express) - TFS build is successful!

Let me know the next steps given this information.
 
Shashi 
0
Cody
Telerik team
answered on 13 Sep 2011, 06:51 PM
Hi Shashi,

That is actually very good news to me, thanks! It tells me we simply have an install bug with the Run-Time edition. Can you, temporarily, use the full edition while we find and fix this bug? Also, just to confirm, which build of Run-Time is at fault (2011.1.712.0)? Once I have this I'll have my QA department reproduce this problem and then work with our installer group to find and fix the bug.

Greetings,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shashi
Top achievements
Rank 1
answered on 13 Sep 2011, 07:02 PM
Yes - it is version 2011.1.712.0. 

Also, in case this is important, the OS is Windows 2008 Server R2 Enterprise on the server which will host the Runtime version.

Let me know if you need any other information and/or when a fix is available.  Also, if the fix is not going to be quick, an ETA would be much appreciated so we can use it in our planning for the upgrade.

Thanks,
Shashi
0
Accepted
Cody
Telerik team
answered on 16 Sep 2011, 03:52 PM
Hi Shashi,

We were able to reproduce the problem and also confirm the problem appears to be fixed in our latest internal build, which you can download from Telerik.com. There is a known issue with 2011.1.712 Run-Time edition. The installer was missing a WPFToolkit.dll which is required by Test Studio. This has been fixed in 2011.1.829.

If it would be better, I think I can send you just that DLL along with instructions for installing it in the right location so you can continue to use 2011.1.712.

Greetings,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shashi
Top achievements
Rank 1
answered on 16 Sep 2011, 04:08 PM
Thanks, Cody. 

If this works, this is a life-saver.  

Please send me the DLL with instructions. 

Also, how close are we to the next official release?  If it is not close, I will most probably install the latest internal build - however, if it doesn't work, I can then go back to 712.  Please let me know of any known issues with the latest internal build.

Thanks,
Shashi
0
Accepted
Cody
Telerik team
answered on 16 Sep 2011, 04:52 PM
Hi Shashi,

Attached is the WPFToolkit.dll file that was accidentally omitted from the 2011.1.712 installer of Run-Time edition. Just drop the file (after extracting it from the .zip file) into your C:\Windows\Assembly folder.

Kind regards,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cody
Telerik team
answered on 16 Sep 2011, 04:58 PM
Hello Shashi,

P.S. 2011 R2 is due out by the end of September i.e. within 2 weeks. I've seen internal builds of it. It's looking pretty good!

Kind regards,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shashi
Top achievements
Rank 1
answered on 19 Sep 2011, 10:55 PM
Cody,

I just want to let you know that installing build 2011.1.829.0 Runtime edition fixed the build problem.  All my team members and myself have now upgraded to 2011.1.829.0 and are able to build and run the tests locally as well as kick off the tests manually from Microsoft Test Manager.  I did encounter some issues getting tests to be executed using tcm.exe (Test Manager command line) - but it turned out be an issue with the TFS build definitions I created for the migration - this issue is now fixed and I am running all our suites through the command line as we speak (things look good so far).

I encountered a couple of other WebUI-related issues along the way:
It looks like the versions of the references to WebUI dlls in the csproj file and some of the test files were not updated when I opened the tests solution for the first time in the new version. I had to manually update the aii files - and had to delete the references and add them back for the versions to get updated in the csproj file.  This may be a defect in the upgrade (I am not sure) - you may want to have your QA team try and reproduce it (my original project was compatible with 2010.3.1421.0 - although some of the references had a version earlier than that).

Also, it looks like additional xml nodes are added for almost every statement when a 2010 aii file is saved in WebUI 2011 - but this is not automatically done (I have to explicitly save the file for those statements to get added).  I have only done this for a few of the tests.  What is the impact of not having these new xml nodes in the statements?  If these new xml nodes are required, is there a way to update all my aii files without editing and saving each and every one of them (there are almost 100 files in the solution).

Thanks,
Shashi
0
Cody
Telerik team
answered on 20 Sep 2011, 07:41 PM
Hello Shashi,

First I am very glad for the wonderful progress your team has made! It is well deserved given how much effort you all have put into getting the environment set right.

When the "specific version" property of a dll reference is set to true, then it will never get automatically updated. Neither Test Studio nor Visual Studio will ever update the version of a reference in this setting. What you need to do is set Specific Version to False. Once set this way Visual Studio will automatically find the highest version and use that as the reference.

Could you give me some more details about these "additional xml nodes"? I am not aware of such a problem. Where are seeing them (which file)? Can you show me an example?

Best wishes,
Cody
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Shashi
Top achievements
Rank 1
Answers by
Shashi
Top achievements
Rank 1
Cody
Telerik team
Share this question
or