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

Running tests under MSTest on TeamCity never launches the app

3 Answers 114 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 14 Nov 2013, 11:10 PM
We are attempting to run WPF tests via TestStudio under TeamCity.  I have been trying to avoid using a hard coded WPF application path, as we are letting TeamCity checkout the source code to a temp directory.  I set up an environment variable the tests to use an environment variable to locate the application but we running under TeamCity's MSTest to be %env.teamcity.build.checkoutDir%\project\bin\Release\project.exe.  While using the VS TestStudio plug-in the application loads however, when running on TeamCity it is never able to locate the application.


[16:53:13]
[Step 2/4] MSTest

[16:53:14][MSTest] Found 4 test definitions.

[16:53:14][MSTest] clickbutton

[16:53:14][clickbutton] ------------------------------------------------------------ '11/14/2013 4:52:14 PM' - Using .Net Runtime version: '4.0.30319.17929' for test execution. Build version is '2013.1.1114.0'. '11/14/2013 4:52:14 PM' - Starting execution.... '11/14/2013 4:52:18 PM' - Failure detected during execution. Details: ------------------------------------------------------------ '11/14/2013 4:52:18 PM' - System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\TeamCity\buildAgent\temp\buildTmp\testuser_VM-UNITTEST 2013-11-14 16_52_01\Out\%env.teamcity.build.checkoutDir%\project\bin\Release\project.exe' or one of its dependencies. The system cannot find the file specified. File name: 'file:///C:\TeamCity\buildAgent\temp\buildTmp\testuser_VM-UNITTEST 2013-11-14 16_52_01\Out\%env.teamcity.build.checkoutDir%\project\bin\Release\project.exe' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ValidateApplication(String file) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWpf(ExecutionEngineCreateParams initParams) at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp) at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. ------------------------------------------------------------ '11/14/2013 4:52:19 PM' - Test completed!

 

3 Answers, 1 is accepted

Sort by
0
Mario
Telerik team
answered on 19 Nov 2013, 10:31 PM
Hello John,

Thank you for contacting Telerik Support.

Could you please confirm whether you've setup your Test Studio and TeamCity environment following our documentation? Also provide the the version of TeamCity you are using so we can investigate further on our end.

Regards,
Mario
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Swathi
Top achievements
Rank 1
answered on 11 Mar 2015, 07:07 PM
Hi I am facing a similar issue launch WPF application from the recently uploaded build.
Did you have a chance to find a solution for yours?
Any help/response would be greatly appreciated.
Thanks'!
0
Cody
Telerik team
answered on 13 Mar 2015, 07:27 PM
Hi Swathi,

No we never heard back from John. Please follow Mario's instructions to John and we'll pick things up from there. Also, do you have any logs or error messages for us to study, like what John shared with us?


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Mario
Telerik team
Swathi
Top achievements
Rank 1
Cody
Telerik team
Share this question
or