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
Для Testplane реализовали расширение для <ahref="https://code.visualstudio.com/">VS Code</a>, с помощью которого можно настраивать Testplane с нуля, запускать тесты и удобно работать с <ahref="/ru/docs/v8/command-line#testplane-repl">REPL режимом</a>.
12
+
Для Testplane реализовали расширение для <ahref="https://code.visualstudio.com/">VS Code</a>, с помощью которого можно настраивать Testplane с нуля, запускать тесты и удобно работать с <ahref="/ru/docs/v8/reference/cli#testplane-repl">REPL режимом</a>.
13
13
14
14
<!--truncate-->
15
15
@@ -80,7 +80,7 @@ Install Testplane
80
80
81
81
#### С настройкой `REPL`
82
82
83
-
При клике в чекбокс `Enable REPL` и последующем запуске теста (в REPL режиме можно одновременно запустить только один тест) он будет запущен в специальном REPL режиме. Подробнее про этот режим можно прочитать <ahref="/ru/docs/v8/command-line#testplane-repl">здесь</a>.
83
+
При клике в чекбокс `Enable REPL` и последующем запуске теста (в REPL режиме можно одновременно запустить только один тест) он будет запущен в специальном REPL режиме. Подробнее про этот режим можно прочитать <ahref="/ru/docs/v8/reference/cli#testplane-repl">здесь</a>.
Copy file name to clipboardExpand all lines: docs/basic-guides/component-testing.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,9 +184,9 @@ Instances of the `browser` and `expect` are available inside of the browser's gl
184
184
185
185
Calling the `log`, `info`, `warn`, `error`, `debug` and `table` commands on the `console` object in the browser causes information to be displayed not only in the browser's DevTools, but also in the terminal from which Testplane was launched. I.e., you can call `console.log` in the test/component and you will be able to see the result of it execution in the terminal. This is especially handy when debugging the test.
To add a custom command to the `browser` object, use the `addCommand` method. Here's how you can define a command that retrieves both the URL and title of the current page:
Copy file name to clipboardExpand all lines: docs/basic-guides/emulation.mdx
+38-7Lines changed: 38 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,45 @@
1
1
importAdmonitionfrom"@theme/Admonition";
2
2
3
-
# How to Manage Network Bandwidth
3
+
# Emulation
4
4
5
-
## Overview {#overview}
5
+
## CPU Performance
6
6
7
7
<Admonitiontype="warning">
8
-
This recipe only works when using _Chrome DevTools Protocol (CDP)_.
9
8
10
-
Read details in the section “[How to use CDP in Testplane][how-to-use-cdp]”.
9
+
This feature only works with browsers supporting _Chrome DevTools Protocol (CDP)_.
10
+
11
+
</Admonition>
12
+
13
+
The CPU speed on mobile devices is significantly slower than on computers. Therefore, to emulate CPU speed in _puppeteer_, there is a method called [emulateCPUThrottling][emulate-cpu-throttling].
14
+
15
+
### Example: Slowing Down CPU Speed by 8x {#example}
16
+
17
+
Let's use this method to slow down CPU speed by 8 times:
18
+
19
+
```javascript
20
+
it("should open yandex.ru with emulation 8x slower CPU", asyncfunction ({ browser }) {
21
+
// Get puppeteer instance
22
+
constpuppeteer=awaitbrowser.getPuppeteer();
23
+
24
+
// Get the first open page (considering it to be currently active)
Copy file name to clipboardExpand all lines: docs/basic-guides/managing-browsers.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
importAdmonitionfrom"@theme/Admonition";
2
2
3
-
# How to Run Testplane in a Local Browser
3
+
# Managing Browsers
4
4
5
5
## Introduction
6
6
7
-
Testplane can automatically download browsers in accordance with your [Testplane Config](/docs/v8/config/main).
7
+
Testplane can automatically download browsers in accordance with your [Testplane Config](/docs/v8/reference/config/main).
8
8
9
9
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.
10
10
@@ -16,11 +16,11 @@ In a project with Testplane, you can execute the command `npx testplane install-
16
16
17
17
You can also download only the necessary browsers described in the config. For example, if the browser `chrome-dark` is described, you can download only this one with the command `npm testplane install-deps chrome-dark'.
18
18
19
-
You can read more about this command on the respective page: [install-deps](/docs/v8/command-line#install-deps)
19
+
You can read more about this command on the respective page: [install-deps](/docs/v8/reference/cli#install-deps)
20
20
21
21
## Running tests
22
22
23
-
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:
23
+
You can run tests on local browsers using the [CLI option](/docs/v8/reference/cli)`--local`, or with [gridUrl](/docs/v8/reference/config/browsers/#grid_url): "local" in the [Testplane config](/docs/v8/reference/config/main). For example:
0 commit comments