Jenkins is an automation tool designed for Continuous Integration (CI) and Continuous Deployment (CD). It allows automatic execution of build, testing, and deployment processes whenever code changes are made in the repository.
Prerequisites
- Chrome browser
- Node.js version 18 or higher (https://nodejs.org/en/download)
- NPM
- VSCode
- Jenkins version 2.492.2 (https://github.com/jenkinsci/jenkins/releases/tag/jenkins-2.492.2)
How to run the project
- Clone repository to your local folder "c:\Js_2025_Spring\Js_Practice"
- Open VSCode and navigate to project folder "JenkinsQA_JS_2025_spring"
- Run command
npm install
in VSCode terminal to install dependencies - Copy and paste the file
cypress.env.json.example
to project root folder. Сhange the file name tocypress.env.json
. Put credentials in json file. - Run command
npx cypress open
in VSCode terminal to run tests
Note: Global cleanup is executed before each test.
Project Coding Convention
Naming conventions:
- Use camelCase for naming conventions:
myFirstTest
- Name should be relevant to the user story name:
createNewItem.cy.js
Spec structure:
- Each block
describe
should be named as a user story - Each test (
it
) should be named as a test case
example:
describe('US_01.001 | New Item > Create a new item', () => {
it('TC_01.001.01 | Verify page load', function () {
...
})
})
Faker library
The project utilises Faker.js library. You can find more info here: https://v6.fakerjs.dev/guide/ Use this import in your file: import { faker } from '@faker-js/faker';
- Students are not allowed to install any libraries, plugins, etc.
- Students are not allowed to modify any configuration files.
!!Do not push changed files as:
README.md
package.json
package-lock.json
cypress.config.js
.gitignore
e2e.js
ci.yml
cancel.yml
globalHooks.js
cleanData.js
- any other non-test-related files