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.

Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs

153 views

Published on

Performance is one of the main painful areas of Selenium suits. Usually, engineers trying to login, logout, navigate, create data, execute an action from the UI via Selenium, then, in the end, performing test assertions. This creates serious performance issue for the Selenium suite and makes Selenium tests more brittle. Also, the problem solution could be better if the test data creation and deletion also will be done before Selenium will open the browser. This will help to create independent tests later to be able to run them in parallel.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs

  1. 1. Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs Sargis Sargsyan
  2. 2. s How to design the framework to be able to use HTTP requests q How to create Test Data before test and clean up after test without UI actions w How to store login create/edit/delete objects without UI actions Best practices of Selenium WebDriverhPractical example how to use HTTP lib from the Java code7 Maintaining HTTP responsesÖ Main Topics
  3. 3. What is Test Setup? Why is it Important? [ A single Selenium test should test one and only thing. A bug in another part of the application that is not exactly related to the test should not cause the test to fail. L Every test should be independent. The test outcome should not affected by another test in the suite. Make a faster tests. As quicker test suite as much useful it is.s n Every test should create and clean the data before and the after the test run.
  4. 4. Test Case Life Cycle y Test clean up S Run the test Test initialize
  5. 5. Why should test data be created before test execution? Ĥ E 7 a Selenium tests often involve setups. Only after doing those things you are ready to assert on some aspect of the website Sign Up / Login Submissions Pages Navigation Interactions / Actions å Test Run
  6. 6. Tools & libraries 7
  7. 7. Java
  8. 8. Maven
  9. 9. TestNG
  10. 10. OkHttp
  11. 11. Gson
  12. 12. Selenium
  13. 13. Source Code https://github.com/sargissargsyan/selenium-setup-rest-api
  14. 14. Taiga.io
  15. 15. Getting Started with Selenium s
  16. 16. Let’s Test Like and Watching Buttons
  17. 17. Let’s Test Like and Watching Buttons
  18. 18. Let’s Test Like and Watching Buttons
  19. 19. Let’s Test Like and Watching Buttons
  20. 20. Let’s Test Like and Watching Buttons
  21. 21. Let’s Test Like and Watching Buttons
  22. 22. Let’s Test Like and Watching Buttons
  23. 23. Let’s Test Like and Watching Buttons
  24. 24. Let’s Test Like and Watching Buttons
  25. 25. Let’s Test Like and Watching Buttons
  26. 26. Let’s Test Like and Watching Buttons
  27. 27. Login á
  28. 28. What’s Happening When You Click on Login?
  29. 29. What’s Happening When You Click on Login?
  30. 30. What’s Happening When You Click on Login?
  31. 31. What’s Happening When You Click on Login?
  32. 32. What’s Happening When You Click on Login?
  33. 33. What’s Happening When You Click on Login?
  34. 34. What’s Happening When You Click on Login?
  35. 35. What’s Happening When You Click on Login?
  36. 36. What’s Happening When You Click on Login?
  37. 37. Create Project `
  38. 38. How to Create Project
  39. 39. How to Create Project
  40. 40. How to Create Project
  41. 41. How to Create Project
  42. 42. How to Create Project
  43. 43. Integrate with Page Object Patten
  44. 44. The Same Test with Rest API setup
  45. 45. The Test Run with Rest API setup
  46. 46. Test Run Time
  47. 47. Create Issue in Project with API
  48. 48. Clean up after y
  49. 49. Delete Created Project
  50. 50. Delete Created Project
  51. 51. Tips and Tricks Ĥ
  52. 52. Login Info in Cookies
  53. 53. Manage Cookies
  54. 54. Download Selenium Drivers with Maven plugin
  55. 55. Execute JavaScript to Click on Element
  56. 56. Wait for Page Load
  57. 57. 57 Take a Screenshot on Failure
  58. 58. 58 Get HTML Source
  59. 59. 59 Maximize the Window
  60. 60. Thank You! Have a Nice Day... Ö sargis.sargsyan@live.com ą /sargissargsyan t @sargisqa

×