This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Web Testing with Windmill | |
You need to write some tests for your web application... really, you do! | |
But what kind of tests do you write? What approach do you take to testing with limited time and resources? What tools do you use? | |
There are many competing test tools and framework for automated web testing. In [Web Testing with Windmill](http://opensourcebridge.org/sessions/36) I'll briefly cover the different testing approaches and tools, where Windmill fits in, and why it stacks up to it's competitors as the best tool for writing, debugging and maintaining web application tests across all browsers on all operating systems. | |
Then I'll take you through the process of writing, running and debugging your Windmill tests and getting them running in the "cloud" (look at me I used a buzzword!). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* jQuery JavaScript Library v1.3.2 | |
* http://jquery.com/ | |
* | |
* Copyright (c) 2009 John Resig | |
* Dual licensed under the MIT and GPL licenses. | |
* http://docs.jquery.com/License | |
* | |
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) | |
* Revision: 6246 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup_module(tests[0][1]) | |
for wmt in wmtests: | |
sys.argv = [wmt,] | |
for k in (k for k in sys.modules.keys() if k.startswith('functest')): | |
del(sys.modules[k]) | |
del(bin); del(runner) | |
import functest | |
from functest import bin | |
from functest import runner | |
bin.cli() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setup_module(tests[0][1]) | |
for wmt in wmtests: | |
sys.argv = [wmt,] | |
for k in (k for k in sys.modules.keys() if k.startswith('functest')): | |
del(sys.modules[k]) | |
del(bin); del(runner) | |
import functest | |
from functest import bin | |
from functest import runner | |
bin.cli() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httplib2 | |
h = httplib2.Http(".cache") | |
h.add_credentials('name', 'password') | |
h.request("http://joelmaher.couch.io", | |
"POST", body=simplejson.dumps(data), | |
headers={'content-type':'application/json'} ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cache(dict): | |
lambda get(*args, **kwargs): dict.__getitem__(*args, **kwargs) | |
lambda set(*args, **kwargs): dict.__setitem__(*args, **kwargs) | |
lambda del(*args, **kwargs): dict.__delitem__(*args, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cache(dict): | |
lambda get(*args, **kwargs): dict.__getitem__(*args, **kwargs) | |
lambda set(*args, **kwargs): dict.__setitem__(*args, **kwargs) | |
lambda del(*args, **kwargs): dict.__delitem__(*args, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tabs.prototype.__defineGetter__("activeTabIndex", function() { | |
return this.controller.window.gBrowser.tabContainer.selectedIndex; | |
}) | |
Tabs.prototype.selectTabIndex = function(i) { | |
this.controller.window.gBrowser.selectTabAtIndex(i); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before | |
function (doc) { | |
if (doc.type == 'tcm-testcase') { | |
emit([doc.product, doc.title], doc); | |
} | |
} | |
# After |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready = function () { | |
var d = document.getElementById('description'); | |
var e = document.getElementById('description-edit'); | |
e.width = d.offsetWidth; | |
e.height = d.offsetHeight; | |
} |