Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mikeal Rogers mikeal

🏠
Working from home
View GitHub Profile
View gist:72939
# Generated by the windmill services transformer
from windmill.authoring import WindmillTestClient
import time
from windmill.server import proxy
proxy.first_forward_domains.append('www.sandbox-freebase.com')
from windmill.server import add_forward_condition
View gist:95600
var mozmill = {}; Components.utils.import('resource://mozmill/modules/mozmill.js', mozmill);
var elementslib = {}; Components.utils.import('resource://mozmill/modules/elementslib.js', elementslib);
var testFoo = function(){
var controller = mozmill.getMail3PaneController();
var e =
new elementslib.XPath(controller.window.frames[0].document, "/*[name()='page' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul']/*[name()='grid' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'][1]/*[name()='rows' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'][1]/*[name()='row' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'][16]/*[name()='hbox' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'][1]/*[name()='label' and namespace-uri()='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul'][1]");
controller.click(e);
View gist:96499
import copy
from mozmill import CLI, FirefoxProfile
class LangProfile(FirefoxProfile):
preferences = copy.copy(FirefoxProfile.preferences)
preferences['mypref'] = True
class LangCLI(CLI):
profile_class LangProfile
View gist:102518
2009-04-27 09:35:44,292 Trac[__init__] INFO: Sending SMTP notification to localhost:25 to [u'adam.christian@gmail.com', u'anthony.lenton@canonical.com', u'mikeal@osafoundation.org']
2009-04-27 09:35:44,302 Trac[__init__] ERROR: Failure sending notification on change to ticket #258: SMTPRecipientsRefused: {u'adam.christian@gmail.com': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)'), u'anthony.lenton@canonical.com': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)'), u'mikeal@osafoundation.org': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)
View gist:102519
2009-04-27 09:35:44,292 Trac[__init__] INFO: Sending SMTP notification to localhost:25 to [u'adam.christian@gmail.com', u'anthony.lenton@canonical.com', u'mikeal@osafoundation.org']
2009-04-27 09:35:44,302 Trac[__init__] ERROR: Failure sending notification on change to ticket #258: SMTPRecipientsRefused: {u'adam.christian@gmail.com': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)'), u'anthony.lenton@canonical.com': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)'), u'mikeal@osafoundation.org': (450, '4.1.7 <trac@getwindmill.com>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <trac@getwindmill.com> recipient rejected (in reply to RCPT TO command)
View gist:122641
try {
EventUtils.synthesizeKey(aKey, modifiers, win);
} catch(e) {
throw new Error("Synthesizing key event failed. \n"+e)
}
View gist:122642
try {
EventUtils.synthesizeKey(aKey, modifiers, win);
} catch(e) {
throw new Error("Synthesizing key event failed. \n"+e)
}
View gist:123382
Havok:~ mikeal$ ping pythonesque.org [19:06]
PING pythonesque.org (72.37.235.38): 56 data bytes
64 bytes from 72.37.235.38: icmp_seq=0 ttl=58 time=35.920 ms
c64 bytes from 72.37.235.38: icmp_seq=1 ttl=58 time=33.621 ms
^C
--- pythonesque.org ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 33.621/34.770/35.920/1.150 ms
Havok:~ mikeal$ ping tutorial.getwindmill.com [19:07]
PING tutorial.getwindmill.com (66.96.131.12): 56 data bytes
View gist:123471
def do(string):
print string
import wsgi_fileserver
wsgi_fileserver.logger.error = do
wsgi_fileserver.logger.debug = do
wsgi_fileserver.logger.info = do
View gist:126808
# Web Testing with Windmill
This talk will discuss different web testing strategies, tools, and getting you up and writing windmill tests.
## Approaches
* Separating Concerns, Isolating Components
* Unittesting vs Functional Testing
* Full Monty (blurring the lines between unittesting and funcitonal testing)