codeceptjs 3.5.12-beta.3 → 3.5.12-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/docs/advanced.md +351 -0
  2. package/docs/ai.md +248 -0
  3. package/docs/api.md +323 -0
  4. package/docs/basics.md +979 -0
  5. package/docs/bdd.md +539 -0
  6. package/docs/best.md +237 -0
  7. package/docs/books.md +37 -0
  8. package/docs/bootstrap.md +135 -0
  9. package/docs/build/ApiDataFactory.js +410 -0
  10. package/docs/build/Appium.js +2027 -0
  11. package/docs/build/Expect.js +422 -0
  12. package/docs/build/FileSystem.js +228 -0
  13. package/docs/build/GraphQL.js +229 -0
  14. package/docs/build/GraphQLDataFactory.js +309 -0
  15. package/docs/build/JSONResponse.js +338 -0
  16. package/docs/build/Mochawesome.js +71 -0
  17. package/docs/build/Nightmare.js +2152 -0
  18. package/docs/build/OpenAI.js +126 -0
  19. package/docs/build/Playwright.js +5110 -0
  20. package/docs/build/Protractor.js +2706 -0
  21. package/docs/build/Puppeteer.js +3905 -0
  22. package/docs/build/REST.js +344 -0
  23. package/docs/build/TestCafe.js +2125 -0
  24. package/docs/build/WebDriver.js +4240 -0
  25. package/docs/changelog.md +2572 -0
  26. package/docs/commands.md +266 -0
  27. package/docs/community-helpers.md +58 -0
  28. package/docs/configuration.md +157 -0
  29. package/docs/continuous-integration.md +22 -0
  30. package/docs/custom-helpers.md +306 -0
  31. package/docs/data.md +379 -0
  32. package/docs/detox.md +235 -0
  33. package/docs/docker.md +136 -0
  34. package/docs/email.md +183 -0
  35. package/docs/examples.md +149 -0
  36. package/docs/helpers/ApiDataFactory.md +266 -0
  37. package/docs/helpers/Appium.md +1374 -0
  38. package/docs/helpers/Detox.md +586 -0
  39. package/docs/helpers/Expect.md +275 -0
  40. package/docs/helpers/FileSystem.md +152 -0
  41. package/docs/helpers/GraphQL.md +151 -0
  42. package/docs/helpers/GraphQLDataFactory.md +226 -0
  43. package/docs/helpers/JSONResponse.md +254 -0
  44. package/docs/helpers/Mochawesome.md +8 -0
  45. package/docs/helpers/MockRequest.md +377 -0
  46. package/docs/helpers/Nightmare.md +1305 -0
  47. package/docs/helpers/OpenAI.md +70 -0
  48. package/docs/helpers/Playwright.md +2759 -0
  49. package/docs/helpers/Polly.md +44 -0
  50. package/docs/helpers/Protractor.md +1769 -0
  51. package/docs/helpers/Puppeteer-firefox.md +86 -0
  52. package/docs/helpers/Puppeteer.md +2317 -0
  53. package/docs/helpers/REST.md +218 -0
  54. package/docs/helpers/TestCafe.md +1321 -0
  55. package/docs/helpers/WebDriver.md +2547 -0
  56. package/docs/hooks.md +340 -0
  57. package/docs/index.md +111 -0
  58. package/docs/installation.md +75 -0
  59. package/docs/internal-api.md +266 -0
  60. package/docs/locators.md +339 -0
  61. package/docs/mobile-react-native-locators.md +67 -0
  62. package/docs/mobile.md +338 -0
  63. package/docs/pageobjects.md +291 -0
  64. package/docs/parallel.md +400 -0
  65. package/docs/playwright.md +632 -0
  66. package/docs/plugins.md +1259 -0
  67. package/docs/puppeteer.md +316 -0
  68. package/docs/quickstart.md +162 -0
  69. package/docs/react.md +70 -0
  70. package/docs/reports.md +392 -0
  71. package/docs/secrets.md +36 -0
  72. package/docs/shadow.md +68 -0
  73. package/docs/shared/keys.mustache +31 -0
  74. package/docs/shared/react.mustache +1 -0
  75. package/docs/testcafe.md +174 -0
  76. package/docs/translation.md +247 -0
  77. package/docs/tutorial.md +271 -0
  78. package/docs/typescript.md +180 -0
  79. package/docs/ui.md +59 -0
  80. package/docs/videos.md +28 -0
  81. package/docs/visual.md +202 -0
  82. package/docs/vue.md +143 -0
  83. package/docs/webapi/amOnPage.mustache +11 -0
  84. package/docs/webapi/appendField.mustache +11 -0
  85. package/docs/webapi/attachFile.mustache +12 -0
  86. package/docs/webapi/blur.mustache +18 -0
  87. package/docs/webapi/checkOption.mustache +13 -0
  88. package/docs/webapi/clearCookie.mustache +9 -0
  89. package/docs/webapi/clearField.mustache +9 -0
  90. package/docs/webapi/click.mustache +25 -0
  91. package/docs/webapi/clickLink.mustache +8 -0
  92. package/docs/webapi/closeCurrentTab.mustache +7 -0
  93. package/docs/webapi/closeOtherTabs.mustache +8 -0
  94. package/docs/webapi/dontSee.mustache +11 -0
  95. package/docs/webapi/dontSeeCheckboxIsChecked.mustache +10 -0
  96. package/docs/webapi/dontSeeCookie.mustache +8 -0
  97. package/docs/webapi/dontSeeCurrentUrlEquals.mustache +10 -0
  98. package/docs/webapi/dontSeeElement.mustache +8 -0
  99. package/docs/webapi/dontSeeElementInDOM.mustache +8 -0
  100. package/docs/webapi/dontSeeInCurrentUrl.mustache +4 -0
  101. package/docs/webapi/dontSeeInField.mustache +11 -0
  102. package/docs/webapi/dontSeeInSource.mustache +8 -0
  103. package/docs/webapi/dontSeeInTitle.mustache +8 -0
  104. package/docs/webapi/doubleClick.mustache +13 -0
  105. package/docs/webapi/downloadFile.mustache +12 -0
  106. package/docs/webapi/dragAndDrop.mustache +9 -0
  107. package/docs/webapi/dragSlider.mustache +11 -0
  108. package/docs/webapi/executeAsyncScript.mustache +24 -0
  109. package/docs/webapi/executeScript.mustache +26 -0
  110. package/docs/webapi/fillField.mustache +16 -0
  111. package/docs/webapi/focus.mustache +13 -0
  112. package/docs/webapi/forceClick.mustache +28 -0
  113. package/docs/webapi/forceRightClick.mustache +18 -0
  114. package/docs/webapi/grabAllWindowHandles.mustache +7 -0
  115. package/docs/webapi/grabAttributeFrom.mustache +10 -0
  116. package/docs/webapi/grabAttributeFromAll.mustache +9 -0
  117. package/docs/webapi/grabBrowserLogs.mustache +9 -0
  118. package/docs/webapi/grabCookie.mustache +11 -0
  119. package/docs/webapi/grabCssPropertyFrom.mustache +11 -0
  120. package/docs/webapi/grabCssPropertyFromAll.mustache +10 -0
  121. package/docs/webapi/grabCurrentUrl.mustache +9 -0
  122. package/docs/webapi/grabCurrentWindowHandle.mustache +6 -0
  123. package/docs/webapi/grabDataFromPerformanceTiming.mustache +20 -0
  124. package/docs/webapi/grabElementBoundingRect.mustache +20 -0
  125. package/docs/webapi/grabGeoLocation.mustache +8 -0
  126. package/docs/webapi/grabHTMLFrom.mustache +10 -0
  127. package/docs/webapi/grabHTMLFromAll.mustache +9 -0
  128. package/docs/webapi/grabNumberOfOpenTabs.mustache +8 -0
  129. package/docs/webapi/grabNumberOfVisibleElements.mustache +9 -0
  130. package/docs/webapi/grabPageScrollPosition.mustache +8 -0
  131. package/docs/webapi/grabPopupText.mustache +5 -0
  132. package/docs/webapi/grabSource.mustache +8 -0
  133. package/docs/webapi/grabTextFrom.mustache +10 -0
  134. package/docs/webapi/grabTextFromAll.mustache +9 -0
  135. package/docs/webapi/grabTitle.mustache +8 -0
  136. package/docs/webapi/grabValueFrom.mustache +9 -0
  137. package/docs/webapi/grabValueFromAll.mustache +8 -0
  138. package/docs/webapi/grabWebElement.mustache +9 -0
  139. package/docs/webapi/grabWebElements.mustache +9 -0
  140. package/docs/webapi/moveCursorTo.mustache +12 -0
  141. package/docs/webapi/openNewTab.mustache +7 -0
  142. package/docs/webapi/pressKey.mustache +12 -0
  143. package/docs/webapi/pressKeyDown.mustache +12 -0
  144. package/docs/webapi/pressKeyUp.mustache +12 -0
  145. package/docs/webapi/pressKeyWithKeyNormalization.mustache +60 -0
  146. package/docs/webapi/refreshPage.mustache +6 -0
  147. package/docs/webapi/resizeWindow.mustache +6 -0
  148. package/docs/webapi/rightClick.mustache +14 -0
  149. package/docs/webapi/saveElementScreenshot.mustache +10 -0
  150. package/docs/webapi/saveScreenshot.mustache +12 -0
  151. package/docs/webapi/say.mustache +10 -0
  152. package/docs/webapi/scrollIntoView.mustache +11 -0
  153. package/docs/webapi/scrollPageToBottom.mustache +6 -0
  154. package/docs/webapi/scrollPageToTop.mustache +6 -0
  155. package/docs/webapi/scrollTo.mustache +12 -0
  156. package/docs/webapi/see.mustache +11 -0
  157. package/docs/webapi/seeAttributesOnElements.mustache +9 -0
  158. package/docs/webapi/seeCheckboxIsChecked.mustache +10 -0
  159. package/docs/webapi/seeCookie.mustache +8 -0
  160. package/docs/webapi/seeCssPropertiesOnElements.mustache +9 -0
  161. package/docs/webapi/seeCurrentUrlEquals.mustache +11 -0
  162. package/docs/webapi/seeElement.mustache +8 -0
  163. package/docs/webapi/seeElementInDOM.mustache +8 -0
  164. package/docs/webapi/seeInCurrentUrl.mustache +8 -0
  165. package/docs/webapi/seeInField.mustache +12 -0
  166. package/docs/webapi/seeInPopup.mustache +8 -0
  167. package/docs/webapi/seeInSource.mustache +7 -0
  168. package/docs/webapi/seeInTitle.mustache +8 -0
  169. package/docs/webapi/seeNumberOfElements.mustache +11 -0
  170. package/docs/webapi/seeNumberOfVisibleElements.mustache +10 -0
  171. package/docs/webapi/seeTextEquals.mustache +9 -0
  172. package/docs/webapi/seeTitleEquals.mustache +8 -0
  173. package/docs/webapi/selectOption.mustache +21 -0
  174. package/docs/webapi/setCookie.mustache +16 -0
  175. package/docs/webapi/setGeoLocation.mustache +12 -0
  176. package/docs/webapi/switchTo.mustache +9 -0
  177. package/docs/webapi/switchToNextTab.mustache +10 -0
  178. package/docs/webapi/switchToPreviousTab.mustache +10 -0
  179. package/docs/webapi/type.mustache +21 -0
  180. package/docs/webapi/uncheckOption.mustache +13 -0
  181. package/docs/webapi/wait.mustache +8 -0
  182. package/docs/webapi/waitForClickable.mustache +11 -0
  183. package/docs/webapi/waitForDetached.mustache +10 -0
  184. package/docs/webapi/waitForElement.mustache +11 -0
  185. package/docs/webapi/waitForEnabled.mustache +6 -0
  186. package/docs/webapi/waitForFunction.mustache +17 -0
  187. package/docs/webapi/waitForInvisible.mustache +10 -0
  188. package/docs/webapi/waitForNumberOfTabs.mustache +9 -0
  189. package/docs/webapi/waitForText.mustache +13 -0
  190. package/docs/webapi/waitForValue.mustache +10 -0
  191. package/docs/webapi/waitForVisible.mustache +10 -0
  192. package/docs/webapi/waitInUrl.mustache +9 -0
  193. package/docs/webapi/waitNumberOfVisibleElements.mustache +10 -0
  194. package/docs/webapi/waitToHide.mustache +10 -0
  195. package/docs/webapi/waitUrlEquals.mustache +10 -0
  196. package/docs/webdriver.md +701 -0
  197. package/docs/wiki/Books-&-Posts.md +27 -0
  198. package/docs/wiki/Community-Helpers-&-Plugins.md +53 -0
  199. package/docs/wiki/Converting-Playwright-to-Istanbul-Coverage.md +61 -0
  200. package/docs/wiki/Examples.md +145 -0
  201. package/docs/wiki/Google-Summer-of-Code-(GSoC)-2020.md +68 -0
  202. package/docs/wiki/Home.md +16 -0
  203. package/docs/wiki/Migration-to-Appium-v2---CodeceptJS.md +83 -0
  204. package/docs/wiki/Release-Process.md +24 -0
  205. package/docs/wiki/Roadmap.md +23 -0
  206. package/docs/wiki/Tests.md +1393 -0
  207. package/docs/wiki/Upgrading-to-CodeceptJS-3.md +153 -0
  208. package/docs/wiki/Videos.md +19 -0
  209. package/package.json +2 -1
