Ejemplo n.º 1
0
    def test_Processor_step_starting_execution_request(self):
        registry.add_before_step(impl1)
        registry.add_before_step(impl2)
        request = StepExecutionStartingRequest()
        response = processor.process_step_execution_starting_request(request)

        self.assertTrue(isinstance(response, ExecutionStatusResponse))
        self.assertEqual(False, response.executionResult.failed)
Ejemplo n.º 2
0
    def test_Processor_step_starting_execution_request(self):
        registry.add_before_step(impl1)
        registry.add_before_step(impl2)
        response = Message()
        request = Message()
        processors[Message.StepExecutionStarting](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
Ejemplo n.º 3
0
    def test_Processor_step_starting_execution_request(self):
        registry.add_before_step(impl1)
        registry.add_before_step(impl2)
        response = Message()
        request = Message()
        processors[Message.StepExecutionStarting](request, response, None)

        self.assertEqual(Message.ExecutionStatusResponse, response.messageType)
        self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
Ejemplo n.º 4
0
    def test_Processor_failing_step_starting_execution_request(self):
        registry.add_before_step(failing_impl)
        response = Message()
        request = Message()
        processors[Message.StepExecutionStarting](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)
Ejemplo n.º 5
0
    def test_Processor_failing_step_starting_execution_request(self):
        registry.add_before_step(failing_impl)
        response = Message()
        request = Message()
        processors[Message.StepExecutionStarting](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)
Ejemplo n.º 6
0
    def test_Processor_failing_step_starting_execution_request(self):
        registry.add_before_step(failing_impl)
        request = StepExecutionStartingRequest()
        response = processor.process_step_execution_starting_request(request)

        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)