File tree Expand file tree Collapse file tree
src/test/java/com/browserstack/local Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010import static org .junit .Assert .assertFalse ;
1111import static org .junit .Assert .assertTrue ;
12+ import static org .junit .Assume .assumeNotNull ;
1213
1314public class BrowserStackLocalTest {
1415 private Local l ;
@@ -23,13 +24,21 @@ public void setUp() throws Exception {
2324
2425 @ Test
2526 public void testIsRunning () throws Exception {
27+ // Live integration test: starts a real BrowserStack Local tunnel, so it
28+ // requires a valid BROWSERSTACK_ACCESS_KEY (provided via CI secrets).
29+ // Skip gracefully when the key is absent instead of failing with an NPE.
30+ assumeNotNull (System .getenv ("BROWSERSTACK_ACCESS_KEY" ));
2631 assertFalse (l .isRunning ());
2732 l .start (options );
2833 assertTrue (l .isRunning ());
2934 }
3035
3136 @ Test
3237 public void testMultipleBinary () throws Exception {
38+ // Live integration test: starts real BrowserStack Local tunnels, so it
39+ // requires a valid BROWSERSTACK_ACCESS_KEY (provided via CI secrets).
40+ // Skip gracefully when the key is absent instead of failing with an NPE.
41+ assumeNotNull (System .getenv ("BROWSERSTACK_ACCESS_KEY" ));
3342 l .start (options );
3443 assertTrue (l .isRunning ());
3544 Local l2 = new Local ();
You can’t perform that action at this time.
0 commit comments