Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Selenium RC Using Java and Maven + Maestro Integration


Published on

Event: Exist Tech Talk
Speakers: Xander Cera and Dennis De Vera, Exist Code Camp 2011 (Manila) graduates
Sked: 15 July 2011, 4pm, TechBar

Published in: Technology
  • Be the first to comment

Selenium RC Using Java and Maven + Maestro Integration

  1. 1. Selenium RC Using Java and Maven                  + Maestro Integration Jose Alexander Cera Dennis De Vera, Jr.
  2. 2. Outline <ul><ul><li>Overview </li></ul></ul><ul><ul><li>Objectives </li></ul></ul><ul><ul><ul><li>Main </li></ul></ul></ul><ul><ul><ul><li>Sub </li></ul></ul></ul><ul><ul><li>Tools </li></ul></ul><ul><ul><li>Approach and Implementation </li></ul></ul><ul><ul><li>Output </li></ul></ul><ul><ul><li>Demo </li></ul></ul>
  3. 3. Overview <ul><li>What is Selenium? </li></ul><ul><ul><li>an opensource testing framework for web applications. </li></ul></ul><ul><ul><li>simulates manual testing. </li></ul></ul><ul><li>  </li></ul><ul><li>  </li></ul><ul><li>Features: </li></ul><ul><ul><li>Test cases can be written on several programming languages like Java, Ruby, PHP, C#, etc. </li></ul></ul><ul><ul><li>Supports javascript and ajax  </li></ul></ul><ul><ul><li>Has a tool for rapidly creating test cases (Selenium IDE) </li></ul></ul><ul><ul><li>Can run on different browsers </li></ul></ul>
  4. 4. Sample Test Case in Java <ul><li>  </li></ul>
  5. 5. Objectives <ul><li>Main Objectives </li></ul><ul><ul><li>  Define the benefits and importance of Selenium Testing. </li></ul></ul><ul><li>  </li></ul><ul><ul><li>  Create and implement an automated testing suite/framework and integrate that to Maestro. </li></ul></ul><ul><li>  </li></ul>
  6. 6. Objectives <ul><li>Sub Objectives </li></ul><ul><li>  </li></ul><ul><ul><ul><li>  To be able to familiarize ourselves on how to write selenium scripts using Java as the programming language </li></ul></ul></ul><ul><li>  </li></ul><ul><ul><ul><li>  To be able to integrate the scripts created  on a Maven project and later in Maestro </li></ul></ul></ul>
  7. 7. Tools <ul><ul><li>Eclipse </li></ul></ul><ul><ul><li>XPather </li></ul></ul><ul><ul><li>Maven Plugin </li></ul></ul><ul><ul><ul><ul><li>  selenium-maven-plugin </li></ul></ul></ul></ul><ul><ul><ul><ul><li><plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>start-server</goal> </goals> <configuration> <background>true</background> </configuration> </execution> </executions> </plugin>  </li></ul></ul></ul></ul>
  8. 8.   <ul><ul><li>Selenium IDE </li></ul></ul>
  9. 9. Question.. <ul><li>What are the benefits of making an Automated Selenium Testing framework and why do we need to integrate that to Maestro?  </li></ul>
  10. 10.   <ul><ul><li>enforce software quality </li></ul></ul><ul><li>  </li></ul><ul><ul><li>reap the benefits of continuous integration </li></ul></ul>
  11. 11. Approach in Designing an Automated Testing Framework/Suite <ul><ul><li>Test cases are production codes, therefore, needs refactoring. </li></ul></ul><ul><ul><li>Should be flexible (apply object-oriented principles) </li></ul></ul><ul><ul><li>Use Page Object Pattern. </li></ul></ul><ul><ul><li>Parameterization of test cases/Data-Driven principle (XML, database, spreadsheet)  </li></ul></ul><ul><ul><ul><li>our case: we used '.property' file.  </li></ul></ul></ul><ul><ul><li>Should capture screenshots on error </li></ul></ul><ul><ul><li>Enable logging. </li></ul></ul>
  12. 12. Demo