Test Framework for Acne Selenium+Sahi

2,318
-1

Published on

This is brief overview of automated test framework for Acne project using selenium and sahi testing tools

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

No notes for slide

Test Framework for Acne Selenium+Sahi

  1. 1. Automation Testing Framework for Acne Ibuildings Selenium(PHPUnit) and Sahi
  2. 2. Overview <ul><li>Core technologies
  3. 3. Automated Testing Framework
  4. 4. Selenium+SAHI framework
  5. 5. Introducing Pageness & data-driven tests
  6. 6. Continuous Integration with Jenkins for Sahi and Selenium
  7. 7. Demo
  8. 8. Q/A </li></ul>
  9. 9. Core Technologies <ul><li>PHP
  10. 10. Test::PHPUnit
  11. 11. Testing Tools:
  12. 12. -Selenium
  13. 13. -Sahi
  14. 14. CI : Jenkins, Ant
  15. 15. Future : Behat or PHPSpec </li></ul>
  16. 16. QA Automation Goals <ul><li>Automate everything, early
  17. 17. Long term, maintainable tests
  18. 18. Balance between regression Vs Smoke test suite
  19. 19. Selenium Grid
  20. 20. BDD approaches
  21. 21. Advance collaborative Test reporting </li></ul>
  22. 22. Phases of test automation <ul><li>Phase1 : Rec/Playback, no looping,no conditions, no config, no abstraction.
  23. 23. Phase2: data-driven, array, parameters, looping.
  24. 24. Phase3: Modular, libraries, Abstraction, UI maps, config files, global properties.
  25. 25. Phase4: keyword driven, ODBC functions, spreadsheets.
  26. 26. Phase5: Oops, everything is in object. CI, multiple types of test.Dev contributes in test suite and integrate with CI </li></ul>
  27. 27. Test Framework <ul><li>Core Vs Test Framework
  28. 28. Test Suite: tests, env,app,test group
  29. 29. Test configuration: URLs, username, passwords, machine configs
  30. 30. Test properties
  31. 31. Test Data Repository: XML, JSON, XLS, CVS
  32. 32. Parameterized Test
  33. 33. UI Mapping
  34. 34. Test Components
  35. 35. Test Scripts,
  36. 36. Test Reports, Logs
  37. 37. Benefits: Abstraction, multiple types of testing like unit, integration, load, generic test Api, test configuration, multithreading, CI </li></ul>
  38. 38. Fundamental Problems <ul><li>Hardcoded locators
  39. 39. Performance
  40. 40. Frequently changing requirements
  41. 41. Combination of manual and automated testing
  42. 42. Selenium didn't work with dynamic locator
  43. 43. Geographically diverse team
  44. 44. Lack of effective JIRA workflows
  45. 45. Slow Xpath on IE with Selenium </li></ul>
  46. 46. Solutions <ul><li>Pages removed hassle of hardcoded locators
  47. 47. Test readability become better due to pages
  48. 48. Sahi resolved performance and dynamic locators issue and wait.
  49. 49. Introducing QA in planning and estimation for better acceptance tests.
  50. 50. Collaborative method working among tester-developer-customers </li></ul>
  51. 51. Page-Objects <ul><li>Acne has separate pages defined with global locator and method defined in abstract class
  52. 52. Pages like registration, home, login, category, product, checkout, payment etc
  53. 53. Page-ness cause tests more readable
  54. 54. Page-ness hides details by abstraction of classes </li></ul>
  55. 55. Page-Example
  56. 56. SampleTest using Page Object
  57. 57. Sample Smoke Test :Selenium
  58. 58. Sample Url Check: Selenium
  59. 59. Sample Sahi Test
  60. 60. Sahi Checkout Test
  61. 61. CI with Jenkins <ul><li>We use Jenkins to run our unit as well as functionality test
  62. 62. Smoke tests run regularly give cross-browser feedback of basic functionality quickly.
  63. 63. Sanity tests gives feedback narrow regression within 5 min after deployment.
  64. 64. Overnight test suite run most of data-driven cross-browser tests.
  65. 65. Sahi tests executed much quicker than selenium tests
  66. 66. Integrated Sahi and Selenium with jenkins
  67. 67. Sahi build gives feedback within 3 minutes covering all basic functionality. We need that always green. </li></ul>
  68. 68. Example CI
  69. 69. Agile Testing
  70. 70. Agile testing best practices <ul><li>Defined Definition of “Done”
  71. 71. Collaborative acceptance tests allow everyone in team to add more tests
  72. 72. Automated build and CI
  73. 73. QA in planning and estimation
  74. 74. Well defined JIRA workflows which gives multiples eyes before releasing product
  75. 75. Team understand “Testing”
  76. 76. Everyone contribute in documentation.
  77. 77. Significant automation and continuous feedback
  78. 78. Living documentation on relish https://www.relishapp.com/sjagtap/acne </li></ul>
  79. 79. How Test framework fits in Acne <ul><li>Test framework with Regression and Sanity test suite.
  80. 80. Configuration on different browsers
  81. 81. Introduction of page object model
  82. 82. CI with Jenkins for Sahi and Selenium
  83. 83. Used power of PHPUnit than selenium
  84. 84. Combination of Selenium and Sahi
  85. 85. Agile Test documentation </li></ul>
  86. 86. Looking forward <ul><li>We are looking forward to implement behat for BDD'ing Acne.
  87. 87. We have most of the features written in Gherkins already
  88. 88. We already have Sahi framework which support behat for launching browser.
  89. 89. Behat may not be alternative to unit and regression tests but it will streamline test process. </li></ul>
  90. 90. Demo
  91. 91. Any Suggestions? Q & A
  92. 92. Thank You !!

×