Forum Discussion

Kateryna's avatar
Kateryna
Contributor
13 years ago

How to get the result from the whole suite

Hello,

I have a question here.

I export results of my test and send it to each member of the team group. It would be just great to write in the title of the letter whether project suite passed or failed. But I don't know how to get that information. Can somebody help me please?
  • Again, that's something that you'll have to determine in script as I said.  You'll have to keep track of the errors and warnings generated and essentially write something in the routine you're using to send the log "If errorcount > 0 then status = "failed" else status = "success""
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Again, that's something that you'll have to determine in script as I said.  You'll have to keep track of the errors and warnings generated and essentially write something in the routine you're using to send the log "If errorcount > 0 then status = "failed" else status = "success""
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Well, how do you know it passed or failed?  The definition of "passed" and "failed" may differ depending upon what you're doing.  Does passing mean that all tests executed without either an error or warning logged?  Does passing mean that only select errors or warnings are allowed?  Does failed mean that the test generated a bug report?  Or does it mean that it encountered a syntax error in the script code?



    Determining "passed" or "failed" is up to the user who is reading the logs to make that determination, at least in my opinion.  I choose simply to send the logs around and report how many warnings and how many errors were logged and let the person who is reviewing the logs determine the status.



    now... that said, you can keep count of errors and warnings by utilizing the OnLogError and OnLogWarning event handlers to increment a global variable that you can then use in the body of your e-mail that you send to inform someone what occurred on a high level before they delve into the specifics of the log.
  • When I receive an exported log file I can see there the result, it can be either Success or Error(s) occured. So I would like to write the same in the mail in order not to download the whole log if the result is Success. Maybe there is a way to get this information using script?