Class ScreenShotExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestExecutionExceptionHandler

    public class ScreenShotExtension
    extends Object
    implements org.junit.jupiter.api.extension.TestExecutionExceptionHandler
    • Constructor Detail

      • ScreenShotExtension

        public ScreenShotExtension()
    • Method Detail

      • handleTestExecutionException

        public void handleTestExecutionException​(org.junit.jupiter.api.extension.ExtensionContext extensionContext,
                                                 Throwable throwable)
                                          throws Throwable
        If test has failed, take a screenshot and put it in the store
        Specified by:
        handleTestExecutionException in interface org.junit.jupiter.api.extension.TestExecutionExceptionHandler
        Parameters:
        extensionContext -
        throwable -
        Throws:
        Throwable