Can't execute tests after adding a coded step

5 posts, 1 answers
  1. Michael Paterson
    Michael Paterson avatar
    1 posts
    Member since:
    Oct 2009

    Posted 09 Jul 2011 Link to this post

    I created a new project and added a few simple steps.  Runs fine.
    I add a coded step and my project doesn't compile because it can't find type Pages.
    I include Pages.g.cs to my project and I can compile but the test won't run due to the following error:

    ------------------------------------------------------------
    '7/9/2011 1:29:32 PM' - Starting execution....
    '7/9/2011 1:29:37 PM' - Detected custom code in test. Locating test assembly: OsC.Web.UiTests.dll.
    '7/9/2011 1:29:37 PM' - Failure detected during execution. Details:
    ------------------------------------------------------------
    '7/9/2011 1:29:37 PM' - System.IO.FileNotFoundException: Unable to find the code behind assembly. Please make sure you have compiled your code behind without errors before attempting to execute the test. Looking for: C:\Development\Engineering\Main\UiTests\OsC\Web.UiTests\OsC.Web.UiTests\OsC.Web.UiTests\bin\Debug\OsC.Web.UiTests.dll
    If you are running VS 2010, make sure Deployment is checked in your .settings file (in the solution items)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureAssemblyExists(String assembly, String folder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, String binariesFolder, ExecutionType exeType, Guid firstStepGuid, Guid lastStepGuid, IntPtr existingBrowserHandle, DebuggerOptions debuggerOptions)
    ------------------------------------------------------------
    '7/9/2011 1:29:38 PM' - Test completed!

  2. Michael Paterson
    Michael Paterson avatar
    1 posts
    Member since:
    Oct 2009

    Posted 09 Jul 2011 Link to this post

    For some reason the coded step code file (.cs) wasn't set to compile.  This fixed it.
  3. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 10 Jul 2011 Link to this post

    Hi Michael,
       I'm glad to hear you've managed to resolve this.

    This is expected behavior. In the Visual Studio plug-in you will need to manually rebuild the project every time you introduce changes to the code-behind file. Running the test will also compile it in Stand Alone edition of Test Studio but not in the Visual Studio plug-in. 

    Kind regards,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
  4. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 10 Jul 2011 Link to this post

    Stoich,

    it would be nice if the project was automatically built when you run a test (both with Quickexecute and from Test View) - especially since you already support this behavior in the standalone version.  This would make the behavior for tests consistent with VS behavior for other types of executables - as you may know, the project is automatically built when you run the executable associated with the project.

    Shashi
  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 11 Jul 2011 Link to this post

    Hi Shashi,
         thank you for the feedback.

     I'm not sure that would be easy to implement. Regardless I've went ahead and logged this as a Feature Request. You can track its progress here:
    http://www.telerik.com/support/pits.aspx#/public/test-studio/6820

    Kind regards,
    Stoich
    the Telerik team
    Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

    Have you looked at the new Online User Guide for Telerik Test Studio?
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!