Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 40 additions & 48 deletions docs/quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,56 @@ If you do not want to use the defaults when initializing the project and want to

## Setup {#setup}

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).

<Tabs>
<TabItem value="Chrome Devtools Protocol" label="Chrome Devtools Protocol">
```javascript
module.exports = {
After executing the command mentioned above, a `testplane.config.ts` file with basic settings will be generated at the root of the project.

```typescript
export default {
// https://testplane.io/docs/v8/guides/local-browsers/
gridUrl: "local",
baseUrl: "http://localhost",
pageLoadTimeout: 0,
httpTimeout: 60000,
testTimeout: 90000,
resetCursor: false,
sets: {
desktop: {
files: 'tests/desktop'
}
files: ["testplane-tests/**/*.testplane.(t|j)s"],
browsers: ["chrome", "firefox"],
},
},

browsers: {
chrome: {
automationProtocol: 'devtools',
headless: true,
desiredCapabilities: {
browserName: 'chrome'
}
}
}

};

````
</TabItem>


<TabItem value="WebDriver protocol" label="WebDriver protocol">
```javascript
module.exports = {
gridUrl: 'http://localhost:4444/wd/hub',

sets: {
desktop: {
files: 'tests/desktop'
}
},

browsers: {
chrome: {
automationProtocol: 'webdriver', // default value
browserName: "chrome",
},
},
firefox: {
headless: true,
desiredCapabilities: {
browserName: 'chrome'
}
}
}
browserName: "firefox",
},
},
},
plugins: {
"html-reporter/testplane": {
// https://github.com/gemini-testing/html-reporter
enabled: true,
path: "testplane-report",
defaultView: "all",
diffMode: "3-up-scaled",
},
},
};
````
```

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

</Tabs>
```bash
npx testplane install-deps
```

Without running the command, absent browsers will be downloaded during first Testplane launch.

## Creating a Test {#test_creation}

Expand Down Expand Up @@ -96,9 +94,3 @@ or launch the GUI mode and run the test through the browser interface
```bash
npx testplane gui
```

If you chose the `WebDriver protocol` during the config setup, you should have `selenium-standalone` running (in a separate tab) before running the tests:

```bash
selenium-standalone start
```
90 changes: 41 additions & 49 deletions i18n/ru/docusaurus-plugin-content-docs/current/quickstart/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,58 +15,56 @@ npm init testplane@latest YOUR_PROJECT_PATH

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

После выполнения команды, указанной выше, в корне проекта сгенерится файл `.testplane.conf.js` с базовой настройкой. В зависимости от того, каким протоколом вы хотите воспользоваться, есть 2 варианта настройки (по умолчанию для браузера будет указан протокол CDP).

<Tabs>
<TabItem value="Chrome Devtools Protocol" label="Chrome Devtools Protocol">
```javascript
module.exports = {
sets: {
desktop: {
files: 'tests/desktop'
}
},

browsers: {
chrome: {
automationProtocol: 'devtools',
desiredCapabilities: {
browserName: 'chrome'
}
}
}

};

````
</TabItem>


<TabItem value="WebDriver protocol" label="WebDriver protocol">
```javascript
module.exports = {
gridUrl: 'http://localhost:4444/wd/hub',

После выполнения команды, указанной выше, в корне проекта сгенерится файл `testplane.config.ts` с базовой настройкой.

```typescript
export default {
// https://testplane.io/ru/docs/v8/guides/local-browsers/
gridUrl: "local",
baseUrl: "http://localhost",
pageLoadTimeout: 0,
httpTimeout: 60000,
testTimeout: 90000,
resetCursor: false,
sets: {
desktop: {
files: 'tests/desktop'
}
files: ["testplane-tests/**/*.testplane.(t|j)s"],
browsers: ["chrome", "firefox"],
},
},

browsers: {
chrome: {
automationProtocol: 'webdriver', // default value
headless: true,
desiredCapabilities: {
browserName: "chrome",
},
},
firefox: {
headless: true,
desiredCapabilities: {
browserName: 'chrome'
}
}
}
browserName: "firefox",
},
},
},
plugins: {
"html-reporter/testplane": {
// https://github.com/gemini-testing/html-reporter
enabled: true,
path: "testplane-report",
defaultView: "all",
diffMode: "3-up-scaled",
},
},
};
````
```

</TabItem>
Вы можете загрузить браузеры, описанные в конфиге, отдельно от запуска самого Testplane:

```bash
npx testplane install-deps
```

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

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

Expand Down Expand Up @@ -96,9 +94,3 @@ npx testplane
```bash
npx testplane gui
```

Если при настройке конфига вы выбрали `WebDriver protocol`, то перед запуском тестов у вас должен быть запущен (в отдельной вкладке) `selenium-standalone`:

```bash
selenium-standalone start
```