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
Copy file name to clipboardExpand all lines: docs/quickstart/index.mdx
+75-15Lines changed: 75 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@
2
2
sidebar_position: 1
3
3
---
4
4
5
-
importTabsfrom"@theme/Tabs";
6
-
importTabItemfrom"@theme/TabItem";
7
-
importAdmonitionfrom"@theme/Admonition";
8
-
9
5
# Installation and Setup
10
6
11
7
## System requirements
@@ -20,7 +16,7 @@ To run the Testplane installer using `npm`, execute the following command:
20
16
npm init testplane@latest YOUR_PROJECT_PATH
21
17
```
22
18
23
-
To configure the project instead of using defaults during initialization, specify the `-v` option.
19
+
To configure the project in interactive mode with additional parameters (package manager selection, plugin installation), specify the <nobr>`-v`</nobr> option.
24
20
25
21
After running the installation command, the following set of files and folders will appear in the project directory:
26
22
@@ -38,25 +34,23 @@ testplane.config.ts
38
34
39
35
The `testplane.config.ts` file contains a basic set of settings for running tests:
// The `sets` parameter contains information about the directory where the tests are located
51
-
// and a list of browsers in which they will be run:
52
48
sets: {
53
49
desktop: {
54
50
files: ["testplane-tests/**/*.testplane.(t|j)s"],
55
51
browsers: ["chrome", "firefox"],
56
52
},
57
53
},
58
-
59
-
// The `browsers` field describes the configuration of the browsers used:
60
54
browsers: {
61
55
chrome: {
62
56
headless: true,
@@ -71,7 +65,9 @@ export default {
71
65
},
72
66
},
73
67
},
74
-
68
+
prepareBrowser: (browser:WdioBrowser) => {
69
+
setupBrowser(browser);
70
+
},
75
71
plugins: {
76
72
"html-reporter/testplane": {
77
73
enabled: true,
@@ -80,13 +76,77 @@ export default {
80
76
diffMode: "3-up-scaled",
81
77
},
82
78
},
83
-
};
79
+
}satisfiesimport("testplane").ConfigInput;
84
80
```
85
81
82
+
### Key configuration parameters
83
+
84
+
-`gridUrl` — where to run browsers: `"local"` for local execution or a URL for Selenium Grid or cloud (e.g., BrowserStack, Sauce Labs).
85
+
-`sets` — test groups for different browsers (e.g., a test set for desktop Chrome or Firefox and a set for mobile Safari). Learn more: [Sets reference](../reference/config/sets.mdx).
86
+
-`testTimeout` — maximum test execution time in milliseconds; the test is aborted after exceeding this limit.
87
+
-`pageLoadTimeout` — maximum page load wait time.
88
+
-`browsers` — browser configuration; `headless: true` — run without UI. Learn more: [Browsers](../basic-guides/browsers-overview.mdx).
89
+
-`prepareBrowser` — hook before tests; in the config above it calls `setupBrowser(browser)` and adds Testing Library methods.
90
+
-`plugins` — plugins; in the config above `html-reporter` for interactive reports (screenshots, logs, debugging). Learn more: [HTML Reporter](../html-reporter/overview.mdx).
91
+
92
+
For a complete list of configuration parameters, see the [configuration reference](../reference/config/main.mdx).
93
+
86
94
To download the browsers described in the config separately from running Testplane itself, execute the command:
87
95
88
96
```bash
89
97
npx testplane install-deps
90
98
```
91
99
92
100
Without running this command beforehand, missing browsers will be automatically downloaded the first time Testplane is launched.
101
+
102
+
## First run {#first-run}
103
+
104
+
After installation and setup, run the test example that was created automatically:
105
+
106
+
```bash
107
+
npx testplane
108
+
```
109
+
110
+
### What happens during the first run
111
+
112
+
Testplane will automatically perform the following actions:
113
+
114
+
1. Download browsers: if you haven't run `install-deps`, Testplane will download Chrome and Firefox
115
+
2. Run the test: execute the example from `testplane-tests/example.testplane.ts`
116
+
3. Generate a report: create an HTML report in the `testplane-report/` folder
117
+
118
+
### Viewing results
119
+
120
+
After the tests finish, open the interactive report:
121
+
122
+
```bash
123
+
npx testplane gui
124
+
```
125
+
126
+
The command will start a local server and open the report in your browser. In the interface you will see:
127
+
128
+
- List of passed tests
129
+
- Execution statistics
130
+
- Screenshots (if the test uses `assertView`)
131
+
- Execution logs
132
+
133
+
### Expected outcome
134
+
135
+
If everything is configured correctly, you will see:
136
+
137
+
```
138
+
✔ test examples › docs search test [chrome] - 3.2s
139
+
✔ test examples › docs search test [firefox] - 3.5s
0 commit comments