Testing Web Applications with Scripting Languages Mark Rees Century Software
twill <ul><li>Simple language for web browsing </li></ul><ul><li>Stress tester </li></ul><ul><li>Web site tester </li></ul...
twill-sh <ul><li>Interactive shell </li></ul><ul><ul><li>twill-sh </li></ul></ul><ul><li>Scripted browsing </li></ul><ul><...
twill-fork <ul><li>Scripted stress testing </li></ul><ul><ul><li>twill-fork -n 100 -p 5 test-wiki.twill </li></ul></ul>
twill - unit testing <ul><li>twill-sh process directory of tests </li></ul><ul><li>twill master run script </li></ul><ul><...
twill – other features <ul><li>Supports authentication </li></ul><ul><li>Debug helpers </li></ul><ul><li>Extended with use...
twill – the cons <ul><li>Advanced usage requires python skills </li></ul><ul><li>It knows nothing about javascript </li></ul>
selenium <ul><li>Test web apps from within the browser </li></ul><ul><li>Linux, Mac OS X, Windows </li></ul><ul><ul><li>ie...
Selenium Core <ul><li>Uses javascript & iframes to embed test engine </li></ul><ul><li>Core must be installed on webserver...
Selenium IDE <ul><li>Firefox extension </li></ul><ul><li>Gets round core limitations </li></ul><ul><li>Saves tests as  </l...
Selenium Remote Control <ul><li>Allows auto web ui testing with any language </li></ul><ul><li>2 components </li></ul><ul>...
Selenium: how it works
Other options <ul><li>Watir  http://www.openqa.org/watir </li></ul><ul><li>Watij  http://www.openqa.org/watij </li></ul><u...
WebDriver <ul><li>One day will be part of selenium 2.0 </li></ul><ul><li>Drives the browser using best native method </li>...
Questions
code:test-rst2html.twill go http://localhost:8081/rst2html formvalue  1 text hello submit find &quot;hello&quot; back foll...
code:test-rst2html-debug.twill debug http 1 go http://localhost:8081/rst2html formvalue  1 text hello submit find &quot;he...
Upcoming SlideShare
Loading in...5
×

Testing Web Apps With Scripting Language - Mark Rees, Century Software

2,207

Published on

Testing Web Apps With Scripting Languages Mark Rees, Century Software. 1 June 2009. Developer Track MSC Malaysia Open Source Conference 2009.

http://www.osdc.my/

Published in: Technology
3 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total Views
2,207
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
37
Comments
3
Likes
1
Embeds 0
No embeds

No notes for slide

Testing Web Apps With Scripting Language - Mark Rees, Century Software

  1. 1. Testing Web Applications with Scripting Languages Mark Rees Century Software
  2. 2. twill <ul><li>Simple language for web browsing </li></ul><ul><li>Stress tester </li></ul><ul><li>Web site tester </li></ul><ul><li>http://code.google.com/p/twill </li></ul>
  3. 3. twill-sh <ul><li>Interactive shell </li></ul><ul><ul><li>twill-sh </li></ul></ul><ul><li>Scripted browsing </li></ul><ul><ul><li>twill-sh -u http://localhost:8087 </li></ul></ul><ul><li>Record twill scripts with scotch </li></ul>
  4. 4. twill-fork <ul><li>Scripted stress testing </li></ul><ul><ul><li>twill-fork -n 100 -p 5 test-wiki.twill </li></ul></ul>
  5. 5. twill - unit testing <ul><li>twill-sh process directory of tests </li></ul><ul><li>twill master run script </li></ul><ul><li>Python unit test framework </li></ul>
  6. 6. twill – other features <ul><li>Supports authentication </li></ul><ul><li>Debug helpers </li></ul><ul><li>Extended with user defined commands </li></ul><ul><li>Handles “bad” html </li></ul><ul><li>“ in-process” wsgi support </li></ul>
  7. 7. twill – the cons <ul><li>Advanced usage requires python skills </li></ul><ul><li>It knows nothing about javascript </li></ul>
  8. 8. selenium <ul><li>Test web apps from within the browser </li></ul><ul><li>Linux, Mac OS X, Windows </li></ul><ul><ul><li>ie6+, firefox 0.8-3.0, mozilla 1.6+, safari, opera 8+, chrome </li></ul></ul><ul><li>http://www.openqa.org/selenium </li></ul>
  9. 9. Selenium Core <ul><li>Uses javascript & iframes to embed test engine </li></ul><ul><li>Core must be installed on webserver under test </li></ul>
  10. 10. Selenium IDE <ul><li>Firefox extension </li></ul><ul><li>Gets round core limitations </li></ul><ul><li>Saves tests as </li></ul><ul><ul><li>html or ruby ide scripts </li></ul></ul><ul><ul><li>Selenium RC run scripts in </li></ul></ul><ul><ul><ul><li>Java, C#, Perl, PHP, Python, Ruby </li></ul></ul></ul>
  11. 11. Selenium Remote Control <ul><li>Allows auto web ui testing with any language </li></ul><ul><li>2 components </li></ul><ul><ul><li>Selenium server, written in java </li></ul></ul><ul><ul><li>Drivers for languages including python and ruby </li></ul></ul>
  12. 12. Selenium: how it works
  13. 13. Other options <ul><li>Watir http://www.openqa.org/watir </li></ul><ul><li>Watij http://www.openqa.org/watij </li></ul><ul><li>Floyd http://www.openqa.org/floya </li></ul><ul><li>HttpUnit http://httpunit.sf.net </li></ul><ul><li>Sahi http://sahi.co.in/w/ </li></ul><ul><li>WebDriver http://code.google.com/p/webdriver </li></ul>
  14. 14. WebDriver <ul><li>One day will be part of selenium 2.0 </li></ul><ul><li>Drives the browser using best native method </li></ul><ul><li>Java & Python bindings </li></ul>
  15. 15. Questions
  16. 16. code:test-rst2html.twill go http://localhost:8081/rst2html formvalue 1 text hello submit find &quot;hello&quot; back follow &quot;Home&quot;
  17. 17. code:test-rst2html-debug.twill debug http 1 go http://localhost:8081/rst2html formvalue 1 text hello submit find &quot;hello&quot; back follow &quot;Home&quot;

×