Skip to content

Commit

Permalink
[JENKINS-9246] Added test case that was attached to the issue report.
Browse files Browse the repository at this point in the history
  • Loading branch information
redsolo committed May 6, 2011
1 parent f0d4cc5 commit 8a09775
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/test/java/hudson/plugins/nunit/NUnitIntegrationTest.java
Expand Up @@ -11,16 +11,23 @@

public class NUnitIntegrationTest extends HudsonTestCase {

@Bug(5673)
@LocalData
public void testIssue5673() throws Exception {
FreeStyleProject project = (FreeStyleProject) hudson.getItem("5673");
FreeStyleBuild build = project.scheduleBuild2(0).get();
assertBuildStatus(Result.UNSTABLE, build);
AbstractTestResultAction action = build.getAction(AbstractTestResultAction.class);
// For some reason the total count returned is 1338 but the number of tests
// displayed in Jenkins when run outside test is 1355 (which is correct)
// Very strange......
assertTrue("The number of test counts should be larger than 1330", action.getTotalCount() > 1330);
}
@Bug(5673)
@LocalData
public void testIssue5673() throws Exception {
FreeStyleProject project = (FreeStyleProject) hudson.getItem("5673");
FreeStyleBuild build = project.scheduleBuild2(0).get();
assertBuildStatus(Result.UNSTABLE, build);
AbstractTestResultAction action = build.getAction(AbstractTestResultAction.class);
assertEquals("The number of tests is not correct", 1355, action.getTotalCount());
}

@Bug(9246)
@LocalData
public void testIssue9246() throws Exception {
FreeStyleProject project = (FreeStyleProject) hudson.getItem("9246");
FreeStyleBuild build = project.scheduleBuild2(0).get();
assertBuildStatus(Result.UNSTABLE, build);
AbstractTestResultAction action = build.getAction(AbstractTestResultAction.class);
assertEquals("The number of tests is not correct", 5454, action.getTotalCount());
}
}
Binary file not shown.

0 comments on commit 8a09775

Please sign in to comment.