Skip to content

Commit 44f6b01

Browse files
Merge pull request #55 from gemini-testing/users/kroman512/local_quickstart
docs: update quickstart to use local browsers
2 parents 9a8438a + 7b7e401 commit 44f6b01

File tree

2 files changed

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

2 files changed

+81
-97
lines changed

docs/quickstart/index.mdx

Lines changed: 40 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,58 +15,56 @@ 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+
// https://testplane.io/docs/v8/guides/local-browsers/
23+
gridUrl: "local",
24+
baseUrl: "http://localhost",
25+
pageLoadTimeout: 0,
26+
httpTimeout: 60000,
27+
testTimeout: 90000,
28+
resetCursor: false,
2429
sets: {
2530
desktop: {
26-
files: 'tests/desktop'
27-
}
31+
files: ["testplane-tests/**/*.testplane.(t|j)s"],
32+
browsers: ["chrome", "firefox"],
33+
},
2834
},
29-
3035
browsers: {
3136
chrome: {
32-
automationProtocol: 'devtools',
37+
headless: true,
3338
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
39+
browserName: "chrome",
40+
},
41+
},
42+
firefox: {
43+
headless: true,
5944
desiredCapabilities: {
60-
browserName: 'chrome'
61-
}
62-
}
63-
}
45+
browserName: "firefox",
46+
},
47+
},
48+
},
49+
plugins: {
50+
"html-reporter/testplane": {
51+
// https://github.com/gemini-testing/html-reporter
52+
enabled: true,
53+
path: "testplane-report",
54+
defaultView: "all",
55+
diffMode: "3-up-scaled",
56+
},
57+
},
6458
};
65-
````
59+
```
6660

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

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

7169
## Creating a Test {#test_creation}
7270

@@ -96,9 +94,3 @@ or launch the GUI mode and run the test through the browser interface
9694
```bash
9795
npx testplane gui
9896
```
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: 41 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -15,58 +15,56 @@ 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+
// https://testplane.io/ru/docs/v8/guides/local-browsers/
23+
gridUrl: "local",
24+
baseUrl: "http://localhost",
25+
pageLoadTimeout: 0,
26+
httpTimeout: 60000,
27+
testTimeout: 90000,
28+
resetCursor: false,
5029
sets: {
5130
desktop: {
52-
files: 'tests/desktop'
53-
}
31+
files: ["testplane-tests/**/*.testplane.(t|j)s"],
32+
browsers: ["chrome", "firefox"],
33+
},
5434
},
55-
5635
browsers: {
5736
chrome: {
58-
automationProtocol: 'webdriver', // default value
37+
headless: true,
38+
desiredCapabilities: {
39+
browserName: "chrome",
40+
},
41+
},
42+
firefox: {
43+
headless: true,
5944
desiredCapabilities: {
60-
browserName: 'chrome'
61-
}
62-
}
63-
}
45+
browserName: "firefox",
46+
},
47+
},
48+
},
49+
plugins: {
50+
"html-reporter/testplane": {
51+
// https://github.com/gemini-testing/html-reporter
52+
enabled: true,
53+
path: "testplane-report",
54+
defaultView: "all",
55+
diffMode: "3-up-scaled",
56+
},
57+
},
6458
};
65-
````
59+
```
6660

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

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

7169
## Создание теста {#test_creation}
7270

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

0 commit comments

Comments
 (0)