Repository contains solutions to two testing practice tasks. Both focus on developing testing automation skills.
This task focues on building test cases for an algorythm, that finds the length of the longest substring without repeating characters in given string.
Test cases can be found in testDataset.json JSON file. Each test case follow the pattern:
- input - here can be found string that will be tested
- output - provides correct answer for given input
- explanation - gives explanation to the test case, tells what is tested
Furthermore, the JavaScript file longestSubstring.js provides algorythm that finds the length of the longest substring without repeating characters. File longestSubstring.test.js allows to test the algorythm using the dataset with provided test cases.
Testing is performed using npm Jest module.
Task 2. focuses on testing login UI automation.
Testing sample login UI is done in loginUI.test.js. As a testing framework it also uses Jest. Additionally it uses Puppeteer module to automatically navigate the page.
- Jest
- Puppeteer
- JavaScript
- First you need to have Node.js installed (for example from here).
- Open command line, go to the project folder and run:
npm install
This will install all the dependencies that are used in the project.
- Running tests from the Task 1:
npm test ./longestSubstring.test.js
Screenshot of successfully ran tests:
- Running tests from the Task 2:
npm test ./loginUI.test.js