Disabling "Code-behind file for test is missing" popup

4 posts, 0 answers
  1. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 06 May 2015 Link to this post

    Hi,

     

    I am opening a project on VS2012 and this popup which says "Code-behind file for test  is missing. Search for it? " keeps popping up every now and then. Is there a way to disable?

    I edited .csproj file to remove some files which were missing.

    Kindly let me know.

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 06 May 2015 Link to this post

    Hi Vishnu,

    No there is no way to disable that particular prompt. What we need to figure out is why are you getting that prompt in the first place so we can stop it from happening.

    One way is if you have a Test Studio project in Visual Studio then manually delete the .cs/.vb file on disk. The next time you open Visual Studio project, Visual Studio is still going to look for the file. You will get the prompt if this is what you're doing. You should delete the code behind file within Visual Studio instead of using Windows Explorer.

    Similarly if you use Test Studio IDE to get rid of a code behind file, then open the Visual Studio project, Visual Studio is still going to look for the code behind file.

    Can you determine what set of steps causes the prompt to appear?


    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. VVP
    VVP avatar
    61 posts
    Member since:
    Mar 2015

    Posted 07 May 2015 in reply to Cody Link to this post

    I found out that there are some .tstest files , but no corresponding .resx or .tstest.cs files. So VS keeps looking for those files.

    Since i am relatively new to Telerik, Can you let me know whether a test can run with only .tstest file? or it needs .tstest.cs file also. 

    As per my understanding .tstest.cs has all code and hence that is mandatory. Is my understanding wrong?

     

  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 11 May 2015 Link to this post

    Hello Vishnu,

    Correct the .cs file contains the actual code for your coded steps. Test Studio will only create the .cs file if you add a coded step to the test. Otherwise this file is not created and not needed. In fact if you remove all coded steps you can even remove the .cs file as shown in the attached screen shot.

    The .resx file is not needed for running tests. It holds all of the storyboard images. If you do manually delete this using Windows Explorer Test Studio will automatically create a new empty one. Test Studio only uses this when you go to look at the storyboard or when a step fails it will pull this image and add it to the failure information as the "Expected Image" along with "Image on failure". That way you can compare the two screen shots side by side.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!