Presentation is loading. Please wait.

Presentation is loading. Please wait.

Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.

Similar presentations


Presentation on theme: "Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010."— Presentation transcript:

1 Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010

2 Page 2 Agenda Automated integration testing10 minutes – Selenium – Benefits – Other used tools – Selenium IDE Automated integration testing in Openbravo10 minutes – What to automate? – Design – Stepping through code Making an automated test for Openbravo10 minutes – How to automate a test case? – Extend an existing test case Q & A30 minutes

3 Page 3 Automated integration testing – Selenium – Benefits – Other used tools – Selenium IDE Automated integration testing in Openbravo – What to automate? – Design – Stepping through code Making an automated test for Openbravo – How to automate a test case? – Extend an existing test case Q & A

4 Page 4 Selenium Selenium is a free software testing framework for web applications. Selenium Remote Control - http://seleniumhq.org/projects/remote-control/ – Allows to write tests in any programming language that can make HTTP requests; using any mainstream JavaScript- enabled browser. – Consists of: A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them. Client libraries for Python, Ruby,.NET, Perl, Java, and PHP. – Includes Selenium Core (the test execution framework) as its engine and automatically loads it into the browser.

5 Page 5 Benefits The testing suites can be executed daily, to check the most recent changes. It takes less time than a manual execution. Spot errors that a human might not notice. Prevent regressions. Free staff to do other non-repetitive tasks and to look for errors that a machine can't spot.

6 Page 6 Other used tools Selenium IDE: a Firefox extension that allows to record, edit, debug and play back tests. Firebug: a Firefox extension that lets you inspect the HTML file of a web page on an easy way. With it you can also edit and debug the code of a page. Xpath Checker: a Firefox extension that shows the XPath of an element on a web page. In addition, you can write your own XPath expressions and see the elements that match. Ant: a software tool for automating software build processes. JUnit: a unit testing framework for the Java programming language. Eclipse: Java/JUnit development environment

7 Page 7 Selenium IDE

8 Page 8 Automated integration testing10 minutes – Selenium – Benefits – Other used tools – Selenium IDE Automated integration testing in Openbravo10 minutes – What to automate? – Design – Stepping through code Making an automated test for Openbravo10 minutes – How to automate a test case? – Extend an existing test case Q & A30 minutes

9 Page 9 What to automate? Drivers and restrictions – Automation is a time consuming task. – Maintainability is an issue. – Only very stable flows should be automated. – Automated test cases have sense if executed at least ten times. – Only user-visible actions are performed – Javascript events could be missed by Selenium. Our pick – The Acceptance test http://wiki.openbravo.com/wiki/Acceptance_Testing http://wiki.openbravo.com/wiki/Acceptance_Testing

10 Page 10 Design: General diagram Test Suite Test cases StepsVerifications Expected Results Openbravo ERP (Running in a web browser) Windows FieldsButtonsLinks Selenium Tests Automated test cases Test controllers Screen definitions Parameters 2 1

11 Page 11 Stepping through 1/2: Test controllers Test cases StepsVerificationsExpected Results Automated test cases Test controllers Parameters Test controllers are closer to Functional Test Cases They know about common steps Based in superclass OpenbravoERPTest.java

12 Page 12 Design: General diagram (Again) Test Suite Test cases StepsVerifications Expected Results Openbravo ERP (Running in a web browser) Windows FieldsButtonsLinks Selenium Tests Automated test cases Test controllers Screen definitions Parameters

13 Page 13 Stepping through 2/2: Screen definitions Screen definitions are closer to HTML pages. They know about Fields, Buttons, Links. Windows FieldsButtonsLinks Automated test cases Screen definitions Parameters

14 Page 14 Automated integration testing10 minutes – Selenium – Benefits – Other used tools – Selenium IDE Automated integration testing in Openbravo10 minutes – What to automate? – Design – Stepping through code Making an automated test for Openbravo10 minutes – How to automate a test case? – Extend an existing test case Q & A30 minutes

15 Page 15 How to automate a test case? Document the scenario and execute it manually. Visit Testlink at http://tools.openbravo.com:8891/testlink/ http://tools.openbravo.com:8891/testlink/ Understand the design. Read the documentation and implementation of the main classes. Look for code that you can reuse. Code missing screen definitions. Write the test controller. Test your test.

16 Page 16 Extend an existing test case – The screen definition 1/2 2 2 1 13

17 Page 17 Extend an existing test case – The screen definition 2/2 2 2 1 1

18 Page 18 Extend an existing test case – The test controller 1 2 1 2

19 Page 19 Extend an existing test case – The test controller

20 Page 20 Extend an existing test case – Creating the file 1 2

21 Page 21 Extend an existing test case – Running the test case

22 Page 22 Extend an existing test case – Results

23 Page 23 Wrap-up Selenium is a powerful tool for tests automation. Openbravo uses Selenium and other tools as part of its Quality Assurance processes. You can use those tools and the automation framework provided by Openbravo to test your Openbravo ERP instances and modules.

24 Page 24 More info The source code is available at http://code.openbravo.com/tools/automation/main Ask your questions and give us your suggestions in http://forge.openbravo.com/projects/automation/forum The documentation is in the wiki http://wiki.openbravo.com/wiki/Category:Automated_Testing_ERP Pablo Luján pablo.lujan@openbravo.com Arun Kumar arun.kumar@openbravo.com Leo Arias leo.arias@openbravo.com elopio at #openbravo on irc.freenode.net

25 Page 25 Next webinar: “Life Cycle Management” April 22nd, 2010 IMPORTANT! Special time: 10:00 (CET)

26 Page 26 Q & A


Download ppt "Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010."

Similar presentations


Ads by Google