Forum Discussion

exdunepilot's avatar
exdunepilot
Contributor
9 years ago

Test Log - Saving Off Subsections

I understand running a test a single test log is created.  I know I can save off a log file at any time during execution.   My question is can I save off sections of the test log individually?  For example, within a test I have 3 distinctive sections of capabilities to test (say 3 User Stories), and I want to save off each one as its own, standalone file (not cumulative at time of save).  Then have an additional "cumulative" test log at the end (which I have from TestComplete).   I am combining multiple User Stories into a single test for efficiency, but then want one to one mapping of User Stories to results file associations. 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I don't believe that you can write just a subsection of a log out to a file. However, while it doesn't give you seperate files, what you can do is use Log.AppendFolder and Log.PopLogFolder as wrappers around your User Stories. What that will do is give a visual separation in your commulative log of how the user stories are broken out.  So, something like:

    Log.AppendLogFolder('User story 1');
    // run all your tests
    Log.PopLogFolder();
    Log.AppendLogFolder("User story 2');
    //run all you tests
    Log.PopLogFolder();
    

     

    I've attached a Script Extension I wrote that combines that code with push/pop code for the indicator so that there is an on screen indicator of the different user stories as they run. The methods should be self explanatory but feel free to ask questions. 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        No problem! Glad to help. If you use the extension, let me know if you like it and what features/additions you would like added to it. I'm always looking for more ways to enhance my own TestComplete usage.