-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from zabetak/split-parameterized-tests
- Loading branch information
Showing
7 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
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
58 changes: 58 additions & 0 deletions
58
.../org/jenkinsci/plugins/parallel_test_executor/testmode/JavaParameterizedTestCaseName.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,58 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to you under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.jenkinsci.plugins.parallel_test_executor.testmode; | ||
|
||
import edu.umd.cs.findbugs.annotations.NonNull; | ||
import hudson.Extension; | ||
import hudson.model.Descriptor; | ||
import org.jenkinsci.Symbol; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
/** | ||
* This mode works best with java projects. | ||
* <p> | ||
* Parallelize per java test case including parameters if present. | ||
* </p> | ||
* <p> | ||
* It is also able to estimate tests to run from the workspace content if no historical context could be found. | ||
* </p> | ||
*/ | ||
public class JavaParameterizedTestCaseName extends JavaClassName { | ||
@DataBoundConstructor | ||
public JavaParameterizedTestCaseName() { | ||
} | ||
|
||
@Override | ||
public boolean isSplitByCase() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public boolean useParameters() { | ||
return true; | ||
} | ||
|
||
@Extension | ||
@Symbol("javaParamTestCase") | ||
public static class DescriptorImpl extends Descriptor<TestMode> { | ||
@Override | ||
@NonNull | ||
public String getDisplayName() { | ||
return "By Java test cases with parameters"; | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...jenkinsci/plugins/parallel_test_executor/testmode/JavaParameterizedTestCaseName/help.html
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,7 @@ | ||
<div> | ||
This mode works best with Java projects. | ||
<p> | ||
Parallelize per Java test case including parameters. | ||
<p> | ||
It is also able to estimate tests (per class) to run from the workspace content if no historical context could be found. | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...esources/org/jenkinsci/plugins/parallel_test_executor/testmode/JavaTestCaseName/help.html
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<div> | ||
This mode works best with Java projects. | ||
<p> | ||
Parallelize per Java test case. | ||
Parallelize per Java test case ignoring parameters. If parameters are present they are considered the same test. | ||
<p> | ||
It is also able to estimate tests (per class) to run from the workspace content if no historical context could be found. | ||
</div> |
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
25 changes: 25 additions & 0 deletions
25
...xecutor/ParallelTestExecutorUnitTest/findTestCasesWithParametersIncluded/report-Test1.xml
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,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<testsuite name="org.jenkinsci.plugins.parallel_test_executor.Test1" time="112.22" tests="21" errors="0" skipped="0" failures="0"> | ||
<testcase name="testCase[param1]" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="1.00"/> | ||
<testcase name="testCase[param2]" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="1.00"/> | ||
<testcase name="testCase[param3]" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="1.00"/> | ||
<testcase name="test1Case2" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="2.00"/> | ||
<testcase name="test1Case3" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="3.00"/> | ||
<testcase name="test1Case4" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="4.00"/> | ||
<testcase name="test1Case5" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="5.00"/> | ||
<testcase name="test1Case6" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="6.00"/> | ||
<testcase name="test1Case7" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="7.00"/> | ||
<testcase name="test1Case8" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="8.00"/> | ||
<testcase name="test1Case9" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="9.00"/> | ||
<testcase name="test1Case10" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="10.00"/> | ||
<testcase name="test1Case11" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="1.00"/> | ||
<testcase name="test1Case12" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="2.00"/> | ||
<testcase name="test1Case13" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="3.00"/> | ||
<testcase name="test1Case14" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="4.00"/> | ||
<testcase name="test1Case15" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="5.00"/> | ||
<testcase name="test1Case16" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="6.00"/> | ||
<testcase name="test1Case17" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="7.00"/> | ||
<testcase name="test1Case18" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="8.00"/> | ||
<testcase name="test1Case19" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="9.00"/> | ||
<testcase name="test1Case20" classname="org.jenkinsci.plugins.parallel_test_executor.Test1" time="10.22"/> | ||
</testsuite> |