william_roe's avatar
william_roe
Super Contributor
10 years ago
Status:
New Idea

View Logs Outside of TC

Provide for the ability to view logs outside of TC? Our logs are getting too large to keep in the 'Log' directory as part of our regular backup and we don't want to lose the testing history. I would like to move the log folders somewhere else but without a view this is far too tedious.

  • aqConvert.IntToStr(aqDateTime.GetMonth(Now)) + "_" + aqConvert.IntToStr(aqDateTime.GetDay(Now)) + "_" + aqConvert.IntToStr(aqDateTime.GetYear(Now)) + "_" + aqConvert.IntToStr(aqDateTime.GetHours(Now)) + "_" + aqConvert.IntToStr(aqDateTime.GetMinutes(Now)) + "_" + aqConvert.IntToStr(aqDateTime.GetSeconds(Now))

  • william_roe's avatar
    william_roe
    Super Contributor

    Here's what I did (same net affect). Chocolate, wine AND roses should be arriving in a day or two. Have a great weekend and THANKS

     

     

    function SaveTestResult(){
        // Specifies the path to the file that will contain 
        // the test results in the MHT format
        var currentTime = aqDateTime.Time();
    
        // Return the hours, minutes and seconds parts of the current time value and then post them to the log
        hours = aqDateTime.GetHours(currentTime);
        minutes = aqDateTime.GetMinutes(currentTime);
        seconds = aqDateTime.GetSeconds(currentTime);
        
        var f = aqConvert.DateTimeToFormatStr(aqDateTime.Today(), "%Y_%m_%d_") + hours + "_" + minutes + ".mht";
        
        var result = Log.SaveResultsAs("C:\\Users\\svcmrtprdaccpt\\Documents\\TestComplete 10 Projects\\CMWeb Logs\\"+f, lsMHT);
    }