Cuebot-mobile (CucumberJS for Mobile Application) is a test automation tool wraps CucumberJS Client
- Gherkin format testcases
- Presentable HTML Test Reports
- Interactive console activity logger
- Node Version Manager
- Node.js v10+
To install NVM, just follow the following shell scripts
$ sudo apt-get upgrade
$ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
To test if you successfully installed the NVM, get the NMV version by executing the following:
$ nvm version
#1.1.7
After installing the NVM, you can now install the NodeJS using NVM by executing the following command on terminal.
$ nvm install node
To check if you successfully installed the nodejs, just get the version of nodejs by executing this on terminal.
$ node --version
#v14.5.0
To install specific node version just execute the following ( e.g. v13.12.0 )
$ nvm install v.13.12.0
And finally, to use the specific nodeJS version execute the following script ( e.g. v13.12.0 )
$ nvm use v.13.12.0
Follow the following steps fopr NMV installation on Windows.
- Download the latest nvm-setup.zip on NVM Releases page.
- Go into the downloaded zip file on your computer and double click the installer.
- Continue through all of the prompts. Then, click install.
To check that Node Version Manager actually installed open Command Prompt run the following command.
c:\nvm version
1.17
To install the latest version of NodeJS using NVM:
c:\ nvm install latest
To install a specific version of NodeJS using NVM (e.g. v13.12.0):
c:\ nvm install 13.12.0
To use specific version of NodeJS using NVM (e.g. v13.12.0):
c:\ nvm use 13.12.0
To see available version of NodeJS from your NVM:
c:\ nvm list
Create you project folder and create initial package file:
mkdir myproject
cd myproject
npm init -y
Now download and install latest cuebot-mobile
npm install cuebot-mobile@latest
To create and initialize sample project, execute the following command
node_modules\.bin\cuebot-mobile --init
To run the sample project and display the test report, execute the following command
node_modules\.bin\cuebot-mobile --exec
- To be able to run Emulator on your local machine, you must first enable Virtualization (VT-x/AMD/V) by switching it on through BIOS Setup. Here's some guide on how to enable it.
- Run the following to generate the batch scripts and property file
node_modules\.bin\cuebot-mobile --setenv
- After the batch scripts has been generated (under environment folder), right-click on env-setup.bat then click Run as Administrator
- Double click on emu-setup.bat
- Run the following to execute sample mobile testcase.
node_modules\.bin\cuebot-mobile --exec
By checking the initial feature file (sample.feature under feature folder) and using the available keyword implementations, You can get immediately get the idea on how easy to create your next test scenario ( please open the sample.feature file on your favorite IDE app )
#sample.feature
@cuebot
Feature: My Sample Feature
As Automation engineer
I want to verify that all functionality are working as they should
@testmobile
Scenario: My Sample Mobile Scenario
Given that I set "Android" as platform with version of "10"
Given that I set "emulator-5554" as device
Given that app is located at "http://apksample.ueuo.com/apk/Kids.apk"
When I create new session on "http://0.0.0.0:4723/wd/hub"
Then I wait 5 seconds
Then I close the session
- To get the list of available keyword implementation please checkout the docs folder of this Git repository
- You can use VSCode as your IDE