Skip to content

Instantly share code, notes, and snippets.

View evanniedojadlo's full-sized avatar
💭
Stone in Focus 🗿

Evan Niedojadło evanniedojadlo

💭
Stone in Focus 🗿
View GitHub Profile
import pytest
from pages import seller_page
import inspect
class DamageModalTest():
@pytest.fixture
def load_seller_page(self, driver):
return seller_page.SellerPage(driver)
@evanniedojadlo
evanniedojadlo / seller_page.py
Created May 16, 2017 20:55
resides in /pages
from selenium.webdriver.common.by import By
from base_page import BasePage
class SellerPage(BasePage):
_login_form = {"by": By.ID, "value": "navbar-collapse"}
_username_input = {"by": By.ID, "value": "loginEmailInput"}
_password_input = {"by": By.ID, "value": "loginPasswordInput"}
_submit_button = {"by": By.ID, "value": "loginBtn"}
_success_message = {"by": By.CSS_SELECTOR, "value": ".myofferPanelBody"}
@evanniedojadlo
evanniedojadlo / gemfile
Created February 6, 2017 04:16
This is the gemfile that will be within the same directory
source 'https://rubygems.org'
gem 'rspec', '~> 3.5.0'
gem 'selenium-webdriver', '~> 3.0.3'
@evanniedojadlo
evanniedojadlo / peddle_buyer_login_test.rb
Created February 6, 2017 04:14
Modify this seller login so that it applies to the buyer beta site
require 'selenium-webdriver'
describe 'Login' do
before(:each) do
#@driver = Selenium::WebDriver.for :firefox, desired_capabilities: { marionette: false }
geckodriver = File.join(Dir.pwd, 'vendor', 'geckodriver')
@driver = Selenium::WebDriver.for :firefox, driver_path: geckodriver
end
@evanniedojadlo
evanniedojadlo / powershell-teamcity
Created February 3, 2017 16:19
Powershell script for TeamCity to perform installations via build
Powershell:
$client = new-object System.Net.WebClient
$client.DownloadFile("https://dl.bintray.com/oneclick/rubyinstaller/ruby-2.3.3-x64-mingw32.7z", "RubyInstaller.7z")
$client.DownloadFile("http://7-zip.org/a/7z1604-x64.exe", "7zip.exe")
& ls
& "${pwd}\7zip.exe" x RubyInstaller.7z
& ls
/Library/Ruby/Gems/2.0.0/gems/selenium-webdriver-2.53.0/lib/selenium/webdriver/remote/response.rb:70:in `assert_ok': Could not find a device to launch. You requested 'iPhone 6 Plus (4.4)', but the available devices were: ["iPad 2 (9.3) [D71568CB-BDAE-49E8-941D-BAFBBCB01B2F] (Simulator)","iPad Air (9.3) [4BA020A7-ED89-4BB5-9E2F-63838BA252A4] (Simulator)","iPad Air 2 (9.3) [5BACEEA3-FDBA-4540-9727-0E984D4339CD] (Simulator)","iPad Pro (9.3) [F10F7582-E58E-4564-A58D-312012DD1F3C] (Simulator)","iPad Retina (9.3) [73EF5D2B-E519-449D-8D07-CC1786A197E3] (Simulator)","iPhone 4s (9.3) [9CD14920-B34F-41F5-82A6-F5131D61154E] (Simulator)","iPhone 5 (9.3) [C85F36C2-7065-425A-9BBE-C92E2E25081A] (Simulator)","iPhone 5s (9.3) [307025A5-92AB-4B32-BCE3-8E636731F6A4] (Simulator)","iPhone 6 (9.3) [707B0CDA-F95B-430E-BDBA-A8507E997E17] (Simulator)","iPhone 6 Plus (9.3) [3FBDF1F0-6A3A-4B34-8D02-63DBB9BA49C3] (Simulator)","iPhone 6s (9.3) [5AF04C2C-4304-4D22-8E33-C4C420780A28] (Simulator)","iPhone 6s (9.3) + Apple Watch - 38mm (2.2)
---
layout: post
title: "Running multiple tests with one command using the Monkeytest.it API and cURL"
date: 2016-05-29 19:18:16
categories: Testing, QA, Automation, Shell, cURL, Cron
---
A few weeks ago I discovered the MonkeyTest.it service on ProductHunt and wanted a way to run a single command to test my current organizations production help site for any broken links. (This site is hosted using desk.com making traditional automation slightly more tricky)
The problem is that MonkeyTest.it only supports a single URL per test (e.g. if you're in Slack you can run /monkeytest https://www.google.com ) this will test the specified page but not crawl the site as questioned within the ProductHunt comments [here](https://www.producthunt.com/tech/monkey-test-it){:target="_blank"}
@evanniedojadlo
evanniedojadlo / gist:1b1a3f93cc09a4ba647df3712172a01d
Created May 12, 2016 01:47
Error we are seeing when attempting to run sauce_ios_web.rb
Applitools_Test ruby sauce_ios_web.rb
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- appium_lib (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from sauce_ios_web.rb:3:in `<main>'
@evanniedojadlo
evanniedojadlo / gist:8295360
Created January 7, 2014 06:20
Message returned after I performed a rake db:drop, rake db:create, rake db:migrate, and the rake db:seed
Evans-MacBook-Air:wikiful RAI$ rake db:seed
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
@evanniedojadlo
evanniedojadlo / gist:8293968
Last active January 2, 2016 10:59
Error I am returning when attempting a rake db:seed or a rake db:reset
Evans-MacBook-Air:wikiful RAI$ rake db:reset
-- enable_extension("plpgsql")
-> 0.0452s
-- create_table("article_categories", {:force=>true})
-> 0.0115s
-- create_table("articles", {:force=>true})
-> 0.0083s
-- create_table("categories", {:force=>true})
-> 0.0083s
-- initialize_schema_migrations_table()