running a test with code behind

19 posts, 0 answers
  1. Michael Flynn
    Michael Flynn avatar
    13 posts
    Member since:
    Apr 2010

    Posted 06 Dec 2010 Link to this post

    after adding some custom code to a test and building (ctrl-shift-b) successfully, when I attempt to run this test I get the following error:

    '12/6/2010 10:02:14 AM' - Execution Stage:PreInit , unexpected error during test execution. Error: System.ArgumentException: Unable to find the test class type 'garbage.TPC' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.EnsureTypeExists(Assembly assm, String typeName)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType)
    '12/6/2010 10:02:14 AM' - Execution Stage:PreInit , unexpected error during test execution. Error: System.ArgumentException: Unable to find the test class type 'garbage.TPC' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.EnsureTypeExists(Assembly assm, String typeName)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType)
    '12/6/2010 10:02:14 AM' - Execution Stage:PreInit , unexpected error during test execution. Error: System.ArgumentException: Unable to find the test class type 'garbage.TPC' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.EnsureTypeExists(Assembly assm, String typeName)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType)
    '12/6/2010 10:02:14 AM' - Execution Stage:PreInit , unexpected error during test execution. Error: System.ArgumentException: Unable to find the test class type 'garbage.TPC' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.EnsureTypeExists(Assembly assm, String typeName)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType)
    Execution Stage:PreInit , unexpected error during test execution, Error: System.ArgumentException: Unable to find the test class type 'garbage.TPC' in your test assembly.  Please make sure your test code behind is compiled with your latest changes.

    Like I said, this happens immediately after I compile the code and then attempt to run the test.  Any ideas as to what is going on or how to fix this problem?

    Thanks.
  2. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 08 Dec 2010 Link to this post

    Hi Michael Flynn,

    This error occurs because of one of a couple (or a mix) of conditions being met:

    1. Your test project does not reference the correct assembly that contains the class garbage.TPC
    2. You have not referenced System.EnterpriseServices within your project (which contains the classes for object pooling)
    3. You have not defined the garbage.TPC class within your project

    System.EnterpriseServices is located within:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319 (.NET 4.0)

    To do this in QA edition:

    1. Open QA edition and your project within it
    2. Click on the Project tab if not already there
    3. Click on the Show Settings button in the toolbar
    4. Click on Script Options in the left column
    5. Click on Add Reference and then target the above .dll file

    Add this dll as an assebly reference if not already present within the project. To provide further information on why this is being caused for you, it would be best for us to see an example of the project that is causing the issue. If this is still an issue after confirming the above, can you provide a copy of the project in question (you can use a support ticket to submit it if it contains internal data) in a .zip/.rar compressed format? We'll look for your reply.

    Kind regards,
    Keaegan
    the Telerik team

    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  3. Michael Flynn
    Michael Flynn avatar
    13 posts
    Member since:
    Apr 2010

    Posted 08 Dec 2010 Link to this post

    I am running this thru visual studio.  This is something that just started happening too, it wasn't happening one day and then it started happening.  I made the changes you suggested and it is still having the same problem.  I can't attach a zip file, it is 11 MB and the .rar file is not a valid type for uploading, according to your error message when I attempt it.
  4. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 08 Dec 2010 Link to this post

    Hi Michael Flynn,

    I just sent you an invitation to my DropBox. You can use it to provide us with the zip file in question since it is too large to be attached. If you have an issue using this folder after following the instructions in the email, please let me know. I'll wait for your reply to let me know the project has been deposited in my dropbox. The invitation was sent to the email address for your account (the one for this thread).

    Regards,
    Keaegan
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  5. Michael Flynn
    Michael Flynn avatar
    13 posts
    Member since:
    Apr 2010

    Posted 08 Dec 2010 Link to this post

    I have just uploaded the .rar file into the drop box you provided.
  6. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 08 Dec 2010 Link to this post

    Hi Michael Flynn,

    Thank you for providing your project. I reproduced your error quickly after receiving the file. I show that the file provided was created using version 2010.2.713 of our software (which is different from what I am seeing listed on the inquiry), so I had to first update the file to our Q3 version. After I updated the file, I noticed the same type of error you were receiving:

    '12/8/2010 4:31:48 PM' - System.ArgumentException: Unable to find the test class type 'garbage.domestic' in your test assembly. Please make sure your test code behind is compiled with your latest changes.


    After a little more digging on the provided solution, I saw that your project is experiencing an issue with the reference assemblies for itself. I would advise the following:

    1. Install the Latest Internal build for our Q3 release (if this is not an option, skip to 4)
    2. Open your project in the new build
    3. You will be told you need to update the project to view it, do so
    4. After you open the solution, use the provided .doc file to change the Specific Version property for all references in the project to False

    After I did the above, I was able to easily run your tests from my location without the errors we both saw. Please let me know if your feedback differs from mine after setting up your project this way.

    Regards,
    Keaegan
    the Telerik team

    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  7. Michael Flynn
    Michael Flynn avatar
    13 posts
    Member since:
    Apr 2010

    Posted 09 Dec 2010 Link to this post

    I did not have any warning icons next to any of my files in the solution explorer, not in the references area or anywhere else.  Also, I get no errors or warnings when I try to build.  I changed the Specific Version property for all references in the project to False, rebuilt and had no errors.  When I try to run one of the tests, specifically the one called thirdparty, I am still getting the same error message.
  8. Michael Flynn
    Michael Flynn avatar
    13 posts
    Member since:
    Apr 2010

    Posted 10 Dec 2010 Link to this post

    I upgraded to the latest version of telerik, 2010.3.1109.0.  I upgraded the project, made all of the references unspecific and I am now getting this error:

    '12/10/2010 8:06:33 AM' - Starting execution....
    '12/10/2010 8:06:35 AM' - Detected custom code in test. Locating test assembly: garbage.dll.
    '12/10/2010 8:06:35 AM' - Assembly Found: C:\telerik\garbage\TestResults\mflynn_DIM-3GN5V71 2010-12-10 08_06_32\Out\garbage.dll
    '12/10/2010 8:06:35 AM' - Loading code class: 'garbage.kahala'.
    '12/10/2010 8:06:35 AM' - Failure detected during execution. Details:
    ------------------------------------------------------------
    '12/10/2010 8:06:35 AM' - System.ArgumentException: Unable to find the test class type 'garbage.kahala' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureTypeExists(Assembly assm, String typeName)
       at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(Test test, Settings settings, String deploymentFolder, ExecutionType exeType, Int32 lastStepIndex, DebuggerOptions debuggerOptions)
  9. Keaegan
    Admin
    Keaegan avatar
    126 posts

    Posted 14 Dec 2010 Link to this post

    Hello Michael Flynn,

    That is the Q3 release, however we are on our Q3 Service Pack 1 release. Service pack one will give the version of 2010.3.1213.0. Try the test in this version and let us know if you are still getting the same error. I am unable to get this error from executing your tests locally (though they fail still due to not being able to access the site).

    Kind regards,
    Keaegan
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  10. ravi
    ravi avatar
    7 posts
    Member since:
    Mar 2011

    Posted 03 Jun 2011 Link to this post

    Hello Michael Flynn,

    did you gor this problem fixed.

    I am getting the similar problem in my project can you please give any hepl regaring this.

    Thank you
    Ravi
  11. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 08 Jun 2011 Link to this post

    Hello Ravi,
        this problem usually occurs when you change something in the code behind and you don't rebuild the test project after that. Even very small changes can cause problems. Please rebuild your project in the location you're execution it from.

    Best wishes,
    Stoich
    the Telerik team
    Do you think you know all the new features coming out in Test Studio R1 2011? Think again - we have some surprises and will share them with you in the What's New in Test Studio R1 2011 Webinar on May 12th.
    Register Today!
  12. Lukas
    Lukas avatar
    4 posts
    Member since:
    May 2011

    Posted 05 Jul 2011 Link to this post

    Hello Keagan,

    and what should I do, when I'm recieving the same error msg in stand-alone Test Studio?


    Thank you, Lukas.
  13. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 05 Jul 2011 Link to this post

    Hello Lukas,
        would you please send you us your Test Project so that we may examine the issue. The issue is unlikely to appear if you create a brand new Test Project.

    Greetings,
    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?
  14. Lukas
    Lukas avatar
    4 posts
    Member since:
    May 2011

    Posted 07 Jul 2011 Link to this post

    Hello,

    Yes, if I created completely new Test project, this was OK, byt I wan't to add coded step to already quite huge TP.

    Unfortunately I can not provide it to you, it contains data about the product and I can not share this.

    Is there any other way to solve this issue?


    Thank you, L.

    Edit: I've prepared small sample TP for my problem.
  15. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 07 Jul 2011 Link to this post

    Hi Lukas,
       as a paying customer you're entitled to a GoToMeeting troubleshooting session. Please go ahead and suggest a time and I'll schedule a meeting.
     
    Greetings,
    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?
  16. Chantal
    Chantal avatar
    2 posts
    Member since:
    May 2011

    Posted 13 Jul 2011 Link to this post

    Hello Stoich,


    My proposal is for tomorrow, afternoon time, 14:00 (GMT+2).



    Thank you in advance, Lukas.
  17. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 13 Jul 2011 Link to this post

    Hello Chantal,

    Unfortunately Stoich is leaving for a long vacation today, so he will be unavailable at that time. I will meet with you instead. I am in Austin, Texas, USA which is GMT -6. Looks like 1400 your time is my 7am (if I am the time difference correct). That's a little too early for me. How about your 16:00, my 9am? I will send a meeting invite via email assuming that will work.

    Greetings,
    Cody
    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?
  18. Chantal
    Chantal avatar
    2 posts
    Member since:
    May 2011

    Posted 14 Jul 2011 Link to this post

    Hello Cody,


    Ok, at 4:00 PM (GMT+2). Please send the invitation to my email.

    Thank you, Lukas.
  19. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 14 Jul 2011 Link to this post

    Hello Lukas,

    Just to document what we found and fixed during our GoToMeeting, we discovered that our two required DLL's (Telerik.WebAii.Controls.Html.dll & Telerik.WebAii.Controls.Xaml.dll) were missing from the test projects script references. Once we added them the compile error was resolved.

    Greetings,
    Cody
    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