Canoo Inc. · OTC:GOEVQ
Canoo — Canoo Engineering — Technical Presentation (April 2007)
31 slides from Canoo's technical presentation, Apr 26, 2007

Slide 1: Automatisiertes Testen von Web-Applikationen
Automatisiertes Testen von Web-Applikationen mit dem Open Source Tool WebTest Marc Guillemot Dierk König Independent Consultant Canoo Engineering AG Germany Switzerland mg@internetzky.de dierk.koenig@canoo.com WebTest & HtmlUnit lead developer WebTest founder

Slide 2: What is WebTest?
What is WebTest? • automated Web functional testing tool • open source (Apache license) • founded in 2001 • currently 4 active committers (Switzerland, Germany, Australia) • used in banks, assurance, institutions, solution providers, ... • adapted to a wide range of projects: from small to huge Marc

Slide 3: Testing Google
Testing Google Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 4: 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 5: WebTest Vorspeise
WebTest Vorspeise Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 6: WebTest results (zoomed)
WebTest results (zoomed) Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 7: Marc Guillemot & Dierk König JAX 07, 26.04.2007
Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 8: Over 100 WebTest Steps
Over 100 WebTest Steps • General: • PDF • <invoke .../> • <pdfDecryptDocument.../> • <clickLink.../> • <pdfVerifyField.../> • ... • <pdfVerifyText.../> • Forms • ... • <setInputField.../> • Excel Documents • <setRadioButton.../> • <setCheckBox.../> • <excelFindRow.../> • <clickButton.../> • <excelVe

Slide 9: Building blocks
Building blocks WebTest HtmlUnit Mozilla Rhino Jaxen Ant nekoHtml Jakarta commons-httpclient Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 10: The 4 testing paradigms
The 4 testing paradigms • Capture / replay • "the least cost-effective way of test automation" • Use capturing wisely • Model based testing • Specification: modelling expected behaviour • Fault model: modelling unexpected behaviour • Be tolerant to accidental behaviour • Data driven testing • Narrow

Slide 11: A software engineering activity
A software engineering activity Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 12: Lessons learned
Lessons learned • use recorder only to give you a jump start • specify expectations • distinguish guaranteed from accidental behaviour • apply rules of software engineering • remove duplications, extract modules • use source control • consider modifications and extensions • Ant, Java, Groovy • desig

Slide 13: Determine what you want to test
Determine what you want to test How to test addition into basket: • <clickLink label=”Einkaufskorb”/> ? • <clickLink label=”Ajax”/> ? • <clickLink xpath=”//*[text() = 'Top Angebot']//a”/> ? • <clickLink xpath=”//*[text() = '6.60']/following-sibling::a]”/> ? => it depends: these 4 examples don't test

Slide 14: 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 JAX 07, 26.04.2007

Slide 15: Wisely use properties
Wisely use properties <project name="example" default="test"> de.properties <target name="test"> startUrl=http://www.google.de/de luckyButton=Auf gut Glück! <webtest name="check that WebTest is Google's top 'WebTest' result"> fr.properties <steps> startUrl=http://www.google.fr/fr <invoke url="${star

Slide 16: Use entities for common blocks
Use entities for common blocks myTest.xml myDtd.dtd <!DOCTYPE project SYSTEM ”myDtd.dtd”> <!ENTITY goToLoginPage SYSTEM <project> "includes/goToLoginPage.xml"> .... <steps> &goToLoginPage; goToLoginPage.xml ... </steps> <group description=”go to login”> ... <invoke url=”http://mysite.com”/> <verifyT

Slide 17: ... or macros
... or macros ... <macrodef name="doLogin”/> <attribute name="login”/> <attribute name="password”/> <sequential> &goToLoginPage; <setInputField forLabel=”Login” value=”@{login}”/> <setInputField forLabel=”Password” value=”@{password}”/> <verifyText text=”Hello .*\. Welcome to the restricted area” re

