Beispiel #1
0
    def test_Processor_ending_execution_request(self):
        registry.add_after_suite(impl1)
        registry.add_after_suite(impl2)
        request = ExecutionEndingRequest()
        response = processor.process_execution_ending_request(request)

        self.assertTrue(isinstance(response, ExecutionStatusResponse))
        self.assertEqual(False, response.executionResult.failed)
Beispiel #2
0
    def test_Processor_ending_execution_request(self):
        registry.add_after_suite(impl1)
        registry.add_after_suite(impl2)
        response = Message()
        request = Message()
        processors[Message.ExecutionEnding](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
    def test_Processor_ending_execution_request(self):
        registry.add_after_suite(impl1)
        registry.add_after_suite(impl2)
        response = Message()
        request = Message()
        processors[Message.ExecutionEnding](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
Beispiel #4
0
    def test_Processor_failing_ending_execution_request(self):
        registry.add_after_suite(failing_impl)
        response = Message()
        request = Message()
        processors[Message.ExecutionEnding](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(True, response.executionStatusResponse.executionResult.failed)
        self.assertEqual(ProtoExecutionResult.ASSERTION, response.executionStatusResponse.executionResult.errorType)
        self.assertEqual('list index out of range', response.executionStatusResponse.executionResult.errorMessage)
        self.assertNotEqual('', response.executionStatusResponse.executionResult.stackTrace)
    def test_Processor_failing_ending_execution_request(self):
        registry.add_after_suite(failing_impl)
        response = Message()
        request = Message()
        processors[Message.ExecutionEnding](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(True, response.executionStatusResponse.executionResult.failed)
        self.assertEqual(ProtoExecutionResult.ASSERTION, response.executionStatusResponse.executionResult.errorType)
        self.assertEqual('list index out of range', response.executionStatusResponse.executionResult.errorMessage)
        self.assertNotEqual('', response.executionStatusResponse.executionResult.stackTrace)
Beispiel #6
0
 def test_Processor_failing_ending_execution_request(self):
     registry.add_after_suite(failing_impl)
     request = ExecutionEndingRequest()
     response = processor.process_execution_ending_request(request)
     print(response)
     self.assertTrue(isinstance(response, ExecutionStatusResponse))
     self.assertEqual(True, response.executionResult.failed)
     self.assertEqual(ProtoExecutionResult.ASSERTION,
                      response.executionResult.errorType)
     self.assertEqual('list index out of range',
                      response.executionResult.errorMessage)
     self.assertNotEqual('', response.executionResult.stackTrace)
Beispiel #7
0
def after_suite(func):
    registry.add_after_suite(func)
    return func
Beispiel #8
0
def after_suite(func):
    registry.add_after_suite(func)
    return func