1 / 20

Automated Website Testing

Automated Website Testing. matt.hooper@vc3.com. About Me. Product Architect at VC3 VC3 Academic Suite Etc… Find me at: matt.hooper@vc3.com mhoop.wordpress.com. WatiN (“ What-in”). watin.sourceforge.net .NET assembly ( watir is Ruby version) API for controlling web browser, and DOM.

phiala
Download Presentation

Automated Website Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Automated Website Testing matt.hooper@vc3.com

  2. About Me • Product Architect at VC3 • VC3 Academic Suite • Etc… • Find me at: • matt.hooper@vc3.com • mhoop.wordpress.com

  3. WatiN (“What-in”) • watin.sourceforge.net • .NET assembly (watir is Ruby version) • API for controlling web browser, and DOM. • Ajax support .exe WatiN Web site Web Browser

  4. WatiN Functionality • Search for elements by ID, etc • Regex’stoo • Interact with DOM to simulate user • button clicking • typing

  5. WatiN Demo

  6. A Web App • TestView is6 years old • Periodic team changes • Continuous enhancements • Customer hosted (intranet) • Size: • 15+ Visual Studio projects • 600+ db tables • 600+ .aspx files • 3000+ .cs files (app-specific) • And code shared across all VC3 apps

  7. Testing Needs • More obvious: • Enhancements, bug fixes • Less obvious: • What did we break? (regression tests) Goal: Improve quality and delivery speed

  8. How WatiN fits in Test Runner run and manage Page1 Page1 exercise and verify WatiN Tests Browser Web Site setup preconditions, verify results

  9. How WatiN fits in Visual Studio run and manage Page1 Page1 exercise and verify WatiN Tests Browser Web Site Database setup preconditions, verify results

  10. Why full stack testing? Testing against the UI is natural and end-user oriented

  11. Real World Testing Approaches Full stack tests Unit tests vs Users UI Model Data

  12. Developer Tendencies • Code • Test • find data to test in db • use the UI to perform actions • verify results • Fix • Repeat until satisfied

  13. Developer Tendencies • Code • Test • find data to test in db • use the UI to perform actions • verify results • Fix • Repeat until satisfied Automate!

  14. UI Automation Challenges Interface can be: • Complex • Dynamic • Fluid over lifetime

  15. Cleaner Tests • Encapsulate ID’s etc in page model classes • Makes tests more readable (example) SignInWithGoodCredentials SignInPage UserName Password SignInButton NoSignInWithBadCredentials WatiN

  16. Design goals for tests • Easy to write (and read) • Isolated from UI brittleness • Start from a known state • no side effects ideally • Test a specific case/scenario • Consider overlap among tests

  17. Our Results • Added a layer on WatiN to simplify tests

  18. Our Results • Incrementally adding tests • No side effects is key • Useful for long efforts • Slow to run large number of tests • Tests have helped with regression tests • Response from developers • Mostly positive • Writing good tests is hard!

  19. Your Website? • More complex monitoring • Regression tests • CMS upgrades • Server migrations

  20. Other Links • Email testing • nDumbster: http://ndumbster.sourceforge.net

More Related