Skip to content

Commit 6d9089a

Browse files
docs: update quickstart to use local browsers
1 parent 9a8438a commit 6d9089a

File tree

2 files changed

+79
-97
lines changed
  • docs/quickstart
  • i18n/ru/docusaurus-plugin-content-docs/current/quickstart

2 files changed

+79
-97
lines changed

docs/quickstart/index.mdx

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,58 +15,55 @@ If you do not want to use the defaults when initializing the project and want to
1515

1616
## Setup {#setup}
1717

18-
After executing the command mentioned above, a `.testplane.conf.js` file with basic settings will be generated at the root of the project. Depending on which protocol you want to use, there are 2 configuration options (by default, the CDP protocol will be specified for the browser).
19-
20-
<Tabs>
21-
<TabItem value="Chrome Devtools Protocol" label="Chrome Devtools Protocol">
22-
```javascript
23-
module.exports = {
18+
After executing the command mentioned above, a `testplane.config.ts` file with basic settings will be generated at the root of the project.
19+
20+
```typescript
21+
export default {
22+
gridUrl: "local", // https://testplane.io/docs/v8/guides/local-browsers/
23+
baseUrl: "http://localhost",
24+
pageLoadTimeout: 0,
25+
httpTimeout: 60000,
26+
testTimeout: 90000,
27+
resetCursor: false,
2428
sets: {
2529
desktop: {
26-
files: 'tests/desktop'
27-
}
30+
files: ["testplane-tests/**/*.testplane.(t|j)s"],
31+
browsers: ["chrome", "firefox"],
32+
},
2833
},
29-
3034
browsers: {
3135
chrome: {
32-
automationProtocol: 'devtools',
36+
headless: true,
3337
desiredCapabilities: {
34-
browserName: 'chrome'
35-
}
36-
}
37-
}
38-
39-
};
40-
41-
````
42-
</TabItem>
43-
44-
45-
<TabItem value="WebDriver protocol" label="WebDriver protocol">
46-
```javascript
47-
module.exports = {
48-
gridUrl: 'http://localhost:4444/wd/hub',
49-
50-
sets: {
51-
desktop: {
52-
files: 'tests/desktop'
53-
}
54-
},
55-
56-
browsers: {
57-
chrome: {
58-
automationProtocol: 'webdriver', // default value
38+
browserName: "chrome",
39+
},
40+
},
41+
firefox: {
42+
headless: true,
5943
desiredCapabilities: {
60-
browserName: 'chrome'
61-
}
62-
}
63-
}
44+
browserName: "firefox",
45+
},
46+
},
47+
},
48+
plugins: {
49+
"html-reporter/testplane": {
50+
// https://github.com/gemini-testing/html-reporter
51+
enabled: true,
52+
path: "testplane-report",
53+
defaultView: "all",
54+
diffMode: "3-up-scaled",
55+
},
56+
},
6457
};
65-
````
58+
```
6659

67-
</TabItem>
60+
You can download these browsers, described in the config, separately from running Testplane itself:
6861

69-
</Tabs>
62+
```bash
63+
npx testplane install-deps
64+
```
65+
66+
Without running the command, absent browsers will be downloaded during first Testplane launch.
7067

7168
## Creating a Test {#test_creation}
7269

@@ -96,9 +93,3 @@ or launch the GUI mode and run the test through the browser interface
9693
```bash
9794
npx testplane gui
9895
```
99-
100-
If you chose the `WebDriver protocol` during the config setup, you should have `selenium-standalone` running (in a separate tab) before running the tests:
101-
102-
```bash
103-
selenium-standalone start
104-
```

i18n/ru/docusaurus-plugin-content-docs/current/quickstart/index.mdx

Lines changed: 40 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -15,58 +15,55 @@ npm init testplane@latest YOUR_PROJECT_PATH
1515

1616
## Настройка {#setup}
1717

18-
После выполнения команды, указанной выше, в корне проекта сгенерится файл `.testplane.conf.js` с базовой настройкой. В зависимости от того, каким протоколом вы хотите воспользоваться, есть 2 варианта настройки (по умолчанию для браузера будет указан протокол CDP).
19-
20-
<Tabs>
21-
<TabItem value="Chrome Devtools Protocol" label="Chrome Devtools Protocol">
22-
```javascript
23-
module.exports = {
24-
sets: {
25-
desktop: {
26-
files: 'tests/desktop'
27-
}
28-
},
29-
30-
browsers: {
31-
chrome: {
32-
automationProtocol: 'devtools',
33-
desiredCapabilities: {
34-
browserName: 'chrome'
35-
}
36-
}
37-
}
38-
39-
};
40-
41-
````
42-
</TabItem>
43-
44-
45-
<TabItem value="WebDriver protocol" label="WebDriver protocol">
46-
```javascript
47-
module.exports = {
48-
gridUrl: 'http://localhost:4444/wd/hub',
49-
18+
После выполнения команды, указанной выше, в корне проекта сгенерится файл `testplane.config.ts` с базовой настройкой.
19+
20+
```typescript
21+
export default {
22+
gridUrl: "local", // https://testplane.io/ru/docs/v8/guides/local-browsers/
23+
baseUrl: "http://localhost",
24+
pageLoadTimeout: 0,
25+
httpTimeout: 60000,
26+
testTimeout: 90000,
27+
resetCursor: false,
5028
sets: {
5129
desktop: {
52-
files: 'tests/desktop'
53-
}
30+
files: ["testplane-tests/**/*.testplane.(t|j)s"],
31+
browsers: ["chrome", "firefox"],
32+
},
5433
},
55-
5634
browsers: {
5735
chrome: {
58-
automationProtocol: 'webdriver', // default value
36+
headless: true,
37+
desiredCapabilities: {
38+
browserName: "chrome",
39+
},
40+
},
41+
firefox: {
42+
headless: true,
5943
desiredCapabilities: {
60-
browserName: 'chrome'
61-
}
62-
}
63-
}
44+
browserName: "firefox",
45+
},
46+
},
47+
},
48+
plugins: {
49+
"html-reporter/testplane": {
50+
// https://github.com/gemini-testing/html-reporter
51+
enabled: true,
52+
path: "testplane-report",
53+
defaultView: "all",
54+
diffMode: "3-up-scaled",
55+
},
56+
},
6457
};
65-
````
58+
```
6659

67-
</TabItem>
60+
Вы можете загрузить браузеры, описанные в конфиге, отдельно от запуска самого Testplane:
61+
62+
```bash
63+
npx testplane install-deps
64+
```
6865

69-
</Tabs>
66+
Без предварительного запуска команды, недостающие браузеры будут автоматически загружены с первым запуском Testplane.
7067

7168
## Создание теста {#test_creation}
7269

@@ -96,9 +93,3 @@ npx testplane
9693
```bash
9794
npx testplane gui
9895
```
99-
100-
Если при настройке конфига вы выбрали `WebDriver protocol`, то перед запуском тестов у вас должен быть запущен (в отдельной вкладке) `selenium-standalone`:
101-
102-
```bash
103-
selenium-standalone start
104-
```

0 commit comments

Comments
 (0)