Java Code Examples for hudson.tasks.junit.TestResultAction#Data

The following examples show how to use hudson.tasks.junit.TestResultAction#Data . 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: JUnitFlakyTestDataPublisher.java    From flaky-test-handler-plugin with Apache License 2.0 5 votes vote down vote up
@Override
public TestResultAction.Data contributeTestData(Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener, TestResult testResult)
    throws IOException, InterruptedException {
  VirtualChannel channel = launcher.getChannel();
  if(channel == null) {
        throw new InterruptedException("Could not get channel to run a program remotely.");
  }
  FlakyTestResult flakyTestResult = channel.call(new FlakyTestResultCollector(testResult));
  // TODO consider the possibility that there is >1 such action
  flakyTestResult.freeze(run.getAction(AbstractTestResultAction.class), run);
  return new JUnitFlakyTestData(flakyTestResult);
}
 
Example 2
Source File: JUnitResultsStepTest.java    From junit-plugin with MIT License 4 votes vote down vote up
@Override public TestResultAction.Data contributeTestData(Run<?,?> run, FilePath workspace, Launcher launcher, TaskListener listener, TestResult testResult) throws IOException, InterruptedException {
    return null;
}