Skip to content

Commit 0cee70d

Browse files
committed
docs(e2e): clarify and explain the architecture
1 parent 6453351 commit 0cee70d

2 files changed

Lines changed: 22 additions & 13 deletions

File tree

Desktop.Tests/e2e/README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
The e2e tests follow this architecture:
22

3-
![Architecture of e2e tests. It shows how a Test uses Action, which in turn uses from 1 up to several Drivers](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/Xiphereal/SGjsdfgklj/refs/heads/trunk/Desktop.Tests/e2e/e2eArchitecture.puml)
3+
![Architecture of e2e tests. It shows how a Test uses Actions, which in turn uses from 1 up to several Drivers](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/Xiphereal/SGjsdfgklj/refs/heads/trunk/Desktop.Tests/e2e/e2eArchitecture.puml)
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_.
413

514
While currently the `Tests` just use a single `Action` due to the app simplicity, this allows for using different ones
615
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).
1726

1827
# Decisions
1928

Desktop.Tests/e2e/e2eArchitecture.puml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'https://plantuml.com/class-diagram
33
skin rose
44

5-
Test -> "1" Action
6-
Action -> "1..*" Driver
5+
Test -> "1" Actions
6+
Actions -> "1..*" Driver
77

88
@enduml

0 commit comments

Comments
 (0)