Setup a project
Create a new project
Start by creating a new folder for the user journey automation project and go inside the new folder created. If you would like to add user journey automation to an existing project, go to the respective folder and follow the command prompts below to proceed further.
# Create a new folder
mkdir user-flow-demo
# go inside the folder
cd user-flow-demo
# initialize a new Gauge project, that uses javascript and Taiko driver/test runner.
gauge init js
# Run default tests generated to verify everything is successful
npm test
# Delete the default files generated during project setup
rm specs/example.spec
rm tests/step_implementation.js
Add User Flow to your project
In the next couple of steps, we will install Gauge Taiko Steps that will help build user journey tests for a majority of common scenarios without developing any code. Please refer to documentation at https://github.com/softrams/gauge-taiko-steps for more details.
# Install Gauge Taiko Steps
npm i @softrams/gauge-taiko-steps taiko-accessibility
Include the User Flow library
To include Gauge Taiko Steps to your project, update STEP_IMPL_DIR
variable in
./env/default/js.properties
from
env/default/js.properties
STEP_IMPL_DIR = tests
to
env/default/js.properties
STEP_IMPL_DIR = node_modules/@softrams/gauge-taiko-steps/lib, \
tests
That’s all! This setup is everything you need to build your first user flow tests.