'Method to actually start execution of the test. Must be called from the test_<name>
method of the test class.'

def execute(self):

    try:
        if self.run_live:
            print('RUN    LIVE:    {}'.format(self.test_name))
            self._execute_live_or_recording()
        elif self.playback:
            print('PLAYBACK:    {}'.format(self.test_name))
            self._execute_playback()
        else:
            print('RECORDING:    {}'.format(self.test_name))
            self._execute_live_or_recording()
    except Exception as ex:
        traceback.print_exc()
        raise ex
    finally:
        if ((not self.success) and (not self.playback) and os.path.isfile(self.cassette_path)):
            print('DISCARDING    RECORDING:    {}'.format(self.cassette_path))
            os.remove(self.cassette_path)
        elif (self.success and (not self.playback) and os.path.isfile(self.cassette_path)):
            try:
                self._post_recording_scrub()
            except Exception as ex:
                print('DISCARDING    RECORDING:    {}    before    of    exception    thrown    during    post    recording    scrub    {}.'.format(self.cassette_path, ex))
                os.remove(self.cassette_path)
