|
1 | 1 | The e2e tests follow this architecture: |
2 | 2 |
|
3 | | - |
| 3 | + |
| 4 | + |
| 5 | +- `Test`: a test case itself, which has the executable specifications. |
| 6 | +- `Actions`: a set of actions that the user (thus the automated test) can perform on the application. By extension, they |
| 7 | + have a business relevance. Each action may orchestrate different steps by using a `Driver`. Examples of actions may be |
| 8 | + _login_ or _add item to the shopping cart_. |
| 9 | +- `Driver`: the low level technological automation that actually knows how to perform the different actions. It has the |
| 10 | + knowledge of how to find a certain element. Examples of steps perform by a `Driver`: _find the |
| 11 | + InputBox for the username_, _write the given text_, _find the InputBox for the password_ or _click on the login |
| 12 | + button_. |
4 | 13 |
|
5 | 14 | While currently the `Tests` just use a single `Action` due to the app simplicity, this allows for using different ones |
6 | 15 | to automate different applications or decompose one into different modules (e.g. user profile actions, project tree |
7 | | -structure actions, etc.). |
8 | | - |
9 | | -To this matter, it's worth noting |
10 | | -the [Page Object pattern](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/). |
11 | | - |
12 | | -Worth checking: |
13 | | - |
14 | | -- [How to Write Acceptance Tests - |
15 | | - Modern Software Engineering |
16 | | - ](https://youtu.be/JDD5EEJgpHU?t=376&si=xwFJav4upgoNv6qE) |
| 16 | +structure actions, etc.). Also, by having the `Actions` and `Driver` separated, changes in the |
| 17 | +technological spectrum such as a Button changing its id or location or a Label its text does not cascade into the |
| 18 | +business `Actions` (unless the workflow has actually changed). |
| 19 | + |
| 20 | +I don't remember if this 3-layer architecture style for e2e tests has been already defined and name by any other person |
| 21 | +before, but it has been inspired for sure by both |
| 22 | +the [Page Object pattern](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) and |
| 23 | +Dave Farley in [How to Write Acceptance Tests - |
| 24 | +Modern Software Engineering |
| 25 | +](https://youtu.be/JDD5EEJgpHU?t=376&si=xwFJav4upgoNv6qE). |
17 | 26 |
|
18 | 27 | # Decisions |
19 | 28 |
|
|
0 commit comments