From 1cb7103df6b0560f8a4c53d923eefececff70764 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 23 Apr 2020 08:53:41 +1000 Subject: [PATCH] Today is a new day --- .travis.yml | 45 ++++++++++--------- local.log | 24 ++++++++++ spec/spec_helper.rb | 11 ++--- ....config.yml => win10_chrome_81.config.yml} | 0 ...t.config.yml => win8_chrome_81.config.yml} | 3 +- .../windows/windows_chrome_latest.config.yml | 12 ----- 6 files changed, 53 insertions(+), 42 deletions(-) rename spec/support/browserstack/windows/win_10/{win10_chrome_latest.config.yml => win10_chrome_81.config.yml} (100%) rename spec/support/browserstack/windows/win_8/{win8_chrome_latest.config.yml => win8_chrome_81.config.yml} (77%) delete mode 100644 spec/support/browserstack/windows/windows_chrome_latest.config.yml diff --git a/.travis.yml b/.travis.yml index 9140964df..f48f0ddd2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ branches: before_script: - RUBY_VERSION=/bin/bash rvm current - sed -i -E 's/system\((.*?)\)/""/g' /home/travis/.rvm/gems/$RUBY_VERSION/gems/browserstack-local-1.3.0/lib/browserstack/local.rb - - yes | ./update-geoipdb env: # - CONFIG_FILE=osx/catalina/catalina_chrome_39.config.yml # - CONFIG_FILE=osx/catalina/catalina_chrome_59.config.yml @@ -30,28 +29,30 @@ env: # - CONFIG_FILE=osx/snow_leopard/snowleopard_chrome_35.config.yml # - CONFIG_FILE=osx/snow_leopard/snowleopard_chrome_49.config.yml # - CONFIG_FILE=osx/snow_leopard/snowleopard_firefox_5.config.yml + # - CONFIG_FILE=osx/snow_leopard/snowleopard_firefox_38esr.config.yml # - CONFIG_FILE=osx/snow_leopard/snowleopard_firefox_42.config.yml - - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml - # - CONFIG_FILE=windows/windows_chrome_latest.config.yml + # - CONFIG_FILE=osx/snow_leopard/snowleopard_safari_5-1.config.yml + # - CONFIG_FILE=windows/win_10/win10_chrome_37.config.yml + # - CONFIG_FILE=windows/win_10/win10_chrome_59.config.yml + - CONFIG_FILE=windows/win_10/win10_chrome_81.config.yml + # - CONFIG_FILE=windows/win_10/win10_firefox_32.config.yml + # - CONFIG_FILE=windows/win_10/win10_firefox_68esr.config.yml + # - CONFIG_FILE=windows/win_10/win10_firefox_75.config.yml + # - CONFIG_FILE=windows/win_10/win10_edge_81.config.yml + # - CONFIG_FILE=windows/win_10/win10_ie_11.config.yml + # - CONFIG_FILE=windows/win_8/win8_chrome_22.config.yml + # - CONFIG_FILE=windows/win_8/win8_chrome_81.config.yml + # - CONFIG_FILE=windows/win_8/win8_firefox_32.config.yml + # - CONFIG_FILE=windows/win_8/win8_firefox_75.config.yml + # - CONFIG_FILE=windows/win_8/win8_edge_81.config.yml + # - CONFIG_FILE=windows/win_8/win8_ie_10.config.yml + # - CONFIG_FILE=windows/xp/xp_chrome_14.config.yml + # - CONFIG_FILE=windows/xp/xp_chrome_28.config.yml + # - CONFIG_FILE=windows/xp/xp_chrome_43.config.yml + # - CONFIG_FILE=windows/xp/xp_firefox_5.config.yml + # - CONFIG_FILE=windows/xp/xp_firefox_45esr.config.yml + # - CONFIG_FILE=windows/xp/xp_firefox_47.config.yml + # - CONFIG_FILE=windows/xp/xp_ie_7.config.yml # jobs: # include: # - name: "Full Test Suite 2.5.3" diff --git a/local.log b/local.log index 57505930c..b599d64a4 100644 --- a/local.log +++ b/local.log @@ -1982,3 +1982,27 @@ You can now access your local server(s) in our remote browser. Press Ctrl-C to exit + + +To test an internal server, run: +./BrowserStackLocal --key +Example: +./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1 + +To test HTML files, run: +./BrowserStackLocal --key --folder +Example: +./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1 --folder /Applications/MAMP/htdocs/example/ + + + +To test an internal server, run: +./BrowserStackLocal --key +Example: +./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1 + +To test HTML files, run: +./BrowserStackLocal --key --folder +Example: +./BrowserStackLocal --key DsVSdoJPBi2z44sbGFx1 --folder /Applications/MAMP/htdocs/example/ + diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 26775c1fe..18c5c6f18 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -68,6 +68,7 @@ RSpec.configure do |config| raise ActiveRecord::Rollback end end + # BrowserStack config.around(:example, :run_on_browserstack => true) do |example| @caps = CONFIG['common_caps'].merge(CONFIG['browser_caps'][TASK_ID]) @@ -77,7 +78,7 @@ RSpec.configure do |config| # 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_args = { "key" => CONFIG['key'], "forcelocal" => true, "force" => true } @bs_local.start(bs_local_args) @caps["browserstack.local"] = true @caps['browserstack.localIdentifier'] = ENV['BROWSERSTACK_LOCAL_IDENTIFIER'] @@ -92,12 +93,8 @@ RSpec.configure do |config| @driver.navigate.to "#{VICTIM_URL}" # Give time for browser hook to occur - sleep 2 - - # Identify Session ID of victim generated above - @hooks = RestClient.get "#{RESTAPI_HOOKS}?token=#{@token}" - @session = JSON.parse(@hooks)['hooked-browsers']['online']['0']['session'] - + sleep 2 + begin example.run ensure diff --git a/spec/support/browserstack/windows/win_10/win10_chrome_latest.config.yml b/spec/support/browserstack/windows/win_10/win10_chrome_81.config.yml similarity index 100% rename from spec/support/browserstack/windows/win_10/win10_chrome_latest.config.yml rename to spec/support/browserstack/windows/win_10/win10_chrome_81.config.yml diff --git a/spec/support/browserstack/windows/win_8/win8_chrome_latest.config.yml b/spec/support/browserstack/windows/win_8/win8_chrome_81.config.yml similarity index 77% rename from spec/support/browserstack/windows/win_8/win8_chrome_latest.config.yml rename to spec/support/browserstack/windows/win_8/win8_chrome_81.config.yml index 3f739146b..2c5a9dba9 100644 --- a/spec/support/browserstack/windows/win_8/win8_chrome_latest.config.yml +++ b/spec/support/browserstack/windows/win_8/win8_chrome_81.config.yml @@ -1,7 +1,7 @@ server: "hub-cloud.browserstack.com" common_caps: - "build": "Windows 8 Chrome Latest" + "build": "Windows 8 Chrome 81" "project": "BeEF" "browserstack.local": true "browserstack.video": false @@ -9,5 +9,6 @@ common_caps: browser_caps: - "browser": "chrome" + "browser_version": "81.0" "os": "windows" "os_version": "8" \ No newline at end of file diff --git a/spec/support/browserstack/windows/windows_chrome_latest.config.yml b/spec/support/browserstack/windows/windows_chrome_latest.config.yml deleted file mode 100644 index df54d3507..000000000 --- a/spec/support/browserstack/windows/windows_chrome_latest.config.yml +++ /dev/null @@ -1,12 +0,0 @@ -server: "hub-cloud.browserstack.com" - -common_caps: - "build": "Windows Chrome Latest" - "project": "BeEF" - "browserstack.local": true - "browserstack.video": false - -browser_caps: - - - "browser": "chrome" - "os": "windows" \ No newline at end of file