-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add info about time travel #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,63 @@ | ||
| import Admonition from "@theme/Admonition"; | ||
|
|
||
| # Time Travel (Preview) | ||
|
|
||
|  | ||
|
|
||
| ## Overview | ||
|
|
||
| The Time Travel mode is a new Testplane UI tool that allows you to observe test execution in real-time, as well as record and replay the test's progress. | ||
|
|
||
| - Time Travel records snapshots of the DOM tree—not screenshots or videos, but the actual DOM structure | ||
| - The average snapshot size is about 200KB thanks to compression and an incremental recording algorithm | ||
| - The entire functionality is available both within the GUI and in a static report generated from any CI | ||
|
|
||
| ## Getting Started | ||
|
|
||
| <Admonition type="warning"> | ||
| Please note that the Time Travel feature is currently in Preview. For production use, we | ||
| recommend waiting for the stable version. | ||
| </Admonition> | ||
|
|
||
| 1. Install the alpha versions of `testplane` and `html-reporter`: | ||
|
|
||
| ```shell | ||
| npm i -D [email protected] [email protected] | ||
| ``` | ||
|
|
||
| 2. Enable snapshot recording in the Testplane config: | ||
|
|
||
| ```typescript | ||
| export = { | ||
| /* ... */ | ||
| record: "on", | ||
| }; | ||
| ``` | ||
|
|
||
| 3. Run the tests and activate Time Travel in the UI settings: | ||
|
|
||
|  | ||
|
|
||
| ## Using Time Travel | ||
|
|
||
| After activating Time Travel in all supported browsers, a player window will appear before the test starts. During test execution, the browser's activity will be streamed into this player. | ||
|
|
||
|  | ||
|
|
||
| After the test run is complete, you can replay the recorded snapshots and navigate through time. Hovering over a specific step will show the browser's state at that exact moment. | ||
|
|
||
|  | ||
|
|
||
| To debug the layout, you can use the browser's DevTools. All selectors and attributes are preserved without changes. | ||
|
|
||
|  | ||
|
|
||
| ## Configuring Time Travel | ||
|
|
||
| Currently, snapshot recording is controlled via the `record` option in the Testplane config. It supports two values: `"on"` (snapshots will be recorded for every test run) and `"off"` (snapshots are completely disabled). | ||
|
|
||
| <Admonition type="info"> | ||
| In the near future, smarter recording modes will be available, such as "only on failure" or | ||
| "enabled during retries." Additionally, network request debugging and full-screen mode will soon | ||
| be available. | ||
| </Admonition> | ||
63 changes: 63 additions & 0 deletions
63
i18n/ru/docusaurus-plugin-content-docs/current/guides/time-travel.mdx
This file contains hidden or 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,63 @@ | ||
| import Admonition from "@theme/Admonition"; | ||
|
|
||
| # Time Travel (Preview) | ||
|
|
||
|  | ||
|
|
||
| ## Обзор | ||
|
|
||
| Режим Time Travel — это новый инструмент Testplane UI, который позволяет наблюдать за ходом выполнения тестов в реальном времени, а также записывать и воспроизводить ход прохождения теста. | ||
|
|
||
| - Time Travel записывает снимки DOM-дерева, то есть не скриншоты или видео, а настоящую DOM-разметку | ||
| - Вес одного снапшота в среднем составляет около 200КБ благодаря сжатию и инкрементальному алгоритму записи | ||
| - Весь функционал доступен как в рамках GUI, так и в статическом отчете, полученном из любого CI | ||
|
|
||
| ## Начало работы | ||
|
|
||
| <Admonition type="warning"> | ||
| Обратите внимание, что функционал Time Travel в данный момент находится в стадии Preview. Для | ||
| использования в production рекомендуем дождаться stable версии. | ||
| </Admonition> | ||
|
|
||
| 1. Необходимо установить alpha-версии `testplane` и `html-reporter`: | ||
|
|
||
| ```shell | ||
| npm i -D [email protected] [email protected] | ||
| ``` | ||
|
|
||
| 2. Включить запись снапшотов в конфиге testplane: | ||
|
|
||
| ```typescript | ||
| export = { | ||
| /* ... */ | ||
| record: "on", | ||
| }; | ||
| ``` | ||
|
|
||
| 3. Выполнить прогон тестов и активировать Time Travel в настройках UI: | ||
|
|
||
|  | ||
|
|
||
| ## Использование Time Travel | ||
|
|
||
| После активации Time Travel во всех поддерживаемых браузерах перед запуском будет отображаться окно плеера. Во время прогона теста в него будет стримиться происходящее в браузере. | ||
|
|
||
|  | ||
|
|
||
| По завершении прогона теста можно воспроизвести снятые снапшоты и перемещаться во времени. При наведении на конкретный шаг плеер покажет состояние браузера на момент его выполнения. | ||
|
|
||
|  | ||
|
|
||
| Для отладки верстки вы можете воспользоваться DevTools браузера. Все селекторы и атрибуты сохранены без изменений. | ||
|
|
||
|  | ||
|
|
||
| ## Настройка Time Travel | ||
|
|
||
| В данный момент всё управление записью снапшотов происходит с помощью опции `record` в конфиге Testplane. Поддержано 2 значения: `"on"` (снапшоты будут записываться на каждый запуск теста) и `"off"` (снапшоты полностью отключены). | ||
|
|
||
| <Admonition type="info"> | ||
| В самом ближайшем будущем появятся более умные режимы записи снапшотов, такие, как "только при | ||
| падении" или "включить при ретраях". Помимо этого скоро станет доступна отладка сетевых запросов | ||
| и полноэкранный режим. | ||
| </Admonition> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.