Package 

Interface MainSectionEnricher


  • 
    public interface MainSectionEnricher<Data extends Object>
    
                        

    Special object for enriching 'run'-block functionality. With this object you can add some additional test steps for each TestCase, that has this enricher, like this:

    <code> class MyMainSectionEnricher : MainSectionEnricher<TestCaseData> {

        override fun TestContext<TestCaseData>.beforeMainSectionRun(testInfo: TestInfo) {
            step("New step before 'run' block") {
                step("Nested step inside") {
                    // do additional stuff
                }
            }
        }

    } </code>

    • Method Summary

      Modifier and Type Method Description
      Unit beforeMainSectionRun(TestContext<Data> $self, TestInfo testInfo) This method will be invoked right before execution of "run" block in your test case.
      Unit afterMainSectionRun(TestContext<Data> $self, TestInfo testInfo) This method will be invoked right after execution of "run" block in your test case.
      • Methods inherited from class com.kaspersky.kaspresso.enricher.MainSectionEnricher

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

      • beforeMainSectionRun

         Unit beforeMainSectionRun(TestContext<Data> $self, TestInfo testInfo)

        This method will be invoked right before execution of "run" block in your test case.

        Parameters:
        testInfo -
        • test information, such as test identifier

      • afterMainSectionRun

         Unit afterMainSectionRun(TestContext<Data> $self, TestInfo testInfo)

        This method will be invoked right after execution of "run" block in your test case.

        Parameters:
        testInfo -
        • test information, such as test identifier