diff --git a/src/main/java/org/jenkinsci/plugins/xunit/ExtraConfiguration.java b/src/main/java/org/jenkinsci/plugins/xunit/ExtraConfiguration.java new file mode 100644 index 00000000..4e30d70e --- /dev/null +++ b/src/main/java/org/jenkinsci/plugins/xunit/ExtraConfiguration.java @@ -0,0 +1,17 @@ +package org.jenkinsci.plugins.xunit; + +/** + * @author Gregory Boissinot + */ +public class ExtraConfiguration { + + private final long testTimeMargin; + + public ExtraConfiguration(long testTimeMargin) { + this.testTimeMargin = testTimeMargin; + } + + public long getTestTimeMargin() { + return testTimeMargin; + } +} diff --git a/src/main/java/org/jenkinsci/plugins/xunit/NoTestException.java b/src/main/java/org/jenkinsci/plugins/xunit/NoFoundTestException.java similarity index 54% rename from src/main/java/org/jenkinsci/plugins/xunit/NoTestException.java rename to src/main/java/org/jenkinsci/plugins/xunit/NoFoundTestException.java index 41d07efd..dc2af217 100644 --- a/src/main/java/org/jenkinsci/plugins/xunit/NoTestException.java +++ b/src/main/java/org/jenkinsci/plugins/xunit/NoFoundTestException.java @@ -3,5 +3,5 @@ /** * @author Gregory Boissinot */ -public class NoTestException extends InterruptedException { +public class NoFoundTestException extends InterruptedException { } diff --git a/src/main/java/org/jenkinsci/plugins/xunit/OldTestReportException.java b/src/main/java/org/jenkinsci/plugins/xunit/OldTestReportException.java new file mode 100644 index 00000000..8d20e8ed --- /dev/null +++ b/src/main/java/org/jenkinsci/plugins/xunit/OldTestReportException.java @@ -0,0 +1,7 @@ +package org.jenkinsci.plugins.xunit; + +/** + * @author Gregory Boissinot + */ +public class OldTestReportException extends InterruptedException { +} diff --git a/src/main/java/org/jenkinsci/plugins/xunit/XUnitBuilder.java b/src/main/java/org/jenkinsci/plugins/xunit/XUnitBuilder.java index b37a5898..8de80af2 100644 --- a/src/main/java/org/jenkinsci/plugins/xunit/XUnitBuilder.java +++ b/src/main/java/org/jenkinsci/plugins/xunit/XUnitBuilder.java @@ -26,6 +26,7 @@ public class XUnitBuilder extends Builder { private TestType[] types; private XUnitThreshold[] thresholds; private int thresholdMode; + private ExtraConfiguration extraConfiguration; /** * Computed @@ -39,10 +40,15 @@ public XUnitBuilder(TestType[] types, XUnitThreshold[] thresholds) { } @DataBoundConstructor - public XUnitBuilder(TestType[] tools, XUnitThreshold[] thresholds, int thresholdMode) { + public XUnitBuilder(TestType[] tools, XUnitThreshold[] thresholds, int thresholdMode, String testTimeMargin) { this.types = tools; this.thresholds = thresholds; this.thresholdMode = thresholdMode; + long longTestTimeMargin = XUnitDefaultValues.TEST_REPORT_TIME_MARGING; + if (testTimeMargin != null && testTimeMargin.trim().length() != 0) { + longTestTimeMargin = Long.parseLong(testTimeMargin); + } + this.extraConfiguration = new ExtraConfiguration(longTestTimeMargin); } public TestType[] getTypes() { @@ -57,17 +63,24 @@ public int getThresholdMode() { return thresholdMode; } + public ExtraConfiguration getExtraConfiguration() { + if (extraConfiguration == null) { + extraConfiguration = new ExtraConfiguration(XUnitDefaultValues.TEST_REPORT_TIME_MARGING); + } + return extraConfiguration; + } + @Override public boolean perform(final AbstractBuild build, Launcher launcher, final BuildListener listener) throws InterruptedException, IOException { - XUnitProcessor xUnitProcessor = new XUnitProcessor(types, thresholds, thresholdMode); + XUnitProcessor xUnitProcessor = new XUnitProcessor(getTypes(), getThresholds(), getThresholdMode(), getExtraConfiguration()); return xUnitProcessor.performXUnit(false, build, listener); } public boolean performDryRun(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { try { - XUnitProcessor xUnitProcessor = new XUnitProcessor(types, thresholds, thresholdMode); + XUnitProcessor xUnitProcessor = new XUnitProcessor(getTypes(), getThresholds(), getThresholdMode(), getExtraConfiguration()); xUnitProcessor.performXUnit(true, build, listener); } catch (Throwable t) { listener.getLogger().println("[ERROR] - There is an error: " + t.getCause().getMessage()); diff --git a/src/main/java/org/jenkinsci/plugins/xunit/XUnitDefaultValues.java b/src/main/java/org/jenkinsci/plugins/xunit/XUnitDefaultValues.java new file mode 100644 index 00000000..455d99f2 --- /dev/null +++ b/src/main/java/org/jenkinsci/plugins/xunit/XUnitDefaultValues.java @@ -0,0 +1,13 @@ +package org.jenkinsci.plugins.xunit; + +/** + * @author Gregory Boissinot + */ +public class XUnitDefaultValues { + + public static final String GENERATED_JUNIT_DIR = "generatedJUnitFiles"; + + public static final int MODE_PERCENT = 2; + + public static final int TEST_REPORT_TIME_MARGING = 3000; //default to 3000ms +} diff --git a/src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java b/src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java index 8d1dc756..f3c0e38e 100644 --- a/src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java +++ b/src/main/java/org/jenkinsci/plugins/xunit/XUnitProcessor.java @@ -29,18 +29,16 @@ */ public class XUnitProcessor { - public static final String GENERATED_JUNIT_DIR = "generatedJUnitFiles"; - - private static final int MODE_PERCENT = 2; - private TestType[] types; private XUnitThreshold[] thresholds; private int thresholdMode; + private ExtraConfiguration extraConfiguration; - public XUnitProcessor(TestType[] types, XUnitThreshold[] thresholds, int thresholdMode) { + public XUnitProcessor(TestType[] types, XUnitThreshold[] thresholds, int thresholdMode, ExtraConfiguration extraConfiguration) { this.types = types; this.thresholds = thresholds; this.thresholdMode = thresholdMode; + this.extraConfiguration = extraConfiguration; } public boolean performXUnit(boolean dryRun, AbstractBuild build, BuildListener listener) @@ -111,16 +109,19 @@ private boolean performTests(XUnitLog xUnitLog, AbstractBuild build, Build try { result = getWorkspace(build).act(xUnitTransformer); findTest = true; - } catch (NoTestException ne) { - xUnitLog.infoConsoleLogger("Fail BUILD."); + } catch (NoFoundTestException ne) { + xUnitLog.infoConsoleLogger("Failing BUILD."); throw new StopTestProcessingException(); } catch (SkipTestException se) { xUnitLog.infoConsoleLogger("Skipping the metric tool processing."); continue; + } catch (OldTestReportException se) { + xUnitLog.infoConsoleLogger("Failing BUILD."); + throw new StopTestProcessingException(); } if (!result && xUnitToolInfo.isStopProcessingIfError()) { - xUnitLog.infoConsoleLogger("Fail BUILD because 'set build failed if errors' option is activated."); + xUnitLog.infoConsoleLogger("Failing BUILD because 'set build failed if errors' option is activated."); throw new StopTestProcessingException(); } } @@ -173,6 +174,7 @@ protected void configure() { tool.isFailIfNotNew(), tool.isDeleteOutputFiles(), tool.isStopProcessingIfError(), build.getTimeInMillis(), + this.extraConfiguration.getTestTimeMargin(), (tool instanceof CustomType) ? getCustomStylesheet(tool, build, listener) : null); } @@ -282,7 +284,7 @@ private TestResult getTestResult(final AbstractBuild build, public TestResult invoke(File ws, VirtualChannel channel) throws IOException { final long nowSlave = System.currentTimeMillis(); - File generatedJunitDir = new File(ws, GENERATED_JUNIT_DIR); + File generatedJunitDir = new File(ws, XUnitDefaultValues.GENERATED_JUNIT_DIR); //Ignore return value generatedJunitDir.mkdirs(); FileSet fs = Util.createFileSet(generatedJunitDir, junitFilePattern); @@ -349,7 +351,7 @@ private Result processResultThreshold(XUnitLog log, for (XUnitThreshold threshold : thresholds) { log.infoConsoleLogger(String.format("Check '%s' threshold.", threshold.getDescriptor().getDisplayName())); Result result; - if (MODE_PERCENT == thresholdMode) { + if (XUnitDefaultValues.MODE_PERCENT == thresholdMode) { result = threshold.getResultThresholdPercent(log, build, testResultAction, previousTestResultAction); } else { result = threshold.getResultThresholdNumber(log, build, testResultAction, previousTestResultAction); @@ -371,14 +373,14 @@ private void processDeletion(boolean dryRun, AbstractBuild build, XUnitLog InputMetric inputMetric = tool.getInputMetric(); if (dryRun || tool.isDeleteOutputFiles()) { - getWorkspace(build).child(GENERATED_JUNIT_DIR + "/" + inputMetric.getToolName()).deleteRecursive(); + getWorkspace(build).child(XUnitDefaultValues.GENERATED_JUNIT_DIR + "/" + inputMetric.getToolName()).deleteRecursive(); } else { //Mark the tool file parent directory to no deletion keepJUnitDirectory = true; } } if (!keepJUnitDirectory) { - getWorkspace(build).child(GENERATED_JUNIT_DIR).deleteRecursive(); + getWorkspace(build).child(XUnitDefaultValues.GENERATED_JUNIT_DIR).deleteRecursive(); } } catch (IOException ioe) { throw new XUnitException("Problem on deletion", ioe); diff --git a/src/main/java/org/jenkinsci/plugins/xunit/XUnitPublisher.java b/src/main/java/org/jenkinsci/plugins/xunit/XUnitPublisher.java index b5b35afa..60b2a6cd 100755 --- a/src/main/java/org/jenkinsci/plugins/xunit/XUnitPublisher.java +++ b/src/main/java/org/jenkinsci/plugins/xunit/XUnitPublisher.java @@ -33,6 +33,7 @@ public class XUnitPublisher extends Recorder implements DryRun, Serializable { private TestType[] types; private XUnitThreshold[] thresholds; private int thresholdMode; + private ExtraConfiguration extraConfiguration; public XUnitPublisher(TestType[] types, XUnitThreshold[] thresholds) { this.types = types; @@ -41,10 +42,15 @@ public XUnitPublisher(TestType[] types, XUnitThreshold[] thresholds) { } @DataBoundConstructor - public XUnitPublisher(TestType[] tools, XUnitThreshold[] thresholds, int thresholdMode) { + public XUnitPublisher(TestType[] tools, XUnitThreshold[] thresholds, int thresholdMode, String testTimeMargin) { this.types = tools; this.thresholds = thresholds; this.thresholdMode = thresholdMode; + long longTestTimeMargin = XUnitDefaultValues.TEST_REPORT_TIME_MARGING; + if (testTimeMargin != null && testTimeMargin.trim().length() != 0) { + longTestTimeMargin = Long.parseLong(testTimeMargin); + } + this.extraConfiguration = new ExtraConfiguration(longTestTimeMargin); } public TestType[] getTypes() { @@ -59,6 +65,13 @@ public int getThresholdMode() { return thresholdMode; } + public ExtraConfiguration getExtraConfiguration() { + if (extraConfiguration == null) { + extraConfiguration = new ExtraConfiguration(XUnitDefaultValues.TEST_REPORT_TIME_MARGING); + } + return extraConfiguration; + } + @Override public Action getProjectAction(AbstractProject project) { JUnitResultArchiver jUnitResultArchiver = project.getPublishersList().get(JUnitResultArchiver.class); @@ -71,14 +84,14 @@ public Action getProjectAction(AbstractProject project) { @Override public boolean perform(final AbstractBuild build, Launcher launcher, final BuildListener listener) throws InterruptedException, IOException { - XUnitProcessor xUnitProcessor = new XUnitProcessor(types, thresholds, thresholdMode); + XUnitProcessor xUnitProcessor = new XUnitProcessor(getTypes(), getThresholds(), getThresholdMode(), getExtraConfiguration()); return xUnitProcessor.performXUnit(false, build, listener); } public boolean performDryRun(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { try { - XUnitProcessor xUnitProcessor = new XUnitProcessor(types, thresholds, thresholdMode); + XUnitProcessor xUnitProcessor = new XUnitProcessor(getTypes(), getThresholds(), getThresholdMode(), getExtraConfiguration()); xUnitProcessor.performXUnit(true, build, listener); } catch (Throwable t) { listener.getLogger().println("[ERROR] - There is an error: " + t.getCause().getMessage()); diff --git a/src/main/java/org/jenkinsci/plugins/xunit/service/XUnitReportProcessorService.java b/src/main/java/org/jenkinsci/plugins/xunit/service/XUnitReportProcessorService.java index c68189f3..919e47db 100644 --- a/src/main/java/org/jenkinsci/plugins/xunit/service/XUnitReportProcessorService.java +++ b/src/main/java/org/jenkinsci/plugins/xunit/service/XUnitReportProcessorService.java @@ -4,6 +4,7 @@ import hudson.Util; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.types.FileSet; +import org.jenkinsci.plugins.xunit.OldTestReportException; import java.io.File; import java.io.Serializable; @@ -73,14 +74,14 @@ public List findReports(XUnitToolInfo xUnitToolInfo, File parentPath, St * @param workspace the root location of the file list * @return true if all files are new, false otherwise */ - public boolean checkIfFindsFilesNewFiles(XUnitToolInfo xUnitToolInfo, List files, File workspace) { + public void checkIfFindsFilesNewFiles(XUnitToolInfo xUnitToolInfo, List files, File workspace) throws OldTestReportException { if (xUnitToolInfo.isFailIfNotNew()) { ArrayList oldResults = new ArrayList(); for (String value : files) { File reportFile = new File(workspace, value); // if the file was not updated this build, that is a problem - if (xUnitToolInfo.getBuildTime() - 3000 > reportFile.lastModified()) { + if (xUnitToolInfo.getBuildTime() - xUnitToolInfo.getTestTimeMargin() > reportFile.lastModified()) { oldResults.add(reportFile); } } @@ -94,7 +95,7 @@ public boolean checkIfFindsFilesNewFiles(XUnitToolInfo xUnitToolInfo, List +
+
+ + + + + + + + + +
+ + + +
+
+
+
+ \ No newline at end of file diff --git a/src/main/resources/org/jenkinsci/plugins/xunit/XUnitPublisher/config.jelly b/src/main/resources/org/jenkinsci/plugins/xunit/XUnitPublisher/config.jelly index aa150b58..f7f4d549 100755 --- a/src/main/resources/org/jenkinsci/plugins/xunit/XUnitPublisher/config.jelly +++ b/src/main/resources/org/jenkinsci/plugins/xunit/XUnitPublisher/config.jelly @@ -29,4 +29,27 @@ +
+
+ + + + + + + + + +
+ + + +
+
+
+
+ \ No newline at end of file diff --git a/src/test/java/org/jenkinsci/plugins/xunit/service/XUnitTransformerTest.java b/src/test/java/org/jenkinsci/plugins/xunit/service/XUnitTransformerTest.java index 7ba34e21..bfdb537f 100644 --- a/src/test/java/org/jenkinsci/plugins/xunit/service/XUnitTransformerTest.java +++ b/src/test/java/org/jenkinsci/plugins/xunit/service/XUnitTransformerTest.java @@ -10,7 +10,7 @@ import com.thalesgroup.dtkit.metrics.model.OutputMetric; import hudson.model.BuildListener; import hudson.remoting.VirtualChannel; -import org.jenkinsci.plugins.xunit.NoTestException; +import org.jenkinsci.plugins.xunit.NoFoundTestException; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; @@ -112,7 +112,7 @@ public OutputMetric getOutputFormatType() { } - @Test(expected = NoTestException.class) + @Test(expected = NoFoundTestException.class) public void emptyResultFiles() throws Exception { //Test result @@ -130,9 +130,11 @@ public void emptyResultFiles() throws Exception { public void checkFailedNewFiles() throws Exception { //Recording behaviour : testing not empty result files found and a false check - List resultFiles = Arrays.asList("a.txt"); + String fileName = "a.txt"; + File fileReport = new File(fileName); + List resultFiles = Arrays.asList(fileName); when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(false); + when(xUnitReportProcessorServiceMock.getCurrentReport(any(File.class), anyString())).thenReturn(fileReport); //Test result Assert.assertFalse(xUnitTransformer.invoke(tempWorkspace.getDir(), mock(VirtualChannel.class))); @@ -145,6 +147,7 @@ public void checkFailedNewFiles() throws Exception { InOrder inOrder = inOrder(xUnitReportProcessorServiceMock); inOrder.verify(xUnitReportProcessorServiceMock).findReports(any(XUnitToolInfo.class), any(File.class), anyString()); inOrder.verify(xUnitReportProcessorServiceMock).checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class)); + } @Test @@ -157,9 +160,6 @@ public void oneFileEmptyWithStopActivated() throws Exception { //Stop processing when there is an error when(xUnitReportProcessorServiceMock.isStopProcessingIfError(any(XUnitToolInfo.class))).thenReturn(true); - //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); - //Wants to call the real method checkFileIsNotEmpty when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenCallRealMethod(); @@ -194,9 +194,6 @@ public void oneFileEmptyWithStopNotActivated() throws Exception { //Stop processing when there is an error when(xUnitReportProcessorServiceMock.isStopProcessingIfError(any(XUnitToolInfo.class))).thenReturn(false); - //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); - //Wants to call the real method checkFileIsNotEmpty when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenCallRealMethod(); @@ -228,7 +225,6 @@ public void oneFileNotEmptyStopActivated() throws Exception { when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -268,7 +264,6 @@ public void oneFileNotEmptyStopNotActivated() throws Exception { when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Case: Right input validation, conversion and right output validation when(xUnitValidationServiceMock.validateInputFile(any(XUnitToolInfo.class), any(File.class))).thenReturn(true); @@ -313,7 +308,6 @@ public void oneFileNotEmptyWithOneFileEmptyWithStopActivated() throws Exception when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -357,7 +351,6 @@ public void oneFileNotEmptyAndOneFileEmptyAndStopNotActivated() throws Exception when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -399,7 +392,6 @@ public void twoFilesNotEmptyWithStopActivated() throws Exception { when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -439,7 +431,6 @@ public void twoFilesNotEmptyWithStopNotActivated() throws Exception { when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -479,7 +470,6 @@ public void checkedFailedValidationInputWihOneFileWithStopActivated() throws Exc when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -516,7 +506,6 @@ public void checkedFailedValidationInputWihOneFileWithStopNotActivated() throws when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -554,7 +543,6 @@ public void checkedFailedValidationInputWihOneFileFollowedByOneValidFileWithStop when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -602,7 +590,6 @@ public void checkedFailedValidationInputWihOneFileFollowedByOneValidFileWithStop when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -649,7 +636,6 @@ public void checkedFailedValidationOutputWihOneFileWithStopActivated() throws Ex when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -690,7 +676,6 @@ public void checkedFailedValidationOutputWihOneFileWithStopNotActivated() throws when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -731,7 +716,6 @@ public void checkedFailedValidationOutputWihTwoFilesWithStopActivated() throws E when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error @@ -773,7 +757,6 @@ public void checkedFailedValidationOutputWihTwoFilesWithStopNotActivated() throw when(xUnitReportProcessorServiceMock.findReports(any(XUnitToolInfo.class), any(File.class), anyString())).thenReturn(resultFiles); //Check OK - when(xUnitReportProcessorServiceMock.checkIfFindsFilesNewFiles(any(XUnitToolInfo.class), eq(resultFiles), any(File.class))).thenReturn(true); when(xUnitValidationServiceMock.checkFileIsNotEmpty(any(File.class))).thenReturn(true); //Stop processing when there is an error