Class TestFailureHook


  • public class TestFailureHook
    extends java.lang.Object
    Failure hook makes sure that the Citrus test state is set to FAILED when the Cucumber scenario is failed. This is because the error might not be within the Citrus test actions but in some general Cucumber step (e.g. when connection to JMS message broker failed). This would then lead to a false positive Citrus test report because the error was not part of the Citrus test. This hook makes sure to always set an exception on the test context in order to correctly reflect the scenario failed state.
    Author:
    Christoph Deppisch
    • Constructor Summary

      Constructors 
      Constructor Description
      TestFailureHook()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkTestFailure​(io.cucumber.java.Scenario scenario)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestFailureHook

        public TestFailureHook()
    • Method Detail

      • checkTestFailure

        public void checkTestFailure​(io.cucumber.java.Scenario scenario)