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