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