Slide 18: Fine control (1)
Fine control (1) ... <steps> <groovy description="configure HTTP 1.0 as default protocol version"> import org.apache.commons.httpclient.* import org.apache.commons.httpclient.params.* DefaultHttpParams.defaultParams.version = HttpVersion.HTTP_1_0 </groovy> <invoke url="http://myHost"/> ..... </steps

Slide 19: Fine control (2)
Fine control (2) ... <steps> ..... <groovy description="test table sorted by last name"> import com.canoo.webtest.engine.StepFailedException as SFE def table = step.context.currentResponse.getHtmlElementById('theTable') def tds = table.getByXPath('tbody/tr/td[2]') def texts = tds*.asText() def sorte

Slide 20: 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

Slide 21: AJAX
AJAX ... <webtest name="Test DWR 2.0 RC3 demo App"> <steps> <invoke url="http://localhost:8080/dwr/simpletext"/> <verifyXPath xpath="//*[@id= 'demoReply']" text=""/> <clickButton label="Send"/> <sleep seconds="2" description="Wait for completion of async call"/> <verifyXPath xpath="//*[@id= 'demoRep

Slide 22: 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 23: Key properties
Key properties • simple • js support not as good as • fast “normal” browser • excellent reporting • doesn't accept (too) badly formed html • very low TCO • runs everywhere • no display needed • easy to extend • straightforward integration • doesn't accept (too) badly formed html Marc Guillemot & Die

Slide 24: WebTest (possible) future(s)
WebTest (possible) future(s) • dedicated AJAX support (coming) • WebTestClipse • (even) better reports • load testing • ... Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 25: Happy Testing!
Happy Testing! http://webtest.canoo.com/ Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 26: Bonus
Bonus Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 27: User testimonials
User testimonials (from WebTest mailing list) • the ROI on WebTest is many orders of magnitude higher than any tool I've used • Support = good and $0 • It still Just Works. It has been remarkably robust, mature, and bug- free • It has scaled well • tests are much quicker to write and cheap to mainta

Slide 28: Customize XPath
Customize XPath <groovyScript> import org.jaxen.* import org.jaxen.function.* import com.canoo.webtest.engine.xpath.XPathHelper class ReverseFunction implements Function { Object call(Context context, List _args) { def input = StringFunction.evaluate(_args[0], context.navigator); return input.revers

Slide 29: Customize WebTest
Customize WebTest ... <verifyXPath xpath="//*[@id='navPath1']” text="Home”/> <verifyXPath xpath="//*[@id='navPath2']” text="Functional testing”/> <verifyXPath xpath="//*[@id='navPath3']” text="WebTest”/> ... Works but: • too low level • not reusable Marc Guillemot & Dierk König JAX 07, 26.04.2007

Slide 30: Customize WebTest
Customize WebTest ... <macrodef name="verifyNavPath”/> <attribute name="level1”/> <attribute name="level2”/> <attribute name="level3”/> <sequential> <verifyXPath xpath="//*[@id='navPath1']” text="@{level1}”/> <verifyXPath xpath="//*[@id='navPath2']” text="@{level2}”/> <verifyXPath xpath="//*[@id='na

Slide 31: Customize WebTest
Customize WebTest <groovyScript name="verifyNavPath”><![CDATA[ class VerifyNavigationPath extends com.canoo.webtest.steps.Step { String level1, level2, level3, level4 void doExecute() { def ant = new AntBuilder(project) def levels = [0, level1, level2, level3, level4] for (i in 1..<levels.size()) {
Source: Internet Archive copy of webtest.canoo.com
More decks from Canoo Inc.
FY2020 Earnings Presentation17 slides · Mar 29, 2021
Hennessy Capital Acquisition Corp IV — SPAC Merger (November 2020)10 slides · Nov 19, 2020
Hennessy Capital Acquisition Corp IV — SPAC Merger (September 2020)43 slides · Sep 24, 2020
SPAC Merger (August 2020)64 slides · Aug 18, 2020
Canoo Engineering — Fact Sheet (July 2014)2 slides · July 2014
Canoo Engineering — Fact Sheet (April 2013)2 slides · April 2013