Skip to content

Instantly share code, notes, and snippets.

View mikeal's full-sized avatar

Mikeal Rogers mikeal

View GitHub Profile
# 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
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);
import copy
from mozmill import CLI, FirefoxProfile
class LangProfile(FirefoxProfile):
preferences = copy.copy(FirefoxProfile.preferences)
preferences['mypref'] = True
class LangCLI(CLI):
profile_class LangProfile
2009-04-27 09:35:44,292 Trac[__init__] INFO: Sending SMTP notification to localhost:25 to [u'[email protected]', u'[email protected]', u'[email protected]']
2009-04-27 09:35:44,302 Trac[__init__] ERROR: Failure sending notification on change to ticket #258: SMTPRecipientsRefused: {u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)'), u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)'), u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)
2009-04-27 09:35:44,292 Trac[__init__] INFO: Sending SMTP notification to localhost:25 to [u'[email protected]', u'[email protected]', u'[email protected]']
2009-04-27 09:35:44,302 Trac[__init__] ERROR: Failure sending notification on change to ticket #258: SMTPRecipientsRefused: {u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)'), u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)'), u'[email protected]': (450, '4.1.7 <[email protected]>: Sender address rejected: undeliverable address: host mx.ipower.com[65.254.254.56] said: 550 5.1.1 <[email protected]> recipient rejected (in reply to RCPT TO command)
try {
EventUtils.synthesizeKey(aKey, modifiers, win);
} catch(e) {
throw new Error("Synthesizing key event failed. \n"+e)
}
try {
EventUtils.synthesizeKey(aKey, modifiers, win);
} catch(e) {
throw new Error("Synthesizing key event failed. \n"+e)
}
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
def do(string):
print string
import wsgi_fileserver
wsgi_fileserver.logger.error = do
wsgi_fileserver.logger.debug = do
wsgi_fileserver.logger.info = do
# 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)