Add integration test for MSTestRunner (#1328)
This commit is contained in:
parent
958e5b40e9
commit
52ed3feeba
|
|
@ -0,0 +1,15 @@
|
|||
# Configure MSBuild
|
||||
|
||||
Basic configuration of [MSTestRunner](https://plugins.jenkins.io/mstestrunner/) plugin.
|
||||
|
||||
## Sample configuration
|
||||
|
||||
```yaml
|
||||
tool:
|
||||
msTestInstallation:
|
||||
installations:
|
||||
- defaultArgs: "/category:SmokeTests"
|
||||
home: "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe"
|
||||
name: "MSTest test"
|
||||
omitNoIsolation: true
|
||||
```
|
||||
|
|
@ -464,6 +464,13 @@
|
|||
<version>1.29</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>mstestrunner</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package io.jenkins.plugins.casc;
|
||||
|
||||
import hudson.ExtensionList;
|
||||
import io.jenkins.plugins.casc.misc.ConfiguredWithReadme;
|
||||
import io.jenkins.plugins.casc.misc.JenkinsConfiguredWithReadmeRule;
|
||||
import org.jenkinsci.plugins.MsTestInstallation;
|
||||
import org.jenkinsci.plugins.MsTestInstallation.DescriptorImpl;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class MSTestRunnerTest {
|
||||
@Rule
|
||||
public JenkinsConfiguredWithReadmeRule j = new JenkinsConfiguredWithReadmeRule();
|
||||
|
||||
@Test
|
||||
@ConfiguredWithReadme("mstestrunner/README.md")
|
||||
public void configure_mstestrunner() {
|
||||
final DescriptorImpl msTestRunnerDescriptor = ExtensionList.lookupSingleton(DescriptorImpl.class);
|
||||
assertNotNull(msTestRunnerDescriptor);
|
||||
assertEquals(1, msTestRunnerDescriptor.getInstallations().length);
|
||||
|
||||
final MsTestInstallation msTestRunnerInstallation = msTestRunnerDescriptor.getInstallations()[0];
|
||||
assertEquals("MSTest test", msTestRunnerInstallation.getName());
|
||||
assertEquals("C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe", msTestRunnerInstallation.getHome());
|
||||
assertEquals("/category:SmokeTests", msTestRunnerInstallation.getDefaultArgs());
|
||||
assertTrue(msTestRunnerInstallation.getOmitNoIsolation());
|
||||
}
|
||||
}
|
||||
|
|
@ -6,3 +6,9 @@ jdk:
|
|||
installations:
|
||||
- home: "/jdk"
|
||||
name: "default"
|
||||
msTestInstallation:
|
||||
installations:
|
||||
- defaultArgs: "/category:SmokeTests"
|
||||
home: "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\MSTest.exe"
|
||||
name: "MSTest test"
|
||||
omitNoIsolation: true
|
||||
|
|
|
|||
Loading…
Reference in New Issue