Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ......

22
Windmill Automated Testing for Web Applications

Transcript of Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ......

Page 1: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

WindmillAutomated Testing for Web Applications

Page 2: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Demo!

Page 3: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Requirements

• Quickly build regression tests

• Run single test on all target browsers

• Easily debug tests

• Easily fit in to continuous integration

Page 4: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Other Tools

• Selenium, SahiMain alternative, Java, Debugging, Integration

• WatirTrusted space, different project for each browser

• WebTestWatched demo, didn’t appear to fulfill needs

Page 5: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Architecture

Page 6: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Proxy

XMLRPC

Fileserver

Get windmill IDE js

JSONRPCExecute cross

window js

Load remote site

Service(python)

IDE(javascript)

Define Tests

Test Authoring Library(any language)

Mile High Overview

Page 7: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

XMLRPC Workflow

add_test()

return result

add_command()

return result

Authoring Lib Service

launch_browser(‘firefox’)

Page 8: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

JSONRPC Workflow

next_action()

return test

report result

next_action()

return command

report serialized json object

Service IDE

Page 9: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Browser Launching and configuration

Test Input

Results Tracking and output

Dynamic debugging information requests

Dynamic commands

Build UI and start running tests

Test running, performance,

debugging

Stop on Failure and interactive debugging

Arbitrary remote javascript execution

Command execution

Service IDE

Supporting continuous integration

Page 10: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Now the fun stuffWhat can I automate?

OOTB support for: open, click(s), check, radio, wait, type, select, wait, assert, mouse events, keyboard events

Advanced:Drag and Drop, Window Management...

DOM Element Access:id, link, name, jsid, classname, tagname, xpath

Extending the Controller API:Extensions are simple to write in JavaScriptExtensions are first class citizens

Page 11: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Features

Page 12: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Windmill IDE

• Cross browser test recording

• Multiple layers of support for performance information and metrics

• DOM explorer, Assertion builder

• Javascript shell. (on the list to be enhanced)

Page 13: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Tests• Creation

IDE: Recorder/EditorManual test writing

• FormatsPython, JavaScript, JSON

• DependenciesDirectory heirarchySetup/TearDownSuite Modules

Details:http://windmill.osafoundation.org/trac/wiki/BookChapter-5-RunningTests

Customizable Reporting

Page 14: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Tests Cont.

• PythonServer side logicOne action at a timeBest for linear linear tests

• JavaScriptFlexible, dynamic, more controlPure JavaScript, helper functionalityAccess to JUM functionsAnswer to conditionals and loops

import functestfrom windmill.authoring import WindmillTestClientfrom windmill.authoring import setup_module, teardown_module

def test_login(): client = WindmillTestClient(__name__) client.type(text=functest.registry['username'], id=u'email') client.type(text=functest.registry['password'], id=u'pass') client.click(id=u'doquicklogin') client.waits.forPageLoad(timeout=u'40000')

windmill.jsTest.require('shared/test_login.js');

var test_bazThing = function () { var nodeId = getSomeDomNodeDynamically(); windmill.jsTest.actions.click({ id: nodeId }); jum.assertEquals(nodeId, ‘test’);}

Page 15: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Service Features

• Extensible logging system (stdlib logging module)

• 3 run modes. - “headless” command line. stdout.- “shell” mode. ipython or stdlib python shell.- wx GUI. PyCrust shell (currently broken, Jacob)

• Browser launching and configuration.

• Server level pre and post hooks for test results parsing, validation, etc.

Page 16: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Status

Page 17: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Flash• Currently not implemented in Windmill

• Adding support would involve:Building a layer between JS and Flash (ExternalInterface hooks)

Addition of Windmill JS controller methods

• I don’t know flash/flex

• Feel free to build this layer :)

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15683

Page 18: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Use Cases• Developer Sanity Check

Using the test hierarchy developers could run selected, tests/suites, or the entire test repo against the app they are working on to avoid regressions.

• Continuous IntegrationUsing build bot, tbox, or a simplified home brew, dedicated machines constantly run test suites against stage app instances. Failures reported to a list, email, etc.

• Push QA CycleWhile QA is doing manual validation of new features, specific test runs can be fired off on dedicated boxes, or VM’s on QA engineer machines. QA sign off requires manual feature validation and automated regression test success.

Page 19: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Demo!

Page 20: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Development

• Proxy domain forwarding improvement Social Networks, iFrames

• Simplify install/service stability (Linux, Win)

• XPath implementation in IE

• Documentation, (Slide Quickstart Guide)

• 0.5 Release for Slide Adoption ( use src until then )

• Moving the project to GetWindmill.com

Page 21: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Getting Started• Get Windmill From Source

http://windmill.osafoundation.org/trac/wiki/BookChapter-1-Install

• Record/Write Some Testshttp://windmill.osafoundation.org/trac/wiki/BookChapter-3-UsingWindmillIDE#RecordingTestshttp://windmill.osafoundation.org/trac/wiki/BookChapter-4-WritingTests

• Play Your Testshttp://windmill.osafoundation.org/trac/wiki/BookChapter-5-RunningTests

• Log Those Bugshttp://windmill.osafoundation.org/trac/newticket

• Thanks for your patience.

Page 22: Windmill - QA Testing Tools · • Selenium, Sahi Main alternative ... windmill.jsTest.actions.click({ id: nodeId }); ... • 0.5 Release for Slide Adoption ( use src until then )

Q & A

http://windmill.osafoundation.org

Let me know your thoughts, needs, ideas:Email, One-on-One, Meetings?