Forum Discussion

clay's avatar
clay
Contributor
8 years ago

Exporting checkpoint test results?

I am looking for a way to export checkpoint results from a test suite run into tabular form - something like a CSV or Excel spreadsheet.  Is there a quick and easy way to do this?
  • clay's avatar
    clay
    8 years ago

    Thank you, Robert.  As always, your responses are thoughtful and clear.

     

    I have too large of a legacy of KWT's to be modified for you suggestion to be practical for our situation (if I had only thought about this more in the beginning...).

     

    I am looking to go in a different direction - looking at the OnLogCheckpoint and OnLogError events.  It looks like I need both (one for "pass" and one for "fail" checkpoint results.  The code will notionally look something like this...

     

    function GeneralEvents_OnLogCheckpoint(Sender, LogParams)

    {

            KWT = ParseForKeywordTestname(Project.TestItems.Current.ElementToBeRun.Caption);

            Checkpoint = ParseForCheckpointName(LogParams.MessageText); 

            Result = "Pass";

            TimeStamp = GetNow();

            PrintToReport(KWT, CheckPoint, Result, TimeStamp);

    }

     

    function GeneralEvents_OnLogError(Sender, LogParams)

    {

            if (ParseForErrorType(LogParams.MessageText) == CHECKPOINT_TYPE)

            {

                    KWT = ParseForKeywordTestname(Project.TestItems.Current.ElementToBeRun.Caption);

                    Checkpoint = ParseForCheckpointName(LogParams.MessageText); 

                    Result = "Fail";

                    TimeStamp = GetNow();

                    PrintToReport(KWT, CheckPoint, Result, TimeStamp);

            }

    }

     

    I am sure it will need quite a bit of tweaking, but I think I have a path forward now :-)