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.

codecept.js introduce - front end test E2E tool introduce

1,416 views

Published on

Codecept.js is a framework which integrate Webdriver.io, Protractor, Phantom.js, make QA / developer easy to program front end test / UI test code.

Let's know new framework - codecept.js

Published in: Technology
  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/4t1sx ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

codecept.js introduce - front end test E2E tool introduce

  1. 1. E2E tool introduce @Caesar
  2. 2. Caesar Chi clonncd
  3. 3. Caesar Chi 2.0 clonncd
  4. 4. Do you have e2e test?
  5. 5. Maybe QA team in E2E?
  6. 6. How many resource do you have?
  7. 7. Test UI by yourself. Stand out DRY principle
  8. 8. There are so many UI auto test tool.
  9. 9. that sounds great, lets code for e2e test
  10. 10. But e2e test so hard
  11. 11. Less • hard to code • assertion is bad • have to know deeply flow control • big gap for newbie
  12. 12. Protractor
  13. 13. Protractor Go to target Url
  14. 14. Protractor An assertion
  15. 15. Protractor Selector and do something
  16. 16. Protractor Another assertion
  17. 17. Protractor Another assertion What the …
  18. 18. E2E codecept.io
  19. 19. http://codecept.io/
  20. 20. codecept.js • Every command is described as an action of a user visiting a site. • CodeceptJS provides a general high-level API which can easily be executed • Control browser in realtime with API of CodeceptJS
  21. 21. codecept.js • Synchronous Tests API • user's perspective • Backend agnostic • PageObjects supported • Written in ES6 without transpilers.
  22. 22. codecept.js
  23. 23. codecept.js Helper
  24. 24. Codecept.js VS …
  25. 25. VS • sss
  26. 26. VS • sss
  27. 27. VS • sssss
  28. 28. Codecept.js example
  29. 29. codecept.js
  30. 30. codecept.js Go to target Url
  31. 31. codecept.js An assertion
  32. 32. codecept.js Selector and do something
  33. 33. codecept.js Another assertion
  34. 34. codecept.js Another assertion
  35. 35. Codecept.js install
  36. 36. Codecept.js npm install -g codeceptjs npm install -g webdriver-manager And And npm install -g webdriverio
  37. 37. Codecept.js up & run
  38. 38. Codecept.js $ codeceptjs init Generate a config of codecept.js
  39. 39. Codecept.js $ codeceptjs gt Generate a basic test.js of codecept.js
  40. 40. Codecept.js Edit basic_test.js file content
  41. 41. Codecept.js $ codeceptjs run Runs codecept.js test
  42. 42. sssss
  43. 43. Codecept.js locator
  44. 44. I.amOnPage http://codecept.io/helpers/WebDriverIO/#amonpage
  45. 45. I.fillField http://codecept.io/helpers/WebDriverIO/#fillfield
  46. 46. I.click http://codecept.io/helpers/WebDriverIO/#fillfield
  47. 47. I.checkOption http://codecept.io/helpers/WebDriverIO/#checkoption
  48. 48. I.selectOption http://codecept.io/helpers/WebDriverIO/#selectoption
  49. 49. I.acceptPopup I.cancelPopup http://codecept.io/helpers/WebDriverIO/#acceptpopup
  50. 50. Codecept.js assertion
  51. 51. I.see http://codecept.io/helpers/WebDriverIO/#see
  52. 52. I.seeElement http://codecept.io/helpers/WebDriverIO/#seeelement
  53. 53. I.seeInTitle http://codecept.io/helpers/Protractor/#seeintitle
  54. 54. Codecept.js helper
  55. 55. I.saveScreenshot http://codecept.io/helpers/Protractor/#savescreenshot
  56. 56. I.resizeWindow http://codecept.io/helpers/Protractor/#resizewindow
  57. 57. I.acceptPopup I.can cancelPopup http://codecept.io/helpers/WebDriverIO/#acceptpopup
  58. 58. Codecept.js comprare
  59. 59. codecept.io Protractor
  60. 60. Codecept.js recap • Support popular test framework (mostly) • Not another test framework • Make people easy to use • Make people easy to read
  61. 61. Codecept.js recap • Support popular test framework (mostly) • Not another test framework • Make people easy to use • Make people easy to read • But have to know …
  62. 62. Life is short Test is needs https://leanpub.com/frontend_e2e_test_guidebook

×