Creation of a new alluvium adapter for your own structure

I am trying to create an adapter for our own framework. Our framework uses its own assert mechanism, so I need to write an adapter.

The adapter class is very simple and looks like this:

public class AllureReportListener {

    private static AllureReportListener object = new AllureReportListener();

    private Allure lifecycle = Allure.LIFECYCLE;

    private String suiteUid = UUID.randomUUID().toString();

    private Set<String> startedTestNames = Collections.newSetFromMap(
            new ConcurrentHashMap<String, Boolean>());

    public static AllureReportListener getReportListener()
    {
        return object;
    }

    public void onTestSuiteStart(String testCaseName)
    {
        getLifecycle().fire(new TestSuiteStartedEvent(
                suiteUid,testCaseName
        ));
    }

    public void onTestSuiteFinish()
    {
        getLifecycle().fire(new TestSuiteFinishedEvent(suiteUid));
    }

    Allure getLifecycle() {
        return lifecycle;
    }
}

      

Our own test suite class calls these methods at the correct event times.

Since we have our own testing environment, we have our own task ant

called ownrunner

as follows:

<target name="test">
    <ownrunner classpathref="classpath" file="config/usecase/SEEDLoginCase.xml" parallel="Scenario" output="${build.report}">
    </ownrunner>
</target>

      

I ran the ant construct, but I didn't see any allure results in the build folder.

Now I am amazed. I want this ant task to generate allure xml results. What do I need to do?

+3


source to share


1 answer


You need to run the aspect frame, part of the ant build. Add this line to your assembly:

<jvmarg value="-javaagent:${currentDir}/aspectjweaver-1.8.0.jar"/>

      



This will help you get seduction results according to the directory you have customized.

+6


source







All Articles