Canoo Inc. · OTC:GOEVQ
Canoo — Canoo Engineering — Technical Presentation (October 2006)
15 slides from Canoo's technical presentation, October 2006
Slide 1: Web Testing Made Easy
Web Testing Made Easy with the Open Source tool WebTest Marc Guillemot Dierk König Independent Consultant Canoo Engineering AG Germany Switzerland [email protected] [email protected]
Slide 2: Testing Google
Testing Google Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 3: WebTest Starter
WebTest Starter google.xml <project name="example" default="test"> <target name="test"> <webtest name="check that WebTest is Google's top 'WebTest' result"> <steps> <invoke url="http://www.google.com"/> <verifyTitle text="Google"/> <setInputField name="q" value="WebTest"/> <clickButton label="I'm Fe
Slide 4: WebTest Vorspeise
WebTest Vorspeise Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 5: WebTest results (zoomed)
WebTest results (zoomed) Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 6: Over 100 WebTest Steps
Over 100 WebTest Steps • General: • PDF • <invoke .../> • <pdfDecryptDocument.../> • <clickLink.../> • <pdfVerifyField.../> • ... • <pdfVerifyText.../> • Forms • ... • <setInputField.../> • Excel Documents • <setRadioButton.../> • <excelFindRow.../> • <setCheckBox.../> • <clickButton.../> • <excelSe
Slide 7: Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 8: Lessons learned
Lessons learned • use recorder only to give you a jump start • specify expectations • distinguish guaranteed from accidental behavior • apply rules of software engineering • remove duplications, extract modules • use source control • consider modifications and extensions • Ant, Java, Groovy • design
Slide 9: Future plans
Future plans • dedicated AJAX support • WebTestClipse • (even) better reports • ... Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 10: Happy Testing!
Happy Testing! http://webtest.canoo.com/ Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 11: Bonus
Bonus Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 12: Sustainable Tests
Sustainable Tests • exploit XPath wisely • good: //*[@id='total'] bad: /html/body/div[2]/table[3]/tbody/tr[6]/td[4] • testable HTML code • structured tests • property files • XML entities • Ant macros Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 13: Building blocks
Building blocks WebTest HtmlUnit Mozilla Rhino Jaxen Ant nekoHtml Jakarta commons-httpclient Marc Guillemot & Dierk König OOPSLA 2006, 24-27.10.2006
Slide 14: Groovy WebTest
Groovy WebTest ant.webtest(name: 'Test Google with Groovy, AntBuilder and WebTest') { steps() { invoke(url: 'http://www.google.com') verifyTitle(text: 'Google') setInputField(name: 'q', value: 'Groovy') clickButton(name: 'btnG') verifyXPath(xpath: "//a[@href='http://groovy.codehaus.org/']") } } Grai
Slide 15: Simply extend WebTest
Simply extend WebTest <groovyScript> class MyExtension extends com.canoo.webtest.steps.Steps { String myProp void doExecute() { // do something } } project.taskDefinitions['myNewStep'] = MyExtension </groovyScript> .... <steps> ... <myNewStep myProp="whatever"/> ... </steps> Marc Guillemot & Dierk K
Canoo Engineering — Technical Presentation (October 2006) on 6ix