Unable to find the test class / method does not exist

2 posts, 0 answers
  1. Eddie
    Eddie avatar
    3 posts
    Member since:
    Dec 2013

    Posted 30 Jul 2015 Link to this post

    I need some help with some problems that's been preventing me from using the test studio.

    Very often when I add a coded step in newly created test, the compilation fails and gives me this error:

        '01/01/2015 14:09:53' - System.ArgumentException: Unable to find the test class type 'TestProject2.WebTest' 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, String binariesFolder)
           at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
           at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

    The test has only a single test step and it's a coded step without any code written.
    If I were to delete the step and clear the script file, then add any steps that aren't coded step, it will have no problem compiling.
    All the other tests that existed before this test runs perfectly fine.
    This problem cannot be resolved by creating new tests, but only by creating a new project.

    There's another error besides the mentioned one that's been occurring just as often, it's also caused by adding a coded step.
    This time the codes compiles without error, but throws an exception when the coded step was hit:

        Exception thrown executing coded step: '[TEST_001_Inbox_Actions_CodedStep] : New Coded Step'.
        The coded step method 'TEST_001_Inbox_Actions_CodedStep' does not exist.

    The step hasn't have any code written to it and the method name is the one that was generated by the test studio.

    There's another version to this problem, sometimes it doesn't throw the exception unless the name of the method is changed.
    Even if I stick to the method name that was originally generated for, the test will compile and run,
    but the codes I've written in that method would have no effect whatsoever.
    My guess is that the code behind did not get updated and the changed code wasn't compiled.

    Product Version: 2014.4.1211.0

  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 03 Aug 2015 Link to this post

    Hello,

    That sounds like a project compilation problem. Basically Test Studio checks for a code-behind file comparing the file date modified with the .DLL modified date. If the script file is newer TS calls the compiler to get the latest .DLL.

    Do you get that in Visual Studio or it's Test Studio IDE where you hit that?

    Also can you please try the latest Test Studio release we publish at the end of July and see if you still get that problem? The exact version is labeled 2015.2.723.

    Regards,
    Konstantin Petkov
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top