Forum Discussion

Kate's avatar
Kate
Contributor
9 years ago

OnStartTest exclusion

Can I set an exclusion for a specific test that will skip OnStartTest event?

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    Yes you can do something like ....assuming your language is VBS

     

    Sub GeneralEvents_OnStartTest(Sender)
      If Project.TestItems.Current.Name = "Test_Not_2_Run" Then
        ' Do something

         Runner.Stop(TRUE)
      End If
    End Sub

     

    Please read this  and this 

    • Kate's avatar
      Kate
      Contributor

      My language is python, but I got the idea.

      Thanks!