Ant 为自己的框架创建新的诱惑适配器
我正在尝试为我们自己的框架创建适配器。我们的框架使用自己的断言机制,因此我需要编写适配器 适配器类非常简单,如下所示:Ant 为自己的框架创建新的诱惑适配器,ant,allure,Ant,Allure,我正在尝试为我们自己的框架创建适配器。我们的框架使用自己的断言机制,因此我需要编写适配器 适配器类非常简单,如下所示: public class AllureReportListener { private static AllureReportListener object = new AllureReportListener(); private Allure lifecycle = Allure.LIFECYCLE; private String suiteU
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;
}
}
<target name="test">
<ownrunner classpathref="classpath" file="config/usecase/SEEDLoginCase.xml" parallel="Scenario" output="${build.report}">
</ownrunner>
</target>
我运行了ant构建,但在构建文件夹中没有看到任何诱人的结果
现在我被打动了。我希望这个ant任务生成诱人的xml结果。我需要做什么 您还需要启动aspect jar,这是ant构建的一部分。将此行添加到您的生成:
<jvmarg value="-javaagent:${currentDir}/aspectjweaver-1.8.0.jar"/>
这将帮助您在已配置的目录下获得诱惑结果