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:dd37c1ca0316410fa04c
Created July 8, 2015 22:19
Gallio - Runtime log errors that we are returning
Host started at 7/8/2015 4:55:09 PM.
Running under CLR v4.0.30319 runtime.
Host stopped at 7/8/2015 4:55:11 PM.
Host process exited with code: 0
A fatal exception occurred while exploring tests. Possible causes include invalid test runner parameters.
Gallio.Model.ModelException: An exception occurred while invoking a test driver. ---> System.Runtime.Serialization.SerializationException: Type 'Microsoft.Cci.Pdb.PdbDebugException' in Assembly 'Gallio, Version=3.4.0.0, Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e' is not marked as serializable.
HResult: -2146233076
Server stack trace:
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
@evanniedojadlo
evanniedojadlo / base.rb
Created June 22, 2015 06:16
Basic Test which is run against Firefox
#base is used for building out the tests structure
require 'selenium-webdriver'
class Base
def initialize(driver)
@driver = driver
end