Code intended to be deleted still present. Removed to check if issue was caused by this code.

This commit is contained in:
Jack Walker
2020-04-23 13:43:19 +10:00
parent 0b30172224
commit 6ff10cb5dd
4 changed files with 0 additions and 54 deletions

View File

@@ -79,23 +79,10 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
http_hook_server.start
end
# Authenticate to REST API & pull the token from the response
# @response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
# @token = JSON.parse(@response)['token']
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
@caps["browserstack.local"] = true
@caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER']
# @enable_local = @caps["browserstack.local"] && @caps["browserstack.local"].to_s == "true"
# puts "enable_local is #{@enable_local.to_s.upcase}"
# # Code to start browserstack local before start of test
# if @enable_local &&
# @bs_local = BrowserStack::Local.new
# bs_local_args = { "key" => CONFIG['key'], "forcelocal" => true }
# @bs_local.start(bs_local_args)
# end
@driver = Selenium::WebDriver.for(:remote,
:url => "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub",
@@ -115,9 +102,6 @@ RSpec.describe 'AutoRunEngine Test', :run_on_browserstack => true do
after(:all) do
@driver.quit
# Code to stop browserstack local after end of test
# @bs_local.stop if @enable_local
print_info "Shutting down server"
Process.kill("KILL",@pid)
Process.kill("KILL",@pids)

View File

@@ -76,23 +76,10 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
# Give the server time to start-up
sleep 1
# Authenticate to REST API & pull the token from the response
# @response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
# @token = JSON.parse(@response)['token']
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
@caps["browserstack.local"] = true
@caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER']
# @enable_local = @caps["browserstack.local"] && @caps["browserstack.local"].to_s == "true"
# puts "enable_local is #{@enable_local.to_s.upcase}"
# # Code to start browserstack local before start of test
# if @enable_local &&
# @bs_local = BrowserStack::Local.new
# bs_local_args = { "key" => CONFIG['key'], "forcelocal" => true }
# @bs_local.start(bs_local_args)
# end
@driver = Selenium::WebDriver.for(:remote,
:url => "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub",
@@ -112,9 +99,6 @@ RSpec.describe 'Browser Details Handler', :run_on_browserstack => true do
after(:all) do
@driver.quit
# Code to stop browserstack local after end of test
# @bs_local.stop if @enable_local
print_info "Shutting down server"
Process.kill("KILL",@pid)
Process.kill("KILL",@pids)

View File

@@ -62,16 +62,10 @@ RSpec.describe 'BeEF WebSockets: Browser Hooking', :run_on_browserstack => true
# wait for server to start
sleep 1
# Authenticate to REST API & pull the token from the response
# @response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
# @token = JSON.parse(@response)['token']
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
@caps["browserstack.local"] = true
@caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER']
@enable_local = @caps["browserstack.local"] && @caps["browserstack.local"].to_s == "true"
@driver = Selenium::WebDriver.for(:remote,
:url => "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub",

View File

@@ -75,23 +75,10 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
# Give the server time to start-up
sleep 1
# Authenticate to REST API & pull the token from the response
# @response = RestClient.post "#{RESTAPI_ADMIN}/login", { 'username': "#{@username}", 'password': "#{@password}" }.to_json, :content_type => :json
# @token = JSON.parse(@response)['token']
@caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID])
@caps["name"] = self.class.description || ENV['name'] || 'no-name'
@caps["browserstack.local"] = true
@caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER']
# @enable_local = @caps["browserstack.local"] && @caps["browserstack.local"].to_s == "true"
# puts "enable_local is #{@enable_local.to_s.upcase}"
# # Code to start browserstack local before start of test
# if @enable_local &&
# @bs_local = BrowserStack::Local.new
# bs_local_args = { "key" => CONFIG['key'], "forcelocal" => true }
# @bs_local.start(bs_local_args)
# end
@driver = Selenium::WebDriver.for(:remote,
:url => "http://#{CONFIG['user']}:#{CONFIG['key']}@#{CONFIG['server']}/wd/hub",
@@ -119,9 +106,6 @@ RSpec.describe 'BeEF Debug Command Modules:', :run_on_browserstack => true do
after(:all) do
@driver.quit
# Code to stop browserstack local after end of test
# @bs_local.stop if @enable_local
print_info "Shutting down server"
Process.kill("KILL",@pid)
Process.kill("KILL",@pids)