【问题标题】:How do I start a new test session in OpenTest?如何在 OpenTest 中开始新的测试会话?
【发布时间】:2023-03-30 21:00:01
【问题描述】:

我已安装 OpenTest 并想开始一个新会话。

我该怎么做?

我尝试在 Google 上搜索此内容,但只找到了一个谈论使用 API 的 PR。

【问题讨论】:

    标签: java node.js automated-tests opentest


    【解决方案1】:

    有三种方法可以开始测试会话:

    1. 来自基于网络的用户界面。转到Session / Create Test Session... 菜单选项,然后选择要运行的测试,根据需要填写其他测试会话属性,然后单击Create Session 按钮。
    2. 使用测试会话模板。这可以从 UI 或通过 Web API 完成:
      • 从 UI:使用 Session / Create Session From Template...
      • 使用 API:填写 JSON 负载的template 属性。模式详情here
    3. 使用网络 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"
            }
        ]
    }
    

    【讨论】:

      【解决方案2】:

      https://getopentest.org/docs/environments.html 为指导,阅读第 1 步,我相信单击图中所示的加号是一次可以开始新会话的方式。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-10-17
        • 2021-09-10
        • 2012-04-19
        • 1970-01-01
        相关资源
        最近更新 更多