-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d655633
commit 67d648c
Showing
12 changed files
with
681 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Запуск на локальных браузерах | ||
slug: local-browsers-intro | ||
hide_table_of_contents: false | ||
date: 2024-12-19T14:00 | ||
--- | ||
|
||
import Admonition from "@theme/Admonition"; | ||
|
||
В Testplane добавлена возможность автоматической загрузки браузеров и драйверов для последующего локального запуска. | ||
|
||
<!-- truncate --> | ||
|
||
Раньше Testplane с протоколом автоматизации webdriver можно было запустить локально только со вручную запущенным [selenium-standalone](https://github.com/webdriverio/selenium-standalone). Теперь достаточно указать указать `gridUrl: "local"` в [Конфиге Testplane](/docs/v8/command-line) или запустить тесты с [CLI-опцией](/docs/v8/command-line) `--local`. В таком случае перед запуском тестов, при необходимости, будут загружены соответствующие браузеры и вебдрайверы к ним, которые также будут запущены для дальнейшего использования в этих тестах. | ||
|
||
Загрузить браузеры и вебдрайверы к ним можно и отдельно, с помощью команды [install-deps](/docs/v8/command-line#install-deps). | ||
|
||
### Как использовать? | ||
|
||
Узнайте больше об этом в нашей документации [Как запустить Testplane в локальном браузере](/docs/v8/guides/local-browsers). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import Admonition from "@theme/Admonition"; | ||
|
||
# How to Run Testplane in a Local Browser | ||
|
||
## Introduction | ||
|
||
Testplane allows for the automatic downloading of browsers and web drivers as specified in the [Testplane Config](/docs/v8/config/main). | ||
|
||
Additionally, if Testplane is used on a supported version of Ubuntu, the necessary deb packages for running browsers will also be downloaded in a similar manner. | ||
|
||
## Installing Dependencies | ||
|
||
In a project with Testplane, you can execute the command `npx testplane install-deps`. This command will download the necessary browsers (`chrome` and `firefox`) and their web drivers (`chrome`, `firefox`, and `edge`). | ||
|
||
You can read more about this command on the respective page: [install-deps](/docs/v8/command-line#install-deps) | ||
|
||
## Running Tests | ||
|
||
You can run tests on local browsers using the [CLI option](/docs/v8/command-line) `--local`, or with [gridUrl](/docs/v8/config/browsers/#grid_url): "local" in the [Testplane config](/docs/v8/config/main). For example: | ||
|
||
```bash | ||
npx testplane --local | ||
``` | ||
|
||
This way, the corresponding web driver processes for supported browsers will be automatically started, and Testplane will use these locally launched drivers with locally downloaded browsers. | ||
|
||
If necessary, browsers will be downloaded before the test run, so running the `install-deps` command separately is not mandatory, especially if you want to quickly run a test in just one browser. | ||
|
||
## Debugging Tests | ||
|
||
When `debug` is enabled in the config, web driver logs with a prefix will be output to stdout/stderr: | ||
|
||
```javascript | ||
// other Testplane settings | ||
system: { | ||
debug: true, | ||
} | ||
``` | ||
|
||
To reduce excessive `webdriverio` logs, you can set the desired level for the `WDIO_LOG_LEVEL` environment variable. | ||
|
||
For example, here's how a launch would look with debugging enabled via an environment variable, `webdriverio` logging level set to `error` in a local browser with browserId `chrome` in the config: | ||
|
||
```bash | ||
testplane_system_debug=true WDIO_LOG_LEVEL=error npx testplane --local -b chrome | ||
``` | ||
|
||
And the web driver logs will look something like this: | ||
|
||
```plaintext | ||
$ testplane_system_debug=true WDIO_LOG_LEVEL=error npx testplane --local -b chrome | ||
[chromedriver@130] Starting ChromeDriver 130.0.6723.116 (6ac35f94ae3d01152cf1946c896b0678e48f8ec4-refs/branch-heads/6723@{#1764}) on port 43415 | ||
[chromedriver@130] Only local connections are allowed. | ||
[chromedriver@130] Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. | ||
[chromedriver@130] ChromeDriver was started successfully on port 43415. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
title: Running on Local Browsers | ||
slug: local-browsers-intro | ||
hide_table_of_contents: false | ||
date: 2024-12-19T14:00 | ||
--- | ||
|
||
import Admonition from "@theme/Admonition"; | ||
|
||
Testplane now has the ability for automatic downloading of browsers and drivers for subsequent local browser test launches. | ||
|
||
<!-- truncate --> | ||
|
||
Previously, Testplane with the webdriver automation protocol could only be launched locally with a manually started [selenium-standalone](https://github.com/webdriverio/selenium-standalone). Now, it is enough to specify `gridUrl: "local"` in the [Testplane Config](/docs/v8/config/main) or run tests with the [CLI option](/docs/v8/command-line) `--local`. In this case, if necessary, the corresponding browsers and web drivers will be downloaded before running the tests, and they will also be launched for further use in these tests. | ||
|
||
You can also download the browsers and their web drivers separately using the [install-deps](/docs/v8/command-line#install-deps) command. | ||
|
||
### How to use? | ||
|
||
Learn more about this in our documentation [How to Run Testplane in a Local Browser](/docs/v8/guides/local-browsers). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.