Activity Forums Salesforce® Discussions What is test.isrunningtest() usage in apex class in Salesforce?

  • Marziya

    Member
    May 5, 2020 at 2:10 pm

    The Test.isRunningTest() method is used to identify, if the piece of code being executed is invoked from a Test class execution or from other artefacts such as a Trigger, Bacth Job etc. Returns true if the code being executed is invoked from a test class otherwise returns a false.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos