After dropping storage db, test results are still listed

11 posts, 0 answers
  1. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 08 Sep Link to this post

    Hi.  I am working with three regression projects in Test Studio.  Recently, I have had extensive problems when running test lists remotely.  Older versions of test scripts are continually showing up and test scripts are not "finding" test as step scripts (which should be there and were running successfully previously).  So, after manually trying to fix the problem for awhile (by causing new modify dates on test scripts), I resorted to using the RoboMongo tool to "drop the database" on the server.

    Now when I look at the Results tabs for each project, I only see test lists scheduled in the future, as expected, except for one project, where it still lists two previous test runs.  Thinking that perhaps the database was corrupted, I ran the database repair.  This still did not clear those test runs.

    Is there something I am not understanding here?  Any help would be much appreciated!

     

    Briar

  2. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 09 Sep Link to this post

    An update - I went ahead and deleted the remaining test results.  I needed a clean storage db to confirm something related to my original problems.  This is the scenario I tested:  

    Two different projects (say Project 1, Project 2) each contain test-as-steps that have the same name and basic function (we'll call it Login).  What I'm finding is:

    Ran remotely Project 1 test list which calls its own Login test-as-step.  Successful.

    Ran remotely Project 2 test list which should call its own Login test-as-step.  The actual run shows that the Project 1 Login script was called.

    Modified Project 2's Login script to just update its revision date.  Ran remotely Project 2's test list and it successfully runs using its own Login script.

    Ran remotely Project 1 test list again and it fails attempting to use Project 2's Login script.

    Can't you have the same name scripts in different projects?  I have a number of like-named test-as-steps in each project.  

    One note - one of the Login scripts was probably originally a copy of the other.  Could this have something to do with it?

     

    Briar

     

  3. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 13 Sep Link to this post

    Hello Briar,

    Probably the results you had to delete manually were stored from local runs. The results from local runs are not kept in the Storage but in the Results sub-folder in the project folder. 

    What causes the described scenario with the remote runs of two different projects is most probably the fact that the test is a copy of the other one. Please check the properties of both tests in question and whether their UniqueIDs are the same? If so this is the reason for the issue you encountered and to overcome it you should create a new test in one of the projects and copy the steps to it, then delete the initial test. This will ensure new UniqueId and the tests shouldn't be messed up. 

    Please let me know if the above makes sense to you and if the proposed solution works as expected. Thanks in advance for the cooperation! Hope to hear from you soon! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  4. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 13 Sep in reply to Elena Tsvetkova Link to this post

    Elena,

    That does make sense and did solve the problem.  Unfortunately, I have a lot of editing as a number of scripts were copied from one project to the other :(

    SO, to summarize, if copying scripts between projects, the approach should always be to create a new test script file and paste in the contents of the original file, correct?

    Thanks so much for your help!

    Briar

  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 15 Sep Link to this post

    Hi Briar,

    I am glad to hear we figured it out although you have a lot more to do. And yes, this is correct whenever you copy tests between different projects you need a new test file and copy the content to it. On the other hand if you copy a test in the same project through the Test Studio UI it automatically gets an unique ID. In general it is important to use the UI so that the tool actually detects that new ID is required. 

    I hope you will fix your projects soon and will be able to work flawlessly again. In case you have any further queries do not hesitate to contact Test Studio Support Team - we are always happy to assist our customers! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  6. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 23 Sep Link to this post

    Any chance there is a query available that would export a list of, say, project name, test script name, unique ID?  That would really help in working with 400+ test scripts across three projects :)
  7. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 28 Sep Link to this post

    Hi Briar,

    There is no such query or something available. However I discussed the matter with my team and there is workaround we could recommend. Test Studio allows you to extend the test execution with the help of an execution extension. What you need is the OnAfterTestCompleted() method.Within this method you could access programmatically in the ExecutionContext the test name and id and store them into a file after each test completion. Make a test list that includes all tests in a project with the prepared custom execution extension and run the list. 

    I understand this is not a straight forward solution however is possible approach. I hope this would be useful for you! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress

     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  8. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 04 Oct in reply to Elena Tsvetkova Link to this post

    Elena,

    Thank you so much for the workaround! I appreciate your going the extra mile to provide a solution.  I'll definitely give it a try.

    Briar

  9. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 05 Oct Link to this post

    Hello Briar,

    Take your time and give a try to the suggested workaround. In case you hit any further difficulty do not hesitate to further contact us. We are always happy to assist our customers! 
    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  10. Briar
    Briar avatar
    58 posts
    Member since:
    Jun 2014

    Posted 17 Oct Link to this post

    The workaround worked perfectly, especially due to the helpful instructions in the documentation.  Thanks!
  11. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 17 Oct Link to this post

    Hi Briar,

    Thanks for your kind words. I am glad to hear you managed to handle your projects easier with the proposed workaround. Do not hesitate to contact us in case you face any other difficulty. 

    Wish you great day ahead! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top