コード例 #1
0
ファイル: executor.py プロジェクト: kashishm/gauge-python
def _add_exception(e, response, continue_on_failure):
    if os.getenv('screenshot_on_failure') == 'true':
        response.executionStatusResponse.executionResult.screenShot = registry.screenshot_provider()()
    response.executionStatusResponse.executionResult.failed = True
    response.executionStatusResponse.executionResult.errorMessage = e.__str__()
    response.executionStatusResponse.executionResult.stackTrace = traceback.format_exc()
    response.executionStatusResponse.executionResult.errorType = ProtoExecutionResult.ASSERTION
    if continue_on_failure:
        response.executionStatusResponse.executionResult.recoverableError = True
コード例 #2
0
ファイル: executor.py プロジェクト: yicaifeitian/gauge-python
def _add_exception(e, response, continue_on_failure):
    if os.getenv('screenshot_on_failure') == 'true':
        response.executionStatusResponse.executionResult.screenShot = registry.screenshot_provider(
        )()
    response.executionStatusResponse.executionResult.failed = True
    message = e.__str__()
    if not message:
        message = "Exception occurred"
    response.executionStatusResponse.executionResult.errorMessage = message
    response.executionStatusResponse.executionResult.stackTrace = traceback.format_exc(
    )
    response.executionStatusResponse.executionResult.errorType = ProtoExecutionResult.ASSERTION
    if continue_on_failure:
        response.executionStatusResponse.executionResult.recoverableError = True
コード例 #3
0
 def test_screenshot_decorator(self):
     func = registry.screenshot_provider()
     expected = 'take_screenshot'
     self.assertEqual(expected, func.__name__)
コード例 #4
0
ファイル: test_python.py プロジェクト: kashishm/gauge-python
 def test_screenshot_decorator(self):
     func = registry.screenshot_provider()
     expected = 'take_screenshot'
     self.assertEqual(expected, func.__name__)
コード例 #5
0
ファイル: test_python.py プロジェクト: hgsgtk/gauge-python
 def setUp(self):
     self.__old_screenshot_provider = registry.screenshot_provider()
     self.__is_screenshot_writer  = registry.is_screenshot_writer
     os.environ["gauge_screenshots_dir"] = tempfile.mkdtemp()