Open a project Test Studio VS Plugin in Test Studio StandAlone

4 posts, 1 answers
  1. José
    José avatar
    19 posts
    Member since:
    Mar 2013

    Posted 18 Jun 2013 Link to this post

    Hi,

    I have a project with GUI tests, I try to open the project but i found this error message :"Cannot find code-behind of guiTest.tstest", but the file is there. Why can open but all code-behind in C# isn't charge for the Test Studio StandAlone? what i can do?


    Thanks,

    José Teles
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 18 Jun 2013 Link to this post

    Hi Jose,

    Could you send me please the exact text of the error massage/trace log.

    Try to delete the .dll file in the bin folder of your project folder. Test Studio will recompile the next time you execute the test.

    Please go ahead and send us your test project - we would like to examine it. 
     

    Regards,
    Boyan Boev
    Telerik
    Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
    Reserve your seat today!
  3. José
    José avatar
    19 posts
    Member since:
    Mar 2013

    Posted 18 Jun 2013 Link to this post

    In this moment I can open my project, but i can't run. I give you the log:

    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 184: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 192: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 196: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 238: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 246: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 250: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 278: (CS0168) The variable 'e' is declared but never used
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\Information.cs: Line 507: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes.tstest.cs: Line 121: (CS0168) The variable 'e' is declared but never used
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes.tstest.cs: Line 131: (CS0168) The variable 'ex' is declared but never used
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes.tstest.cs: Line 136: (CS0168) The variable 'exx' is declared but never used
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes2.tstest.cs: Line 88: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes2.tstest.cs: Line 96: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes2.tstest.cs: Line 152: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes2.tstest.cs: Line 154: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesAttributes2.tstest.cs: Line 219: (CS0168) The variable 'e' is declared but never used
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesVersionedAttributes.tstest.cs: Line 91: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Worksheet'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesVersionedAttributes.tstest.cs: Line 99: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesVersionedAttributes.tstest.cs: Line 153: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesVersionedAttributes.tstest.cs: Line 155: (CS0266) Cannot implicitly convert type 'object' to 'Microsoft.Office.Interop.Excel.Range'. An explicit conversion exists (are you missing a cast?)
    c:\Users\jf-teles\Desktop\GenericTests\GenericTests\GenericsSteps\Utilities\PutValuesVersionedAttributes.tstest.cs: Line 233: (CS0168) The variable 'e' is declared but never used

     

    In Visual Studio the same tests work
  4. Answer
    Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 19 Jun 2013 Link to this post

    Hi Jose,

    In Test Studio you should explicitly cast the object as Microsoft.Office.Interop.Excel.Range.

    Here is an example:

    Microsoft.Office.Interop.Excel.Range r = xlRange.Cells[k, 2] as Microsoft.Office.Interop.Excel.Range; // CAST !
    if (r.Value2 != null) // ADDED IN EDIT
        {
      if (r.Value2.ToString().Equals("Extracted_Value"))
         {
    }
    }

    If the issue persists please send us the test project so we can investigate what is causing the problem.

    Regarding the "The variable 'e' is declared but never used" it's just a compiler warning, so it is not causing a compilation fail.

    Hope this helps.

    Regards,
    Boyan Boev
    Telerik
    Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
    Reserve your seat today!
Back to Top