1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.testtools.selenium;
17
18 import org.junit.After;
19 import org.junit.Before;
20 import org.junit.Test;
21
22 import java.net.MalformedURLException;
23 import java.util.Set;
24
25
26
27
28 public class JenkinsLastCompletedBuildNumber extends JenkinsJsonJobResultsBase {
29
30 @Before
31 public void setUp() throws MalformedURLException, InterruptedException {
32 super.setUp();
33 }
34
35 @After
36 public void tearDown() {
37 closeAndQuitWebDriver();
38 }
39
40 @Test
41 public void testLastCompletedBuildNumber() throws Exception {
42 String lastNumbers = "";
43 Set<String> jobs = jobsBuildsMap.keySet();
44 for (String job : jobs) {
45 try {
46 String jobNumber = fetchLastCompletedBuildNumber(job);
47 lastNumbers += job + ":" + jobNumber + ",";
48 } catch (Exception e) {
49 System.err.println(job + ":" + e.getMessage());
50 passed = false;
51 }
52 }
53 System.out.println(lastNumbers.substring(0, lastNumbers.length() - 1));
54 }
55
56 }