kevintran1308
4 years agoContributor
How to make Passed Log with Script test
Hi, I know there is a Log.Error when a variable is wrong. However, how to make the Passed Log if there is a right variable. For example in Python: if (variable == False): Log.Error("There is a...
- 4 years ago
Basically, a test passes if there are no Error messages (or no exceptions have been thrown). So if your test never calls Log.Error(), the test will pass.
We use Log.Checkpoint() to create "Pass" log messages in our scripts.
Essentially you will have to check each variable value. If it's not what you expect, log an error message. If it is what you expect, either do nothing or use Log.Checkpoint() to create informational messages with a green check mark.
Note, Log.Checkpoint() doesn't explicitly mark a test as a pass. A test will pass if there are no Error messages.