Showing posts with label Test Complete. Show all posts
Showing posts with label Test Complete. Show all posts

Saturday, 19 January 2019

TEST COMPLETE: ERR COUNT

Sub ErrCount()

  ' ...
  
  ' Obtains the total number of errors
  ' posted to the current test log
  ErrCount = Log.ErrCount
  
  ' Checks whether there are some errors
  If ErrCount > 0 Then
    Log.Message("There is(are) " & ErrCount & " error(s) in the test log.")
  Else
    Log.Message("There are no errors in the test log.") 
  End If
  
End Sub

TEST COMPLETE: LOG DISABLING

Sub EnableTestLog()

  ' Posts a message to the test log
  Log.Message("First message.")
  
  ' Disables posting messages to the test log
  Log.Enabled = false
  ' Posts a warning to the test log
  Log.Warning("This warning won't be posted.")
  ' ...
  ' All the messages are ignored
  ' ...
  
  ' Enables posting messages to the test log
  Log.Enabled = true
  
  ' Posts the event to the test log
  Log.Event("Test event.")
     
End Sub

' The procedure produces the following output:

' First message.
' Test event.

Rest Assured Chectsheet

REST Assured Cheat Sheet 🚀 REST Assured Cheat Sheet Complete Reference for ...