Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
889b673
commit 7f98236
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
src/main/java/org/jenkinsci/plugins/xunit/types/QTestlibInputMetric.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.jenkinsci.plugins.xunit.types; | ||
|
||
import com.thalesgroup.dtkit.junit.model.JUnitModel; | ||
import com.thalesgroup.dtkit.metrics.model.InputMetricXSL; | ||
import com.thalesgroup.dtkit.metrics.model.InputType; | ||
import com.thalesgroup.dtkit.metrics.model.OutputMetric; | ||
|
||
/** | ||
* @author Gregory Boissinot | ||
*/ | ||
public class QTestLibInputMetric extends InputMetricXSL { | ||
|
||
@Override | ||
public InputType getToolType() { | ||
return InputType.TEST; | ||
} | ||
|
||
@Override | ||
public String getToolVersion() { | ||
return "Version N/A"; | ||
} | ||
|
||
@Override | ||
public String getToolName() { | ||
return "QTestlib"; | ||
} | ||
|
||
@Override | ||
public boolean isDefault() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String getXslName() { | ||
return "qtestlib-to-junit-4.xsl"; | ||
} | ||
|
||
@Override | ||
public String[] getInputXsdNameList() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public OutputMetric getOutputFormatType() { | ||
return JUnitModel.OUTPUT_JUNIT_4; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
src/main/java/org/jenkinsci/plugins/xunit/types/QTestlibType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package org.jenkinsci.plugins.xunit.types; | ||
|
||
import com.thalesgroup.dtkit.metrics.hudson.api.descriptor.TestTypeDescriptor; | ||
import com.thalesgroup.dtkit.metrics.hudson.api.type.TestType; | ||
import com.thalesgroup.dtkit.metrics.model.InputMetric; | ||
import com.thalesgroup.dtkit.metrics.model.InputMetricException; | ||
import com.thalesgroup.dtkit.metrics.model.InputMetricFactory; | ||
import hudson.Extension; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* @author Gregory Boissinot | ||
*/ | ||
public class QTestLibType extends TestType { | ||
|
||
@DataBoundConstructor | ||
public QTestLibType(String pattern, boolean failIfNotNew, boolean deleteOutputFiles, boolean stopProcessingIfError) { | ||
super(pattern, failIfNotNew, deleteOutputFiles, stopProcessingIfError); | ||
} | ||
|
||
@Extension | ||
public static class QTestLibTypeDescriptor extends TestTypeDescriptor<QTestLibType> { | ||
|
||
public QTestLibTypeDescriptor() { | ||
super(QTestLibType.class, null); | ||
} | ||
|
||
@Override | ||
public String getId() { | ||
return this.getClass().getName(); | ||
} | ||
|
||
@Override | ||
public InputMetric getInputMetric() { | ||
try { | ||
return InputMetricFactory.getInstance(CheckInputMetric.class); | ||
} catch (InputMetricException e) { | ||
throw new RuntimeException("Can't create the inputMetric object for the class " + CheckInputMetric.class); | ||
} | ||
} | ||
} | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
src/test/java/org/jenkinsci/plugins/xunit/types/QTestlibTypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.jenkinsci.plugins.xunit.types; | ||
|
||
import org.junit.Test; | ||
|
||
/** | ||
* @author Gregory Boissinot | ||
*/ | ||
public class QTestLibTypeTest extends AbstractTest { | ||
|
||
@Test | ||
public void testTestCase1() throws Exception { | ||
convertAndValidate(QTestLibInputMetric.class,"qtestlib/testcase1/input.xml", "qtestlib/testcase1/result.xml"); | ||
} | ||
} |
7f98236
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jenkins » xunit-plugin #12 FAILURE
Looks like this commit caused a build failure
(what's this?)