如何在 OpenTest 中开始新的测试会话?
How do I start a new test session in OpenTest?
我已经安装了 OpenTest 并想开始一个新会话。
我该怎么做?
我试着在 Google 上搜索这个,但只找到了一个 PR 谈论使用 API。
以 https://getopentest.org/docs/environments.html 为指导,阅读第 1 步,我相信单击图中所示的加号可以启动新会话。
可以通过三种方式开始测试会话:
- 从基于网络的用户界面。转到
Session
/ Create Test Session...
菜单选项,然后 select 您想要 运行 的测试,根据需要填写其他测试会话属性,然后单击 Create Session
按钮。
- 使用测试会话模板。这可以从 UI 或通过网络 API 完成:
- 来自UI:使用
Session
/ Create Session From Template...
- 使用API:填写JSON payload的
template
属性。模式详情 here.
- 使用网络 API 并传递测试会话的属性,如 here.
所述
示例 API 调用:
POST http://localhost:3000/api/session
{
"environment": "prod",
"sessionLabel": "Run smoke tests",
"tests": [
{
"path": ".",
"name": "Smoke test 1"
},
{
"path": ".",
"name": "Web test 2"
}
]
}
我已经安装了 OpenTest 并想开始一个新会话。
我该怎么做?
我试着在 Google 上搜索这个,但只找到了一个 PR 谈论使用 API。
以 https://getopentest.org/docs/environments.html 为指导,阅读第 1 步,我相信单击图中所示的加号可以启动新会话。
可以通过三种方式开始测试会话:
- 从基于网络的用户界面。转到
Session
/Create Test Session...
菜单选项,然后 select 您想要 运行 的测试,根据需要填写其他测试会话属性,然后单击Create Session
按钮。 - 使用测试会话模板。这可以从 UI 或通过网络 API 完成:
- 来自UI:使用
Session
/Create Session From Template...
- 使用API:填写JSON payload的
template
属性。模式详情 here.
- 来自UI:使用
- 使用网络 API 并传递测试会话的属性,如 here. 所述
示例 API 调用:
POST http://localhost:3000/api/session
{
"environment": "prod",
"sessionLabel": "Run smoke tests",
"tests": [
{
"path": ".",
"name": "Smoke test 1"
},
{
"path": ".",
"name": "Web test 2"
}
]
}