Skip to content

Instantly share code, notes, and snippets.

View adamgoucher's full-sized avatar

adam goucher adamgoucher

View GitHub Profile
@adamgoucher
adamgoucher / codemash-selenium-precompiler.txt
Created January 10, 2011 02:06
work-in-progress agenda for codemash selenium precompiler
basics
------
parts
selectors
synchronization
evolution-of-a-script
se-ide
------
overview
@adamgoucher
adamgoucher / tags.rb
Created February 5, 2011 19:11
example of how to use tags with rspec. more importantly, how to use multiple tags
# see https://github.com/rspec/rspec-core/commit/aa6f7e8744abb4bdc2060fb32a58bd2aeea04e14
describe "rabbit holes" do
#
# single tags - can be either but not both
#
# rspec --tag depth:shallow tags.rb
# rspec --tag depth:deep tags.rb
#
# multiple tags
@adamgoucher
adamgoucher / Continuous Delivery Workshop.txt
Created February 14, 2011 19:58
The working 'agenda' for my STPCon workshop on Continuous Delivery
So this is what I have got myself into:
An important trend in software development is the idea of continuous delivery and the deployment pipeline. It is possible to have a deployment pipeline that is a series of manual steps, but that is neither efficient to execute or fun to build. Automation plays a large role in addressing both of these problems. This workshop looks at each stage of a typical pipeline and illustrates the role of automation and it’s goals. Appropriate for developers, testers, operations or anyone who wants to speed up their release time, participants will leave with implementable automation ideas and strategies.
The current version of the agenda is:
- Introduction to Continuous Delivery
- http://element34.ca/blog/what-continuous-delivery-looks-like-to-me
- http://vimeo.com/16587500
- Managing the Machines (Puppet)
- http://element34.ca/blog/continuous-delivery-managing-the-machines
@adamgoucher
adamgoucher / rspec-syntax-cheat-sheet.rb
Created February 18, 2011 18:56 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2.0 syntax Cheet Sheet with tunings for Selenium
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@adamgoucher
adamgoucher / loggingdocumentationformatter.txt
Created February 24, 2011 04:46
how to hack in log messages to rspec 2
When doing automation I coach people not to put in logging in their scripts aside from things like 'here is the user name and password I randomly created just now' but I couldn't coax the default documentation formatter in rspec to capture information send via 'puts'. So I over-engineered a solution. Proper documentation and inclusion in my rspec-selenium-pageobjects project in a day or so.
spec_helper.rb
--------------
module RSpec
module Core
class Reporter
def with(message)
notify :with, message
end
@adamgoucher
adamgoucher / TestingAndroidBook.txt
Created May 29, 2011 14:07
What would a Testing Android book look like?
So what would a 'Testing Android' book look like?
Part One
1 - High-level overview of the moving parts of Android
* Activities
* Services
* Broadcast Receivers
* Content Providers
2 - Introduction to the Sample App
@adamgoucher
adamgoucher / sizzlydomlocators.py
Created June 21, 2011 01:03
sizzly dom locators
import pytest
import selenium
class TestRemoteControl():
def setup_method(self, method):
self.connection = selenium.selenium("localhost", 4444, "*firefox", "http://saucelabs.com")
self.connection.start()
self.connection.window_maximize()
self.connection.open("/signup")
@adamgoucher
adamgoucher / gist:1083012
Created July 14, 2011 18:06
Page Objects 101 outline
Page Objects 101
* Why?
* Readable scripts
* Improved maintenance
* Moves complexity out of Scripts
* Page Objects
* One per page /or/ one per logical section of page
* Locators
* Elements
def foo(object):
def __init_(self):
self.content = "blah"
def __get__(self):
print(self.content)
def __set__(self, a, b):
self.a = b
class monkey(object):
bar = foo()
@adamgoucher
adamgoucher / canhazworkshop.feature
Created October 26, 2011 02:44
initial idea gwt
Feature: Add a workshop
In order to have people book a workshop
As a trainer
I want to add a workshop
Scenario: A basic workshop
Given I have entered a basic workshop information
When I add it to the system
Then learners can express interest