Skip to content

Automated CodeceptJS sample with Webdriver helper, Faker, MailSlurp and Page Objects.

Notifications You must be signed in to change notification settings

Ro-Nemo/CodeceptJS-Webdriver

Repository files navigation

CodeceptJS-Webdriver

OS Name: Ubuntu 20.04.2 LTS Codeceptjs: 3.0.5 Webdriverio: 6.12.1

============ Install CodeceptJS ============

  1. Upgrade UBUNTU
  • sudo apt-get install -f
  • sudo apt-get update && sudo apt-get dist-upgrade
  1. Install Console
  • sudo apt-get update && sudo apt-get upgrade
  • sudo apt-get install gdebi
  1. Install Curl
  • sudo apt-get install curl
  1. Install NodeJS
  1. Install Java
  • sudo apt-get update
  • sudo apt-get install default-jdk
  1. Install CodeceptJS
  • sudo apt install npm
  • npx create-codeceptjs .
  • npx codeceptjs init #(choose Webdriver)#
  1. Install Selenium Server
  • sudo npm install selenium-standalone -g
  • sudo npx selenium-standalone install && npx selenium-standalone start #(then press Ctrl c to stop service)#
  1. Update WebdriverIO v5 to v6
  • sudo npm install jscodeshift @wdio/codemod
  • npm i --save-dev @wdio/allure-reporter@6 @wdio/cli@6 @wdio/cucumber-framework@6 @wdio/local-runner@6 @wdio/spec-reporter@6 @wdio/sync@6 wdio-chromedriver-service@6 webdriverio@6
  1. Install faker
  • sudo npm install faker
  • sudo npm install cpf_cnpj
  1. Install MailSlurp
  • Create an account at MailSlurp.com (get apikey)
  • npm i @codeceptjs/mailslurp-helper --save-dev #(if error, insert --force at the end of command)#
  • npx codeceptjs def
  1. Restart Computer

============ Start CodeceptJS test ============

  1. Access project folder in terminal > Execute Selenium standalone Service
  • npx selenium-standalone start
  1. Access project folder in another terminal > Execute test in CodeceptJS
  • npm run codeceptjs or
  • npm run codeceptjs Proto_test.js

Credits: Ro-Nemo

About

Automated CodeceptJS sample with Webdriver helper, Faker, MailSlurp and Page Objects.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published