Class ScreenShotExtension

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

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

      • ScreenShotExtension

        public ScreenShotExtension()
    • Method Detail

      • afterTestExecution

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