You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4a33a9
Browse filesBrowse the repository at this point in the historyBrowse files
In this guide, we will use endform to speed up your test suite.
11
13
@@ -16,3 +18,66 @@ For more information about getting started with the tutorial repository, go [her
16
18
17
19
At this point in time, we have a pretty decent Playwriht end to end testing suite that can test most of the dummy features in this application.
18
20
We can test complex multi user flows like inviting, and we have the ability to create new users on demand when the user data conflicts with other tests.
21
+
22
+
Since this a very simple application, our tests are thankfully very fast to run. Let's explore their performance.
23
+
24
+
## Running the tests
25
+
26
+
We are familiar with running the tests with Playwright:
27
+
28
+
```bash
29
+
pnpm playwright test
30
+
```
31
+
32
+
Let's try running the tests with Endform also to get a benchmark:
33
+
34
+
```bash
35
+
pnpm endform test
36
+
```
37
+
38
+
On my machine (M2 Macbook Pro), the tests ran in 20 seconds with Playwright, and 25 seconds with Endform.
39
+
40
+
With these very fast, very small, and few tests - uploading and running the tests on Endform's remote runners aren't giving us much of a speedup.
41
+
42
+
## Cranking up the heat
43
+
44
+
Let's see what happens when we run more tests.
45
+
46
+
```bash
47
+
pnpm playwright test --repeat-each 2
48
+
```
49
+
50
+
```bash
51
+
pnpm endform test --repeat-each 2
52
+
```
53
+
54
+
Here, Playwright took 30 seconds, and Endform took 25 seconds.
55
+
56
+
```bash
57
+
pnpm playwright test --repeat-each 5
58
+
```
59
+
60
+
```bash
61
+
pnpm endform test --repeat-each 5
62
+
```
63
+
64
+
Here, Playwright took 30 seconds, and Endform took 25 seconds.
65
+
66
+
If we plot the results of different repeat counts, we get:
67
+
68
+
<Imagesrc={TestTimeChart}alt="A chart of the test time for different repeat counts"width={600} />
69
+
70
+
Once we start to add more tests (or if the tests had taken longer to run), Playwright will keep slowing your suite down,
71
+
while Endform will keep the speed constant.
72
+
73
+
### Other influential factors
74
+
75
+
This is one case of the speed of this particular suite, but lots of things have an impact on the speed of a suite.
76
+
Like:
77
+
78
+
- How reliable or flaky the tests are
79
+
- How long the tests take to run
80
+
- How slow the slowest test is
81
+
- How performant the app the tests are run against is
82
+
83
+
We think that we have the fastest Playwright test runner on the market, but we're really curious to hear what your experience in running Endform versus Playwright in your test suite is like.
0 commit comments