Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source "http://rubygems.org"
source "https://rubygems.org"
gem "minitest"
gem "rake"
gem "json"
17 changes: 12 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
GEM
remote: http://rubygems.org/
remote: https://rubygems.org/
specs:
json (1.8.3)
minitest (5.8.4)
rake (12.3.3)
drb (2.2.3)
json (2.21.2)
minitest (6.0.6)
drb (~> 2.0)
prism (~> 1.5)
prism (1.9.0)
rake (13.4.2)

PLATFORMS
aarch64-linux
arm64-darwin-24
ruby
x86_64-linux

DEPENDENCIES
json
minitest
rake

BUNDLED WITH
1.11.2
2.7.1
11 changes: 11 additions & 0 deletions test/browserstack-local-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@ def setup
@bs_local = BrowserStack::Local.new
end

# The tests below actually start the BrowserStackLocal binary and open a
# tunnel, so they need a valid BROWSERSTACK_ACCESS_KEY and network access.
# Skip them (instead of erroring) when no key is available so the rest of
# the suite stays green in credential-less environments such as CI.
def skip_without_credentials
skip 'requires BROWSERSTACK_ACCESS_KEY (live integration test)' if ENV['BROWSERSTACK_ACCESS_KEY'].to_s.empty?
end

def test_check_pid
skip_without_credentials
@bs_local.start
refute_nil @bs_local.pid, 0
end

def test_is_running
skip_without_credentials
@bs_local.start
assert_equal true, @bs_local.isRunning
end

def test_multiple_binary
skip_without_credentials
@bs_local.start
bs_local_2 = BrowserStack::Local.new
second_log_file = File.join(Dir.pwd, 'local2.log')
Expand Down
Loading