Automated Website Testing

Click here to load reader

download Automated Website Testing

of 20

  • date post

  • Category


  • view

  • download


Embed Size (px)


Automated Website Testing. About Me. Product Architect at VC3 VC3 Academic Suite Etc… Find me at: WatiN (“ What-in”). .NET assembly ( watir is Ruby version) API for controlling web browser, and DOM. - PowerPoint PPT Presentation

Transcript of Automated Website Testing

Automated Website Testing

Automated Website Testingmatt.hooper@vc3.com1About MeProduct Architect at VC3VC3 Academic SuiteEtc

Find me

2WatiN (What-in) assembly (watir is Ruby version)API for controlling web browser, and DOM.Ajax supportWatiNWebBrowser.exeWeb site3WatiN FunctionalitySearch for elements by ID, etcRegexs too

Interact with DOM to simulate userbutton clickingtyping

4WatiN Demo5A Web AppTestView is 6 years oldPeriodic team changesContinuous enhancementsCustomer hosted (intranet)Size:15+ Visual Studio projects600+ db tables600+ .aspx files3000+ .cs files (app-specific)And code shared across all VC3 apps

6Testing NeedsMore obvious:Enhancements, bug fixes

Less obvious:What did we break? (regression tests)

Goal: Improve quality and delivery speed

7How WatiN fits inWatiNBrowserexerciseand verifyTest Runnerrun andmanagesetup preconditions, verify resultsPage1Page1TestsWeb Site8How WatiN fits inWatiNBrowserexerciseand verifyDatabaseVisual Studiorun andmanagesetup preconditions, verify resultsPage1Page1TestsWeb Site9

Why full stack testing?Testing against the UI isnatural andend-user orientedTraditionally Ive been skeptical of web UI-oriented tests but WatiN has been an enablerAlready test manually at the UI layer todayCustomers think in terms of end functionality (most of the time)You get what you measure: focus is on final product, not intermediate componentsEasy to retrofit tests to existing application

10Testing ApproachesUsersFull stack testsReal WorldUIModelDataUnittestsvs11Developer TendenciesCodeTestfind data to test in dbuse the UI to perform actionsverify resultsFixRepeat until satisfied12Developer TendenciesCodeTestfind data to test in dbuse the UI to perform actionsverify resultsFixRepeat until satisfiedAutomate!13UI Automation ChallengesInterface can be:ComplexDynamicFluid over lifetime

- WatiN is a huge help- Architecture weve been using encapsulates page structure

14Cleaner TestsSignInWithGoodCredentialsSignInPageUserNamePasswordSignInButtonNoSignInWithBadCredentialsWatiNEncapsulate IDs etc in page model classesMakes tests more readable (example)15Design goals for testsEasy to write (and read)Isolated from UI brittlenessStart from a known stateno side effects ideallyTest a specific case/scenarioConsider overlap among tests16Our ResultsAdded a layer on WatiN to simplify tests

17Our ResultsIncrementally adding testsNo side effects is keyUseful for long effortsSlow to run large number of testsTests have helped with regression testsResponse from developersMostly positiveWriting good tests is hard!

18Your Website?More complex monitoring

Regression testsCMS upgradesServer migrations19Other LinksEmail testingnDumbster: