File tree 2 files changed +13
-0
lines changed
main/java/com/saucelabs/saucebindings
test/java/com/saucelabs/saucebindings/integration
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public class SauceSession {
17
17
@ Getter @ Setter private DataCenter dataCenter = DataCenter .US_WEST ;
18
18
@ Getter private final SauceOptions sauceOptions ;
19
19
@ Setter private URL sauceUrl ;
20
+ @ Getter private String result ;
20
21
21
22
@ Getter private RemoteWebDriver driver ;
22
23
@@ -86,6 +87,7 @@ public void stop(String result) {
86
87
}
87
88
88
89
private void updateResult (String result ) {
90
+ this .result = result ;
89
91
getDriver ().executeScript ("sauce:job-result=" + result );
90
92
// Add output for the Sauce OnDemand Jenkins plugin
91
93
// The first print statement will automatically populate links on Jenkins to Sauce
Original file line number Diff line number Diff line change 8
8
import org .junit .Test ;
9
9
import org .openqa .selenium .remote .RemoteWebDriver ;
10
10
11
+ import static org .junit .Assert .assertEquals ;
11
12
import static org .junit .Assert .assertNotNull ;
12
13
import static org .junit .Assert .assertTrue ;
13
14
@@ -58,4 +59,14 @@ public void runsEUCentral() {
58
59
assertNotNull (webDriver );
59
60
assertTrue (session .getSauceUrl ().toString ().contains ("eu-central-1" ));
60
61
}
62
+
63
+ @ Test
64
+ public void storesResultOfFirstStop () {
65
+ session .start ();
66
+
67
+ session .stop (true );
68
+ session .stop (false );
69
+
70
+ assertEquals ("passed" , session .getResult ());
71
+ }
61
72
}
You can’t perform that action at this time.
0 commit comments