Forum Discussion

steve_clarke's avatar
steve_clarke
Contributor
7 years ago
Solved

Unable to run a test script that contains more than one test.

Hi,

 

I am running TC 12.31 build 1833 on a Windows 10Pro machine.

 

I have a test project with a number of script (written in Delphi) units. Some of these units have more than one test within them.

These used to run okay but now only the first test, in a unit with more than one test, is run during a test playback run.

This, obviously, causes an issue for subsequent tests.

The workaround is to make these particular scripts only have a single test, but don't understand why, something that has been working, is now no longer working.

 

Anyone else suffered from this?

 

Cheers,

Steve.

  • Hi tristaanogre/cunderw,

     

    I think I have spent as much time as I wish trying to figure out what the issue might be and will close this discussion.

    I thank you both for your replies and assistance.

     

    At the end of the day, I simply re-arranged the way my scripts run in order to get them to work, which is the important thing.

    This wasn't a 'show-stopper', though it would have been nice to know why it happened.

     

    Though tempted, as I can't say I'm a big fan of the new style Defects/Test Sets layout, I don't really have the time (at present) to roll-back to previous versions to prove something I already know to be true.

     

    Cheers,

    Steve.

15 Replies

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi,

    If you add in you Project items, this will only run theses items until you make an routine call another routine...

    Assuming that you have 3 routines (procedures) in your unit :  you'll need to create 3 test items in your Project (by double-clicking on it) and select respectively each procedure.

    • steve_clarke's avatar
      steve_clarke
      Contributor

      Hi m_essaid,

       

      Thank you for your reply.

       

      You mention creating individual test items and so forth. However, much like my own 'workaround' they will achieve a result but don't really answer the question as to why something that has been working, for a number of years, now no longer does without making changes.

      Clearly, something has altered in Test Complete, recently, that makes it necessary to alter my standing project items.

       

      Cheers,

      Steve.

  • cunderw's avatar
    cunderw
    Community Hero

    How are you calling the unit? Do you get an error? 

    • steve_clarke's avatar
      steve_clarke
      Contributor

      Hi cunderw,

       

      The test script contains two test units, written in Delphi, using a naming convention of "test4" followed by "test5". The test script is one of 15 within a project that, is in turn, part of a project suite containing four projects to test a desktop application.

      The test script is the third, in turn, to run within the project, as ordered in the project Test Items listing.

      There are no errors, when it comes to running the script, test4 is run and test5 is simply skipped and TC moves on to the next script, containing test6.

      As stated earlier, this has been working without fail for some considerable time and this issue, of skipping, has only occurred recently.

       

      Cheers,

      Steve.

      • cunderw's avatar
        cunderw
        Community Hero

        As far as I know you cannot and have never been able to run an entire script unit in Test complete, just individual functions / routines. Are you sure that each test inside the unit was not originally added as individual test items or that they weren't called by each other in the unit? 

         

        Are you using any kind of version control system? If so I would revert back to a commit where it was working and compare the difference to what it is currently.