Skip to content

Commit 08ef8ee

Browse files
authored
Update README.md
1 parent 92698af commit 08ef8ee

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,30 @@
22
This repository contains the code for a random tester developed using [Cypress](https://www.cypress.io/). Two versions are developed, including a full random tester and a smarter random tester, and the differences between these two remain in the type of commands that each can execute. The detail is explained in sections below
33

44
## How to run
5+
In order to use the tester, you will have to follow these steps:
6+
- Get the source code from this repository: Click on Download as Zip and unzip the folder in your machine or clone the repo
7+
- Install the required modules: Using [Node Package Manager](https://www.npmjs.com/), run `npm install`. This will install the cypress and faker modules, besides a cypress [plugin](https://github.com/Bkucera/cypress-plugin-tab) for tab.
8+
- Configure the desired parameters: The repository's root folder contains two JSON files which have the configuration parameters for each test. Open them and edit the parameters as needed. You can change the baseURL, the percentage of events, the delay between events, and the number of events.
9+
- Run the desired tester: For the random tester, run `cypress run --config-file ./monkey-config.json`. For the slightly smarter random tester, run `cypress run --config-file ./smart-monkey-config.json`.
10+
11+
## The testers
12+
Cypress is an E2E test runner built over JavaScript. We used this technology due to the facility for managing web pages in a variety of browsers including Chrome, Canary, Edge, Electron, etc. and the record-and-replay functionality. The idea of the first tester is to perform a completely random test on a web application, inspired on a similar tester, the [Android Monkey](https://developer.android.com/studio/test/monkey). The second tester exists due to the high rate of errors and low probability of getting events that change the application's state of the Monkey tester.
13+
14+
## Events
15+
After evaluating a series of possible events, we defined the following 8 categories in which the events could be grouped by:
16+
- **Random Click Events**:
17+
Left, Right or Double clicks performed to an element from a random position
18+
- **Scroll Events**:
19+
Scrolling the page up, down, to the left or to the right.
20+
- **Selector Focus Events**:
21+
Focusing on elements from a random position, considering their HTML tags. The equivalent for pressing tab into a focusable element
22+
- **Keypress Events**:
23+
Introducing a character inside of a focused element. The equivalent for pressing a key from the keyboard when focusing an element.
24+
- **Special Keypress Events**:
25+
Typing special characters inside of a focused element. The special keys include Enter, Supr, Esc, Backspace, Arrows, and possible modifiers such as Shift, Alt or Ctrl.
26+
- **Page Navigation Events**:
27+
Typical navigation that an user could perform, go to the last page or to the next page in the navigation Stack.
28+
- **Browser Chaotic Events**:
29+
Events that change the browser configuration such as changing the viewport, clearing local storage or clearing the cookies.
30+
- **Selector Click Events**:
31+
Clicks performed to a specific type of element considering the HTML tags that typically induce an interaction such as <a>, <button>, <input type="submit">; also, events of filling and clearing an input element.

0 commit comments

Comments
 (0)