hudson.tasks.junit.TestDataPublisher Java Examples

The following examples show how to use hudson.tasks.junit.TestDataPublisher. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JUnitResultsStepTest.java    From junit-plugin with MIT License 5 votes vote down vote up
@Test
public void configRoundTrip() throws Exception {
    SnippetizerTester st = new SnippetizerTester(rule);
    JUnitResultsStep step = new JUnitResultsStep("**/target/surefire-reports/TEST-*.xml");
    st.assertRoundTrip(step, "junit '**/target/surefire-reports/TEST-*.xml'");
    step.setAllowEmptyResults(true);
    st.assertRoundTrip(step, "junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'");
    step.setHealthScaleFactor(2.0);
    st.assertRoundTrip(step, "junit allowEmptyResults: true, healthScaleFactor: 2.0, testResults: '**/target/surefire-reports/TEST-*.xml'");
    MockTestDataPublisher publisher = new MockTestDataPublisher("testing");
    step.setTestDataPublishers(Collections.<TestDataPublisher>singletonList(publisher));
    st.assertRoundTrip(step, "junit allowEmptyResults: true, healthScaleFactor: 2.0, testDataPublishers: [[$class: 'MockTestDataPublisher', name: 'testing']], testResults: '**/target/surefire-reports/TEST-*.xml'");
}
 
Example #2
Source File: JUnitResultsStep.java    From junit-plugin with MIT License 4 votes vote down vote up
public @Nonnull
List<TestDataPublisher> getTestDataPublishers() {
    return testDataPublishers == null ? Collections.<TestDataPublisher>emptyList() : testDataPublishers;
}
 
Example #3
Source File: JUnitResultsStep.java    From junit-plugin with MIT License 2 votes vote down vote up
/**
 * @param testDataPublishers Test data publishers.
 *
 * @since 1.2
 */
@DataBoundSetter public final void setTestDataPublishers(@Nonnull List<TestDataPublisher> testDataPublishers) {
    this.testDataPublishers = new DescribableList<TestDataPublisher,Descriptor<TestDataPublisher>>(Saveable.NOOP);
    this.testDataPublishers.addAll(testDataPublishers);
}