Forum Discussion

nagoorkj's avatar
nagoorkj
Contributor
6 years ago

Can we run any test case from project tear down?

As part of automation I need to run some specific groovy test case from project tear down but unfortunately the test runner object is not accessible from this step so it will be very helpful if some help me on this..

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Two things to mention here:

    1. A test case should not be tear down.
    2. "context" variable can be used to access the data.
    • nagoorkj's avatar
      nagoorkj
      Contributor
      Thanks Rao for your response but you can share some ideas to achieve the below problem,

      As part of my project I need to send the email to the team so I used email sender code and appended in the project tear down which is not good program practice so I thought to save it as common script and plan to invoke when ever required..

      Hence I decided to call from tear down but unfortunately I couldn't done the without test runner so can you help me on this issue??