本文整理汇总了Java中hudson.tasks.junit.TestDataPublisher类的典型用法代码示例。如果您正苦于以下问题:Java TestDataPublisher类的具体用法?Java TestDataPublisher怎么用?Java TestDataPublisher使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestDataPublisher类属于hudson.tasks.junit包,在下文中一共展示了TestDataPublisher类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setUp
import hudson.tasks.junit.TestDataPublisher; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(java.util.logging.Level.SEVERE);
project = createFreeStyleProject(projectName);
DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>> publishers = new DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>>(
project);
publishers.add(new QuarantineTestDataPublisher());
QuarantinableJUnitResultArchiver archiver = new QuarantinableJUnitResultArchiver("*.xml");
archiver.setTestDataPublishers(publishers);
project.getPublishersList().add(archiver);
hudson.setAuthorizationStrategy(new FullControlOnceLoggedInAuthorizationStrategy());
hudson.setSecurityRealm(createDummySecurityRealm());
}
开发者ID:samsta,项目名称:quarantine,代码行数:17,代码来源:QuarantineUiTest.java
示例2: setUp
import hudson.tasks.junit.TestDataPublisher; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
super.setUp();
java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(java.util.logging.Level.SEVERE);
project = createFreeStyleProject(projectName);
DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>> publishers = new DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>>(
project);
publishers.add(new QuarantineTestDataPublisher());
QuarantinableJUnitResultArchiver archiver = new QuarantinableJUnitResultArchiver("*.xml");
archiver.setTestDataPublishers(publishers);
project.getPublishersList().add(archiver);
hudson.setAuthorizationStrategy(new FullControlOnceLoggedInAuthorizationStrategy());
hudson.setSecurityRealm(createDummySecurityRealm());
User u = User.get("user1");
u.addProperty(new Mailer.UserProperty(user1Mail));
}
开发者ID:samsta,项目名称:quarantine,代码行数:20,代码来源:QuarantineCoreTest.java
示例3: testNoTestsHaveQuarantineActionForStandardPublisher
import hudson.tasks.junit.TestDataPublisher; //导入依赖的package包/类
public void testNoTestsHaveQuarantineActionForStandardPublisher() throws Exception {
project.getPublishersList().remove(QuarantinableJUnitResultArchiver.class);
DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>> publishers = new DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>>(
project);
publishers.add(new QuarantineTestDataPublisher());
project.getPublishersList().add(new JUnitResultArchiver("*.xml", false, publishers));
TestResult tr = getResultsFromJUnitResult("junit-1-failure.xml");
for (SuiteResult suite : tr.getSuites()) {
for (CaseResult result : suite.getCases()) {
assertNull(result.getTestAction(QuarantineTestAction.class));
}
}
}
开发者ID:samsta,项目名称:quarantine,代码行数:17,代码来源:QuarantineCoreTest.java
示例4: perform
import hudson.tasks.junit.TestDataPublisher; //导入依赖的package包/类
@Override
public boolean perform(DynamicBuild dynamicBuild, Launcher launcher, BuildListener listener) {
String files = getPluginInputFiles();
listener.getLogger().println(String.format("Archiving JUnit results: '%s'", files));
DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>> testDataPublishers = new DescribableList<TestDataPublisher, Descriptor<TestDataPublisher>>(Saveable.NOOP);
JUnitResultArchiver publisher = new JUnitResultArchiver(files, true, testDataPublishers);
try {
return publisher.perform(((AbstractBuild) dynamicBuild), launcher, listener);
} catch (Exception e) {
listener.getLogger().println(String.format("FAILED archiving JUnit results: %s", e.toString()));
return false;
}
}
开发者ID:groupon,项目名称:DotCi-Plugins-Starter-Pack,代码行数:15,代码来源:JunitPluginAdapter.java
注:本文中的hudson.tasks.junit.TestDataPublisher类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论