@@ -0,0 +1,27 @@
1
+ ### [Practical End 2 End Testing with CodeceptJS](https://leanpub.com/codeceptjs/)
2
+
3
+ A book by **Paul Vincent Beigang**
4
+
5
+ [![](https://user-images.githubusercontent.com/220264/58870454-e2e8ce80-86c8-11e9-868e-7deefdde47ce.png)](https://leanpub.com/codeceptjs/)
6
+
7
+ #### Contents:
8
+
9
+ 1. Preparation for End 2 End Testing with CodeceptJS
10
+ 1. Setup CodeceptJS with WebdriverIO
11
+ 1. Create Your First CodeceptJS Test
12
+ 1. Run Your First CodeceptJS Test Locally
13
+ 1. Run Test on BrowserStack Against with the Safari Browser
14
+ 1. How to Debug & Fix a Failing E2E Test
15
+ 1. Run a CodeceptJS Test in GitLab´s Continuous Integration (CI) Environment
16
+ 1. Delicious Test Reports With Allure
17
+
18
+ ### Posts
19
+
20
+ A list of good educational posts about CodeceptJS
21
+
22
+ * [QA Automation From Zero-to-Hero with CodeceptJS End-to-End Testing](https://medium.com/@dan.ryan.emmons/qa-automation-from-zero-to-hero-with-codeceptjs-end-to-end-testing-719db9d6ff5c) by Dan Emmons
23
+ * [Effective End2End Tests with CodeceptJS](https://hackernoon.com/effective-end-2-end-testing-in-javascript-with-codeceptjs-37c8d7d6a928) by @davertmik
24
+ * [Customizing CodeceptJS Skeleton](https://medium.com/@successivetech/codeceptjs-skeleton-9ba86d3b45ec)
25
+ * [Running End to End tests as Google Cloud Functions](https://hackernoon.com/running-end-to-end-tests-as-google-cloud-functions-f5e34ffc3984)
26
+ * [End-To-End Testing With CodeceptJS](https://www.monterail.com/blog/end-to-end-testing-with-codeceptjs) by Piotr Michalski
27
+ * [Getting started with CodeceptJS and Selenium WebDriver](https://medium.com/@garrettvorce/getting-started-with-selenium-and-codeceptjs-c0698e8df677)
@@ -0,0 +1,53 @@
1
+ Here is the list of helpers created by our community.
2
+ Please **add your own** by editing this page.
3
+ ## Webhooks
4
+
5
+ * [codeceptjs-webhook-helper](https://github.com/onemolegames/codeceptjs-webhook-helper) - to check webhook calls during the tests.
6
+
7
+ ## Email Checking
8
+
9
+ * [MailCatcher](https://gist.github.com/schmkr/026732dfa1627b927ff3a08dc31ee884) - to check emails via Mailcatcher locally.
10
+ * [codeceptjs-mailhog-helper](https://github.com/tsuemura/codeceptjs-mailhog-helper) - to check emails via Mailhog locally.
11
+ * [codeceptjs-testmailapp-helper](https://github.com/pavkam/codeceptjs-testmailapp-helper) - to check emails via Testmail.app service.
12
+ * [codeceptjs-mailosaurhelper](https://github.com/yurkovychv/codeceptjs-mailosaur) - to check emails via [Mailosaur](https://mailosaur.com/) service.
13
+
14
+ ## Data Sources
15
+
16
+ * [codeceptjs-httpmock](https://github.com/testphony/codeceptjs-httpMock) - a helper which wraps mockttp library to manage http mock in tests.
17
+ * [codeceptjs-http](https://github.com/testphony/codeceptjs-http) - a helper which wraps then-request library to process HTTP requests. It's alternative helper that provides more flexible request management.
18
+ * [codeceptjs-dbhelper](https://github.com/thiagodp/codeceptjs-dbhelper) - allows you to execute queries or commands to databases using database-js.
19
+
20
+ ## Cloud Providers
21
+ * [codeceptjs-saucehelper](https://github.com/puneet0191/codeceptjs-saucehelper/) - a helper which updates `Test Names` & `Test Results` on Saucelabs
22
+ * [codeceptjs-bshelper](https://github.com/PeterNgTr/codeceptjs-bshelper) - a helper which updates `Test Names` & `Test Results` on Browserstack
23
+ * [codeceptjs-tbhelper](https://github.com/testingbot/codeceptjs-tbhelper) - a helper which updates `Test Names` & `Test Results` on TestingBot
24
+
25
+ ## Visual-Testing
26
+ * [codeceptjs-resemblehelper](https://github.com/puneet0191/codeceptjs-resemblehelper) - a helper which helps with visual testing using resemble.js.
27
+ * [codeceptjs-applitoolshelper](https://www.npmjs.com/package/codeceptjs-applitoolshelper) - a helper which helps interaction with [Applitools](https://applitools.com)
28
+ * [codeceptjs-pixelmatchhelper](https://github.com/stracker-phil/codeceptjs-pixelmatchhelper) - a helper that integrates pixelmatch for visual testing.
29
+
30
+ ## Reporters
31
+ * [codeceptjs-rphelper](https://github.com/reportportal/agent-js-codecept) is a CodeceptJS helper which can publish tests results on ReportPortal after execution.
32
+ * [codeceptjs-xray-helper](https://www.npmjs.com/package/codeceptjs-xray-helper) is a CodeceptJS helper which can publish tests results on [XRAY](https://confluence.xpand-it.com/display/XRAYCLOUD/Import+Execution+Results+-+REST).
33
+ * [codeceptjs-xray-cloud-helper](https://www.npmjs.com/package/codeceptjs-xray-cloud-helper) is a helper that automatically retrieves the result of CodeceptJS tests and sends them to XRAY/JIRA(cloud version) via [XRAY Cloud API](https://docs.getxray.app/display/XRAYCLOUD/Import+Execution+Results+-+REST+v2#ImportExecutionResultsRESTv2-XrayJSONresults).
34
+ * [codeceptjs-slack-reporter](https://www.npmjs.com/package/codeceptjs-slack-reporter) Get a Slack notification when one or more scenarios fail.
35
+ * [codeceptjs-browserlogs-plugin](https://github.com/pavkam/codeceptjs-browserlogs-plugin) Record the browser logs for failed tests.
36
+ * [codeceptjs-testrail](https://github.com/PeterNgTr/codeceptjs-testrail) - a plugin to integrate with [Testrail](https://www.gurock.com/testrail)
37
+
38
+ ## Browser request control
39
+ * [codeceptjs-resources-check](https://github.com/luarmr/codeceptjs-resources-check) Load a URL with Puppeteer and listen to the requests while the page is loading. Enabling count the number or check the sizes of the requests.
40
+
41
+ ## Assertion & Validations
42
+ * [codeceptjs-chai](https://www.npmjs.com/package/codeceptjs-chai) is a CodeceptJS helper which wraps
43
+ [chai](https://www.chaijs.com/) library to complete chai assertion steps with CodeceptJS logging.
44
+
45
+ ## Other
46
+
47
+ * [codeceptjs-cmdhelper](https://github.com/thiagodp/codeceptjs-cmdhelper) allows you to run commands in the terminal/console
48
+ * [eslint-plugin-codeceptjs](https://www.npmjs.com/package/eslint-plugin-codeceptjs) Eslint rules for CodeceptJS.
49
+ * [codeceptjs-datalayer-helper](https://github.com/kobenguyent/codeceptjs-datalayer-helper) CodeceptJS DataLayer helper helps you to get the datalayer JavaScript array that is used to store information and send this data to the tag manager.
50
+ * [codeceptjs-a11y-helper](https://github.com/kobenguyent/codeceptjs-a11y-helper) accessibility tests integrated with CodeceptJS - Playwright-axe
51
+ * [codeceptjs-lighthouse-helper](https://github.com/kobenguyent/codeceptjs-lighthouse-helper) lighthouse audit integrated with CodeceptJS - Playwright
52
+ * [Snowplow Data analytics](https://www.npmjs.com/package/@viasat/codeceptjs-snowplow-helper) - Test your Snowplow events implementations with CodeceptJS and Snowplow Micro.
53
+ * [codeceptjs-failure-logger](https://github.com/kobenguyent/codeceptjs-failure-logger) - Log failed CodeceptJS tests to file
@@ -0,0 +1,61 @@
1
+ How to convert `playwright` coverage format to `istanbul` coverage
2
+
3
+ To convert coverage generated from `playwright` to `istanbul` coverage, you first need to install
4
+ - [`v8-to-istanbul`](https://www.npmjs.com/package/v8-to-istanbul)
5
+
6
+ Once installed, convert the coverage to a format which `istanbul` can recognize, by writing a script as shown below.
7
+
8
+ ```ts
9
+ import glob from 'glob'
10
+ import v8toIstanbul from 'v8-to-istanbul'
11
+ let coverage
12
+
13
+ import fs from 'fs'
14
+
15
+ const coverageFolder = `${process.cwd()}/coverage`
16
+
17
+ async function isExists(path) {
18
+ try {
19
+ await fs.access(path, null)
20
+ return true
21
+ } catch {
22
+ return false
23
+ }
24
+ }
25
+
26
+ glob.sync(process.cwd() + '/output/coverage/**/').forEach(item => {
27
+ const directory = fs.opendirSync(item)
28
+ let file
29
+ while ((file = directory.readSync()) !== null) {
30
+ if (file && file.name.includes('.coverage.json') === true) {
31
+ const fileName = file.name
32
+ if (fileName) {
33
+ coverage = require(`${process.cwd()}/output/coverage/${fileName}`)
34
+ }
35
+ }
36
+ }
37
+ directory.closeSync()
38
+ })
39
+
40
+ void (async () => {
41
+ for (const entry of coverage) {
42
+ // Used to get file name
43
+ const file = entry.url.match(/(?:http(s)*:\/\/.*\/)(?<file>.*)/)
44
+
45
+ const converter = v8toIstanbul(file.groups.file, 0, {
46
+ source: entry.source,
47
+ })
48
+
49
+ await converter.load()
50
+ converter.applyCoverage(entry.functions)
51
+
52
+ // Store converted coverage file which can later be used to generate report
53
+ const exist = await isExists(coverageFolder)
54
+ if (!exist) {
55
+ fs.mkdirSync(coverageFolder, {recursive: true})
56
+ }
57
+
58
+ await fs.writeFileSync(`${coverageFolder}/final.json`, JSON.stringify(converter.toIstanbul(), null, 2))
59
+ }
60
+ })()
61
+ ```
@@ -0,0 +1,145 @@
1
+ ## [TodoMVC Examples](https://github.com/codecept-js/examples)
2
+
3
+ ![](https://github.com/codecept-js/examples/raw/master/todo.png)
4
+
5
+ Playground repository where you can run tests in different helpers on a basic single-page website.
6
+
7
+ Tests repository demonstrate usage of
8
+
9
+ * Playwright helper
10
+ * Puppeteer helper
11
+ * WebDriver helper
12
+ * TestCafe plugin
13
+ * Toggle headless mode with env variables
14
+ * PageObjects
15
+ * Cucumber syntax
16
+
17
+ ## [Basic Examples](https://github.com/Codeception/CodeceptJS/tree/master/examples)
18
+
19
+ CodeceptJS repo contains basic tests (both failing and passing) just to show how it works.
20
+ Our team uses it to test new features and run simple scenarios.
21
+
22
+ ## [CodeceptJS Cucumber E2E Framework](https://github.com/gkushang/codeceptjs-e2e)
23
+
24
+ This repository contains complete E2E framework for CodeceptJS with Cucumber and SauceLabs Integration
25
+
26
+ * CodecepJS-Cucumber E2E Framework
27
+ * Saucelabs Integration
28
+ * Run Cross Browser tests in Parallel on SauceLabs with a simple command
29
+ * Run tests on `chrome:headless`
30
+ * Page Objects
31
+ * `Should.js` Assertion Library
32
+ * Uses `wdio` service (selenium-standalone, sauce)
33
+ * Allure HTML Reports
34
+ * Uses shared Master configuration
35
+ * Sample example and feature files of GitHub Features
36
+
37
+ ## [Enterprise Grade Tests](https://github.com/uc-cdis/gen3-qa)
38
+
39
+ Complex testing solution by [Gen3](https://github.com/uc-cdis/gen3-qa)
40
+
41
+ Includes
42
+
43
+ * classical CodeceptJS tests
44
+ * BDD tests
45
+ * Jenkins integration
46
+ * Complex Before/BeforeSuite scripts and more
47
+
48
+ ## [Testing Single Page Application](https://github.com/bugiratracker/codeceptjs-demo)
49
+
50
+ End 2 end tests for Task management app (currently offline).
51
+
52
+ Tests repository demonstrate usage of
53
+
54
+ * Puppeteer helper
55
+ * ApiDataFactory helper
56
+ * autoLogin plugin
57
+ * Dynamic config with profiles
58
+
59
+ ## [Practical E2E Tests](https://gitlab.com/paulvincent/codeceptjs-e2e-testing)
60
+
61
+ Examples from the book [Practical End 2 End Testing with CodeceptJS](https://leanpub.com/codeceptjs/) by **Paul Vincent Beigang**.
62
+
63
+ This repository demonstrates usage of:
64
+
65
+ * dynamic config with profiles
66
+ * testing WYSIWYG editor
67
+ * GitLab CI
68
+
69
+ ## [Amazon Tests v2](https://gitlab.com/thanhnguyendh/codeceptjs-wdio-services)
70
+
71
+ Testing Amazon website using Selenium WebDriver.
72
+
73
+ This repository demonstrates usage of:
74
+
75
+ * WebDriver helper
76
+ * Page Objects
77
+ * wdio services (selenium-standalone)
78
+ * Parallel execution
79
+ * GitLab CI setup
80
+
81
+ ## [Tests with Docker Compose](https://github.com/mathesouza/codeceptjs-docker-compose)
82
+
83
+ Running CodeceptJS tests with Docker Compose
84
+
85
+ This repository demonstrates usage of:
86
+
87
+ * CodeceptJS Docker image
88
+ * WebDriver helper
89
+ * Allure plugin
90
+
91
+
92
+ ## [AngularJS Example Tests](https://github.com/armno/angular-e2e-codeceptjs-example)
93
+
94
+ Based on [Setting up End-to-End Testing in Angular Project with CodeceptJS](https://medium.com/@armno/setting-up-end-to-end-testing-in-angular-project-with-codeceptjs-ac1784de3420) post by Armno Prommarak.
95
+
96
+ This repository demonstrates usage of
97
+
98
+ * Puppeteer helper
99
+ * Working with Angular CLI
100
+ * Reports with Mochawesome helper
101
+
102
+ ## [REST Example Tests](https://github.com/PeterNgTr/codeceptjs-rest-demo)
103
+
104
+ This repository demonstrates usage of
105
+
106
+ * REST helper
107
+
108
+ ## [Automation Starter](https://github.com/sjorrillo/automation-starter)
109
+
110
+ The purpose of this application is for learning the basics and how to use good practices and useful tools in automation.
111
+
112
+ * Puppeteer helper
113
+ * Working with gherkin, also it has type definitions and to be able to use them inside when, given and then make sure you add `declare function inject(): { I: CodeceptJS.I, [key: string]: any; };`in the `steps.d.ts`file
114
+ * Linting `airbnb-base`, `codeceptjs/codeceptjs` and full ES6 support
115
+
116
+ ## [Example for using: Puppeteer, Gherkin, Allure with parallel execution](https://github.com/SchnuckySchuster/codeceptJSExample)
117
+
118
+ This is a ready to use example that shows how to integrate CodeceptJS with Puppeteer and Allure as reporting tool.
119
+
120
+ * detailed ReadMe
121
+ * tests written in cucumber alongside tests written in the codeceptJS DSL
122
+ * puppeteer helper example
123
+ * test steps, pages, fragments
124
+ * examples for sequential and parallel execution
125
+ * generation of allure test results
126
+
127
+ ## [Example for Advanced REST API testing: TypeScript, Axios, CodeceptJS, Jest Expect, Docker, Allure, Mock-Server, Prettier + Eslint, pre-commit, Jest Unit Tests ](https://github.com/EgorBodnar/rest-axios-codeceptjs-allure-docker-test-example)
128
+ One button example with built-in mocked backend.
129
+
130
+ If you already have a UI testing solution based on the CodeceptJS and you need to implement advanced REST API testing you can just extend your existing framework. Use this implementation as an example.
131
+ This is necessary if all integrations with TMS and CI/CD are already configured, and you do not want to reconnect and configure the plugins and libraries used for the new test runner. Use CodeceptJS!
132
+
133
+ * Easy run
134
+ * Detailed README
135
+ * Well documented mocked backend's REST API endpoints
136
+ * HTTP request client with session support and unit tests
137
+ * Exemplary code control
138
+ * Ready to launch in a CI/CD system as is
139
+ * OOP, Test data models and builders, endpoint decorators
140
+
141
+ ## [Playwright fun with CodeceptJS](https://github.com/PeterNgTr/codeceptjs-playwright-fun)
142
+ * Tests are written in TS
143
+ * CI/CD with Github Actions
144
+ * Page Object Model is applied
145
+ * ReportPortal Integration
@@ -0,0 +1,68 @@
1
+ ### About
2
+ GSoC is an international annual program in which Google awards stipends to university students who successfully complete a requested coding project during the summer.
3
+
4
+ Codecept-JS has decided to apply to participate in GSoC 2020, Please note that the final list of GSoC 2020 organizations will be announced on 22nd Feb 2020.
5
+
6
+ To read more about the program please visit [GSoC Program](https://summerofcode.withgoogle.com/)
7
+
8
+ The timeline for the program can be found on [Official Program Timeline](https://summerofcode.withgoogle.com/how-it-works/#timeline)
9
+
10
+ ### Contact Information
11
+
12
+ For all the students who are interested in working with Codecept-JS organization for GSoC 2020, you can start by reaching out to our organization team by posting your interest in our [Forum](https://codecept.discourse.group/)
13
+
14
+ Read about the Project on our [Official Project Website](https://codecept.io/)
15
+
16
+ You can also join our Community Slack, which is used for community conversation, our GSoC team will be available on slack, we will have dedicated channel for GSoC Students and Projects, join [here](http://bit.ly/chat-codeceptjs)
17
+
18
+ ### Student Information
19
+
20
+ If you are a student and are interested in participating, the following is useful information.
21
+
22
+ #### Proposal Guidelines
23
+ Before applying as a Codeceptjs Contributor, we suggest you review the points below. It can help you with creating a strong Proposal.
24
+
25
+ 1. Read about Codeceptjs on our [Official Website](https://codecept.io/)
26
+ 2. Setup Codeceptjs on your working system, and then Go through the list of open issues on our [Github Repo](https://github.com/Codeception/CodeceptJS/issues), try to help us with fixing some of them, or help in testing existing PR's from our developers.
27
+ 3. Go through the guides available on our official website, understand how our helpers work and check the list of current helpers on our organization [Github](https://github.com/codecept-js)
28
+
29
+ #### Application Template
30
+
31
+ If you are planning to send us a proposal, please make sure you have addressed the following elements:
32
+
33
+ 1. About you (your background, experience, education, hobbies)
34
+ 2. Project background (current state of what exist)
35
+ 3. Design/description of work
36
+ 4. Benefit of your work to the project users and developers
37
+ 5. Deliverables
38
+ 6. Scheduling
39
+ 7. Other commitments (i.e., exams, part time work, holidays, lectures, etc.)
40
+ 8. Community engagement (involvement, sample PR's, forum discussions, other open-source involvement)
41
+
42
+ ### Idea's for GSoC 2020
43
+
44
+ #### Improve Visual Testing Support in Codeceptjs
45
+ CodeceptJS has a visual testing helper which is based on resemble.js, instructions to set up and use the helper can be found [here](https://github.com/codecept-js/codeceptjs-resemblehelper)
46
+
47
+ We have several improvements we want to make to our helper, here is the list.
48
+ 1. Add Support for Allure Reporter
49
+ 2. Add Support for Visual Testing with [Codecept UI](https://codecept.io/ui/)
50
+ 3. Support for [Workers](https://codecept.io/parallel/)
51
+
52
+ Knowledge Prerequisite: Github, Nodejs, CodeceptJS, Resemble.js
53
+
54
+ Difficulty: Medium
55
+
56
+ Possible Mentors: Puneet Kala, Koushik Mohan
57
+
58
+ #### Improve Codecept UI
59
+ CodeceptJS has an interactive, graphical test runner, which is called CodeceptUI. It works on Browsers and helps in managing tests.
60
+ We need help with improving the CodeceptUI project, fixing existing issues.
61
+ 1. To get started, please read about CodeceptUI [here](https://codecept.io/ui/)
62
+ 2. To get your hands on the code, you can check out the Repo [here](https://github.com/codecept-js/ui), look at the list of open issues and start with fixing them.
63
+
64
+ Knowledge Prerequisite: Github, CodeceptJS, JS, VueJS, Express.js, WebSockets, NodeJS
65
+
66
+ Difficulty: Medium
67
+
68
+ Possible Mentors: Michael Bodnarchuk, Paul
@@ -0,0 +1,16 @@
1
+ Wiki Pages contain community content which is partly copied into the website.
2
+
3
+ * :toolbox: [Community Helpers & Plugins](https://github.com/codeceptjs/CodeceptJS/wiki/Community-Helpers-&-Plugins) - collection of community-driven plugins and helpers (synced with website).
4
+ * :eyes: [Examples](https://github.com/codeceptjs/CodeceptJS/wiki/Examples) - collection of CodeceptJS sample projects (synced with website).
5
+ * :book: [Books & Posts](https://github.com/Codeception/CodeceptJS/wiki/Books-&-Posts) - posts about CodeceptJS (synced with website).
6
+ * :tv: [Videos](https://github.com/codeceptjs/CodeceptJS/wiki/Videos) - videos on CodeceptJS (synced with website).
7
+ Add your own entries to these lists.
8
+
9
+ Other useful links:
10
+ * [Official Site](http://codecept.io)
11
+ * [Roadmap](https://github.com/Codeception/CodeceptJS/wiki/Roadmap)
12
+ * [Code on Github](https://github.com/Codeception/CodeceptJS)
13
+ * [Change log](https://github.com/Codeception/CodeceptJS/blob/master/CHANGELOG.md)
14
+ * [GSoC](https://github.com/Codeception/CodeceptJS/wiki/Google-Summer-of-Code-(GSoC)-2020)
15
+
16
+
@@ -0,0 +1,83 @@
1
+ # Migrating from Appium 1.x to Appium 2.x
2
+ This document is a guide for those who are using Appium 1.x and wish to migrate to Appium 2.x. It contains a list of breaking changes and how to migrate your environments or test suites to ensure compatibility with Appium 2.0.
3
+
4
+ # Overview of Appium 2.0
5
+ Appium 2.0 is the most major new release of Appium in over 5 years. The changes in Appium 2.0 are not primarily related to changes in automation behaviors for specific platforms. Instead, Appium 2.0 reenvisions Appium as a platform where "drivers" (code projects that introduce support for automation of a given platform) and "plugins" (code projects that allow for overriding, altering, extending, or adding behaviors to Appium) can be easily created and shared.
6
+
7
+ At the same time, the Appium project is taking the opportunity to remove many old and deprecated bits of functionality.
8
+
9
+ Together these do introduce a few breaking changes to how Appium is installed, how drivers and various features are managed, and protocol support. These are detailed below.
10
+
11
+ # Breaking Changes
12
+ Here we call out the breaking changes and what you need to do to account for them.
13
+
14
+ ## ‼ Default server base path
15
+ With Appium 1.x, the server would accept commands by default on http://localhost:4723/wd/hub. The /wd/hub base path was a legacy convention from the days of migrating from Selenium 1 to Selenium 2, and is no longer relevant. As such the default base path for the server is now /. If you want to retain the old behaviour, you can set the base path via a command line argument as follows:
16
+
17
+ `appium --base-path=/wd/hub`
18
+
19
+ ## ‼ Installing drivers during setup
20
+ When you installed Appium 1.x, all available drivers would be installed at the same time as the main Appium server. This is no longer the case. Simply installing Appium 2.0 (e.g., by npm install -g appium@next), will install the Appium server only, but no drivers. To install drivers, you must instead use the new [Appium extension CLI](https://appium.github.io/appium/docs/en/2.0/cli/extensions/). For example, to install the latest versions of the XCUITest and UiAutomator2 drivers, after installing Appium you would run the following commands:
21
+
22
+ ```
23
+ appium driver install uiautomator2,xcuitest # installs the latest driver version
24
+ ```
25
+ At this point, your drivers are installed and ready. There's a lot more you can do with this CLI so be sure to check out the docs on it. If you're running in a CI environment or want to install Appium along with some drivers all in one step, you can do so using some special flags during install, for example:
26
+
27
+ `npm install --global appium --drivers=xcuitest,uiautomator2`
28
+ This will install Appium and the two drivers for you in one go. Please uninstall any existing Appium 1.x npm packages (with npm uninstall -g appium) if you get an installation or startup error.
29
+
30
+ ## ‼ Capabilities
31
+ One significant difference between old and new protocols is in the format of capabilities. Previously called "desired capabilities", and now called simply "capabilities", there is now a requirement for a so-called "vendor prefix" on any non-standard capabilities. The list of standard capabilities is given in the [WebDriver Protocol spec](https://www.w3.org/TR/webdriver/#capabilities), and includes a few commonly used capabilities such as browserName and platformName.
32
+
33
+ These standard capabilities continue to be used as-is. All other capabilities must include a "vendor prefix" in their name. A vendor prefix is a string followed by a colon, such as appium:. Most of Appium's capabilities go beyond the standard W3C capabilities and must therefore include vendor prefixes (we recommend that you use appium: unless directed otherwise by documentation). For example:
34
+
35
+ ```
36
+ `appium:app`
37
+ `appium:noReset`
38
+ `appium:deviceName`
39
+ ```
40
+
41
+ This requirement may or may not be a breaking change for your test suites when targeting Appium 2.0. If you're using an updated Appium client (at least one maintained by the Appium team), the client will add the appium: prefix for you on all necessary capabilities automatically. New versions of [Appium Inspector](https://github.com/appium/appium-inspector) will also do this. Cloud-based Appium providers may also do this. So simply be aware that if you get any messages to the effect that your capabilities lack a vendor prefix, this is how you solve that problem.
42
+
43
+ To make everyone's lives a bit easier with CodeceptJS, you don't need to update your capabilities to include "vendor prefix", CodeceptJS does it for you out of the box.
44
+
45
+ ## ‼ WebdriverIO upgrade
46
+ CodeceptJS should be installed with webdriverio support, as the moment of testing, `webdriverio@8.6.3` works seamlessly:
47
+ ```bash
48
+ npm install codeceptjs webdriverio@8.6.3 --save
49
+ ```
50
+
51
+ ## ‼ CodeceptJS configuration
52
+
53
+ ```
54
+ ...
55
+ appiumV2: true, // set this to true to try out appium 2.x
56
+ 'app': `${process.cwd()}/build/Monefy_Pro_v1.15.0.apk`,
57
+ 'platform': 'android',
58
+ 'device': 'emulator',
59
+ 'port': DEFAULT_PORT,
60
+ 'path': '/wd/hub',
61
+ browser: '',
62
+ desiredCapabilities: {
63
+ 'appPackage': data.packageName,
64
+ 'deviceName': process.env.DEVICE || 'Emulator',
65
+ 'platformName': process.env.PLATFORM || 'android',
66
+ 'platformVersion': process.env.OS_VERSION || '11.0',
67
+ 'automationName': process.env.ENGINE || 'UIAutomator2',
68
+ 'avd': process.env.UDID || 'Pixel_XL_API_30',
69
+ 'newCommandTimeout': 300000,
70
+ 'androidDeviceReadyTimeout': 300000,
71
+ 'androidInstallTimeout': 90000,
72
+ 'appWaitDuration': 300000,
73
+ 'autoGrantPermissions': true,
74
+ 'gpsEnabled': true,
75
+ 'isHeadless': false,
76
+ 'noReset': false,
77
+ 'noSign': true,
78
+ }
79
+ ...
80
+ ```
81
+
82
+
83
+ Demo project to try with Appium v2: https://github.com/kobenguyent/thanh-nguyen/tree/main/task2
@@ -0,0 +1,24 @@
1
+ This is the guide for maintainers:
2
+
3
+ ## Release Process
4
+
5
+ 1. Pull the latest changes from main branch for release stream e.g. 3.x
6
+ 2. Create a release branch and switch to it by `git checkout -b release-x.x.x`
7
+ 3. Update version in `package.json`
8
+ 4. Go through the commits for the new release and add them to the CHANGELOG.md:
9
+ * Changelog should be written for humans (not for robots).
10
+ * Use simple wording explaining what the change is, how to use a new feature (maybe with a code example) and mention the related issue.
11
+ * When using `#123` a link for issue #123 will be automatically added.
12
+ * A contributor must be mentioned. We use GitHub names with `@` prefix. A link to user profile is automatically added.
13
+ 5. Run `./runok.js docs` to build documentation
14
+ 6. Commit all changes, push and create a PR
15
+ 7. Check that all tests pass and merge your PR
16
+ 8. Run `./runok.js release` to publish latest release. The website will be updated.
17
+ * To update version for patch release: `./runok.js release patch`
18
+ * To update version for minor release: `./runok.js release minor`
19
+ 9. Post announcements in Twitter & Slack
20
+
21
+ ## Updating the website
22
+
23
+ * Run `./runok.js docs:helpers` to build docs from helpers
24
+ * Run `./runok.js publish:site` to update a website
@@ -0,0 +1,23 @@
1
+ [Upcoming releases](https://github.com/Codeception/CodeceptJS/projects)
2
+
3
+ ## Backlog
4
+
5
+ * Shadow-DOM locator integration with webdriverio 5.x
6
+ * Cypress integration
7
+ * Reuse a single browser session while writing tests
8
+
9
+ ---
10
+
11
+ ## Done
12
+
13
+ To make those features implemented, consider [sponsoring CodeceptJS](https://github.com/Codeception/CodeceptJS/issues/1462).
14
+
15
+ * ~GraphQL helper~
16
+ * ~Cypress-like Development mode:~
17
+ * ~UI for selecting and executing tests~
18
+ * ~[Detox](https://github.com/wix/Detox) integration for React Native and mobile testing~
19
+ * ~TestCafe integration~
20
+ * ~Parallel execution via workers (improves CPU consumation, reporting)~
21
+ * ~Mock Request/Response in Puppeteer helper via [PollyJS](https://github.com/Netflix/pollyjs).~
22
+ * Update BDD/Gherkin support to Gherkin version 6 specification
23
+ * [See Version 6.0.13](https://github.com/cucumber/cucumber/blob/master/gherkin/CHANGELOG.md#6013---2018-09-25)