Skip to content

Commit

Permalink
scenario random functions: docs
Browse files Browse the repository at this point in the history
faa522443f7de5b5b321cd18a4610fdc9a205aac
  • Loading branch information
oke11o committed Apr 23, 2024
1 parent 86931b5 commit b397f9b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/eng/scenario-grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Calls](#calls)
- [Templater](#templater)
- [Variable names in templates](#variable-names-in-templates)
- [Functions in templates](#functions-in-templates)
- [Preprocessors](#preprocessors)
- [prepare](#prepare)
- [Postprocessors](#postprocessors)
Expand Down Expand Up @@ -208,6 +209,18 @@ Variable `item` from the `list_req` call preprocessor - `{% raw %}{{{.request.li
Variable `token` from the `list_req` call is `{% raw %}{{{.request.list_req.postprocessor.token}}{% endraw %}`

##### Functions in Templates

Since the standard Go templating engine is used, it is possible to use built-in functions available at https://pkg.go.dev/text/template#hdr-Functions.

Additionally, some functions include:

- randInt
- randString
- uuid

For more details about randomization functions, see [more](scenario/functions.md).

#### Preprocessors

Preprocessor - actions are performed before templating
Expand Down
1 change: 1 addition & 0 deletions docs/eng/scenario-http-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Requests](#requests)
- [Templater](#templater)
- [Variable names in templates](#variable-names-in-templates)
- [Functions in templates](#functions-in-templates)
- [Preprocessors](#preprocessors)
- [Postprocessors](#postprocessors)
- [var/jsonpath](#varjsonpath)
Expand Down
14 changes: 14 additions & 0 deletions docs/rus/scenario-grpc-generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- [Вызовы](#вызовы)
- [Шаблонизатор](#шаблонизатор)
- [Имена переменных в шаблонрах](#имена-переменных-в-шаблонах)
- [Функции в шаблонах](#функции-в-шаблонах)
- [Preprocessors](#preprocessors)
- [prepare](#prepare)
- [Postprocessors](#postprocessors)
Expand Down Expand Up @@ -208,6 +209,19 @@ scenarios:
Переменная `token` из вызова `list_req` - `{% raw %}{{.request.list_req.postprocessor.token}}{% endraw %}`

##### Функции в шаблонах

Так как используется стандартные шаблонизатор Го в нем можно использовать встроенные функции
https://pkg.go.dev/text/template#hdr-Functions

А так же некоторые функции

- randInt
- randString
- uuid

Подробнее про функции рандомизации см в [документации](scenario/functions.md)

#### Preprocessors

Препроцессор - действия выполняются перед шаблонизацией
Expand Down

0 comments on commit b397f9b

Please sign in to comment.