Calls to shared tests being replaced when new test created in solution (PITS issue 11440)

4 posts, 0 answers
  1. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 19 Jun 2012 Link to this post

    Hello Telerik,

    We have hit the issue described in PITS Issue 11440 in our solution.  When we add a new test to the solution, a number of calls to shared tests (recorded using Test as Step command) are being replaced with a call to the new test.  I have added comments to the PITS issue with more details on our observations - some of which I cannot explain at the moment.  Please review and let us know what we can do to resolve this situation.

    The only option I see to resolve this issue is to re-record each of the problem shared test calls - but there are approximately 150-200 instances across 70+ test files which will need to be replaced.  Obviously, I am hoping that I don't need to do this and there is an easier work-around/fix.

    I look forward to your prompt feedback on this.  As mentioned in my comments, I have sample tests that exhibit the issue - let me know if you need it.

    Thanks,
    Shashi
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 20 Jun 2012 Link to this post

    Hi Shashi,

    I am sorry you have run into this issue. That particular bug has been fixed internally but not yet publicly released.

    We discovered the problem with all of the Test-as-step steps being replaced was caused by an empty/corrupt .tstest file. Once that file is identified and deleted the problem with your Test-as-step steps should go away.

    Scan your project for extra small .tstest files. Then look at its contents. If the contents look like what is shown in PITS Issue 11440 delete that file and it's associated files (.resx, .cs/.vb). Once that's done your project should work normally.

    Please keep me updated with your progress to this problem.

    All the best,
    Cody
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Shashi
    Shashi avatar
    25 posts
    Member since:
    Feb 2011

    Posted 20 Jun 2012 Link to this post

    Cody,

    The new file does have the contents as described in the PITS issue. 

    However, we cannot just remove it.  Because of the issue, there are references to it from all the tests where the shared test calls were replaced.  VS then prevents the file from being deleted.  It is not feasible to fix all those references (there are 150-200+ references across 70+ files) - that would entail re-recording all those shared test calls (which I am trying to avoid). 

    The only thing I can do is to revert to the version of the solution prior to the changeset that added the new test in TFS (this is what I have done right now).  However, the problem then returns when I create another new test.  We are constantly expanding our test suite - and so the ability to create new tests is critical.

    I am creating new tests using the Add New Test command (right-mouse menu on project node) in VS - and selecting Web Test.   I believe this is the recommended way to create new tests, is it not?  

    Shashi  
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 20 Jun 2012 Link to this post

    Hi Shashi,

    I am sorry I was not clear enough in my last response how to overcome this issue:

    1) Close the test project in Visual Studio
    2) Find and delete the corrupted files using Windows Explorer
    3) When you reopen the test project in VS all of your Test-as-step steps should revert to their correct subtests

    To avoid running into this problem again, immediately after creating a new test (Add -> New Test) add any test step to the new test and save it to disk. This will avoid the Test-as-step steps corruption you have been seeing.

    All the best,
    Cody
    the Telerik team
    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!