Test.isRunningTest() is used to define whether the code is executed by test class.
Sample Code:
if ( !Test.isRunningTest() ) {
/*Code Block which won’t execute during Test Class Execution*/
}