Skip to content

docs: introduce how to generate a random phone number #594

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 1 commit into from
Jan 12, 2025
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ docker run -p 1234:8080 -v /var/tmp:/var/tmp \

## Template

The following fields are templated with [sprig](http://masterminds.github.io/sprig/):
The following fields are templated with [sprig](https://masterminds.github.io/sprig/):

* API
* Request Body
* Request Header

### Functions

You could use all the common functions which comes from [sprig](http://masterminds.github.io/sprig/). Besides some specific functions are available:
You could use all the common functions which comes from [sprig](https://masterminds.github.io/sprig/). Besides some specific functions are available:

| Name | Usage |
|---|---|
Expand Down
13 changes: 13 additions & 0 deletions docs/site/content/zh/latest/tasks/template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
+++
title = "用例模板"
+++

`atest` 采用 [sprig](https://masterminds.github.io/sprig/) 作为测试用例的模板引擎。通过模板函数可以生成很多随机数据:

## 手机号

下面的代码可以生成 `182` 开头的手机号:

```
182{{shuffle "09876543"}}
```
Loading