This project is a user acceptance test for todo assignment project which available here.
Technologies used in project are gauge and taiko.
Gauge provides to run specific scenarios to test expectations of user on todo application. As an example, adding a new task to todo list. The scenario will be like;
1. Go to the todo app web page.
2. Click to task input area.
3. Type the task you want to do.
4. Click to save button.
5. You should see the task you add in todo list.
Where the taiko comes in is, implementing this scenario steps as functions individually to execute needed commands for running the scenario steps. For the scenario below and the step 'Go to the todo app web page', the taiko step will be like;
const { openBrowser, goto } = require('taiko');
beforeSuite( async () => {
await openBrowser();
});
afterSuite( async() => {
await closeBrowser();
});
step('Go to the todo app web page', async () => {
await goto('https://example-todo-app/');
});
The code above will open the browser first, then the app page we want to test.
- Installing the project
git clone <project_git_adress>
cd <project_dir>
- Running the project normally
npm install
npm run test
- Running the project with docker
docker run -v ${pwd}:/usr/src/app:rw -e \
TAIKO_SKIP_CHROMIUM_DOWNLOAD=true -e TAIKO_BROWSER_PATH=/usr/bin/chromium- \
browser -e TAIKO_BROWSER_ARGS=--no-sandbox,--start-maximized -e \
headless_chrome=true --entrypoint "" --user root \
zenika/alpine-chrome:with-node \
/bin/sh -c "npm install; npm test"
The CI-CD pipeline of the project is in ''./.cd/gitlab-ci.yml'.
The importance of pipeline is, getting triggered by the todo-frontend project pipeline.
After the 'deploy to test environment' stage of todo-frontend project, this projects pipeline triggered and user acceptance runs for todo-frontend project.
Todo assignment project consist of 5 different projects including this project. You can reach;
- Todo project frontend repository here,
- Todo project backend repository here,
- Todo project helm repository here,
- Todo project deployment artifacts repositry here .
The all parts of project getting deployed into to environments; test and production environments. The project is live and available in;
- Gauge official docs for js,
- Taiko official docs,
- An educational video from Scott Davis here,
- An educational video from Naveen here