@Override
    public void onTestStart(ITestResult paramITestResult) {
        Object instance = paramITestResult.getInstance();

        ScenarioBase scenario;

        if (instance instanceof ScenarioTestBase<?, ?, ?> testInstance) {
            scenario = testInstance.createNewScenario();
        } else {
            scenario = new ScenarioBase();
        }

        ScenarioHolder.get().setScenarioOfCurrentThread(scenario);
        paramITestResult.setAttribute(SCENARIO_ATTRIBUTE, scenario);

        ReportModel reportModel = getReportModel(paramITestResult, instance.getClass());
        scenario.setModel(reportModel);

        //TestNG cannot run in parallel if stages are to be injected, because then multiple scenarios
        //will attempt to inject into a single test instance at the same time.
        new IncompatibleMultithreadingChecker().checkIncompatibleMultiThreading(paramITestResult);

        // TestNG does not work well when catching step exceptions, so we have to disable that feature
        // this mainly means that steps following a failing step are not reported in JGiven
        scenario.getExecutor().setSuppressStepExceptions(false);

        // avoid rethrowing exceptions as they are already thrown by the steps
        scenario.getExecutor().setSuppressExceptions(true);

        scenario.getExecutor().injectStages(instance);

        Method method = paramITestResult.getMethod().getConstructorOrMethod().getMethod();
        scenario.startScenario(instance.getClass(), method, getArgumentsFrom(method, paramITestResult));

        // inject state from the test itself
        scenario.getExecutor().readScenarioState(instance);
    }
TestNG Test listener to enable JGiven for a test class.
jgiven-testng/src/main/java/com/tngtech/jgiven/testng/ScenarioTestListener.java