Firewatir Script Generator <ul><li>Angrez Singh </li></ul><ul><li>Proteans Software Solutions Pvt. Ltd </li></ul>
Motivation <ul><li>Web Applications are increasingly ubiquitous as a functionality delivery paradigm. </li></ul><ul><li>Te...
What is FireWatir? <ul><li>Testing Web Application using Ruby and Firefox browser </li></ul><ul><li>Framework / Library fo...
Example Yahoo Mail <ul><li>require 'firewatir' </li></ul><ul><li>include FireWatir </li></ul><ul><li>ff=Firefox.new </li><...
Conceptual Framework <ul><li>Class for Firefox </li></ul><ul><li>Classes for each element </li></ul><ul><ul><li>(e.g. imag...
How FireWatir interacts? <ul><li>Uses JSSh extension </li></ul><ul><li>Runs at port 9997 and listens for commands </li></u...
Advantages <ul><li>In built XML and XPath support </li></ul><ul><li>More compliant to standards </li></ul><ul><li>Can supp...
Firewatir Recorder <ul><li>Came as result of Google Summer of Code </li></ul><ul><li>Records user action while user is int...
Example
Requirements <ul><li>Ruby 1.8.2 and above </li></ul><ul><li>Firefox 1.5 and above (not tested with Firefox 3.0a) </li></ul...
How to install? <ul><li>Install firewatir 1.1 gem </li></ul><ul><li>Install TestGen4Web XPI </li></ul><ul><li>Apply patch ...
TO DO’s <ul><li>Adding support for recording Javascript pop up </li></ul><ul><li>Adding support for recording windows pop ...
References <ul><li>Firewatir ( http://code.google.com/p/firewatir ) </li></ul><ul><li>tg4rb  </li></ul><ul><li>( http://co...
Q & A
Upcoming SlideShare
Loading in …5
×

Fire Watir Script Generator Barcamp

4,375 views

Published on

Firewatir script generator allows user to generate Firewatir scripts by recording user actions (using TestGen4Web extension in Firefox) and then converting this XML to Firewatir script that could be played back.

Published in: Technology
  • Thanks for the suggestion, I appreciate that. Will take care next time.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Fire Watir Script Generator Barcamp

  1. 1. Firewatir Script Generator <ul><li>Angrez Singh </li></ul><ul><li>Proteans Software Solutions Pvt. Ltd </li></ul>
  2. 2. Motivation <ul><li>Web Applications are increasingly ubiquitous as a functionality delivery paradigm. </li></ul><ul><li>Testing Web Applications is important </li></ul><ul><li>Most testers not used to writing the code. </li></ul><ul><li>Need not learn new language for every tool </li></ul>
  3. 3. What is FireWatir? <ul><li>Testing Web Application using Ruby and Firefox browser </li></ul><ul><li>Framework / Library for scripting Web application testing cases </li></ul><ul><li>Functional testing tool for automated browser-based tests </li></ul>
  4. 4. Example Yahoo Mail <ul><li>require 'firewatir' </li></ul><ul><li>include FireWatir </li></ul><ul><li>ff=Firefox.new </li></ul><ul><li>ff.goto(&quot;http://mail.yahoo.com&quot;) </li></ul><ul><li>ff.text_field(:name,&quot;login&quot;).set([username]) </li></ul><ul><li>ff.text_field(:name,&quot;passwd&quot;).set([password]) </li></ul><ul><li>ff.button(:value,&quot;Sign In&quot;).click </li></ul><ul><li>ff.link(:text, &quot;Sign Out&quot;).click </li></ul><ul><li>ff.close </li></ul>
  5. 5. Conceptual Framework <ul><li>Class for Firefox </li></ul><ul><li>Classes for each element </li></ul><ul><ul><li>(e.g. image, link, checkbox etc) </li></ul></ul><ul><li>Selection mechanism for elements </li></ul><ul><ul><li>(e.g. index, id, name, value etc) </li></ul></ul>
  6. 6. How FireWatir interacts? <ul><li>Uses JSSh extension </li></ul><ul><li>Runs at port 9997 and listens for commands </li></ul><ul><li>Firewatir sends JavaScript commands via socket </li></ul><ul><li>Read back the results </li></ul>
  7. 7. Advantages <ul><li>In built XML and XPath support </li></ul><ul><li>More compliant to standards </li></ul><ul><li>Can support Linux, Mac platform </li></ul><ul><li>Made to run on any client machine </li></ul>
  8. 8. Firewatir Recorder <ul><li>Came as result of Google Summer of Code </li></ul><ul><li>Records user action while user is interacting with the application </li></ul><ul><li>User TestGen4Web XPI for capturing user actions </li></ul><ul><li>Convert user actions to XML </li></ul><ul><li>Convert XML to ruby file for playback using tg4rb gem </li></ul>
  9. 9. Example
  10. 10. Requirements <ul><li>Ruby 1.8.2 and above </li></ul><ul><li>Firefox 1.5 and above (not tested with Firefox 3.0a) </li></ul><ul><li>TestGen4Web XPI </li></ul><ul><li>Tg4rb gem </li></ul><ul><li>Firewatir 1.1 gem </li></ul>
  11. 11. How to install? <ul><li>Install firewatir 1.1 gem </li></ul><ul><li>Install TestGen4Web XPI </li></ul><ul><li>Apply patch to TestGen4Web (TG4W) </li></ul><ul><li>Install tg4rb 0.0.2 gem </li></ul><ul><li>Start recording actions to XML using TG4W </li></ul><ul><li>Convert XML to Ruby script using tg4rb </li></ul>
  12. 12. TO DO’s <ul><li>Adding support for recording Javascript pop up </li></ul><ul><li>Adding support for recording windows pop up </li></ul><ul><li>Still first release so all comments/issues are welcomed </li></ul>
  13. 13. References <ul><li>Firewatir ( http://code.google.com/p/firewatir ) </li></ul><ul><li>tg4rb </li></ul><ul><li>( http://code.google.com/p/tg4rb ) </li></ul><ul><li>TestGen4Web </li></ul><ul><li>( http://developer.spikesource.com/wiki/index.php/Projects:TestGen4Web ) </li></ul>
  14. 14. Q & A

×