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 installin VSCode terminal to install dependencies - Copy and paste the file
cypress.env.json.exampleto project root folder. Сhange the file name tocypress.env.json. Put credentials in json file. - Run command
npx cypress openin 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
describeshould 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.mdpackage.jsonpackage-lock.jsoncypress.config.js.gitignoree2e.jsci.ymlcancel.ymlglobalHooks.jscleanData.js- any other non-test-related files