我正在使用一个名为stepci的工具来动态创建API测试,当我生成workflow.yaml并运行测试时,我遇到了问题,有人可以帮助我吗?

问题描述 投票:0回答:1

我的问题是当我运行测试(stepci run fakedata.yaml)时出现错误(在图像中):

input must not start with a slash when using prefixUrl

Portion of code file name -> fakedata.yaml

我尝试检查某些网站的验证,我的 yaml 文件没有问题,我尝试删除斜杠,但测试仍然显示错误

yaml schema openapi openapi-generator drf-yasg
1个回答
0
投票

我认为您忘记将

config.http.baseURL
添加到 YAML 配置中。这是一个例子:

version: "1.1"
name: Status Check
config:
  http:
    baseURL: https://example.com
tests:
  example:
    steps:
      - name: GET request
        http:
          url: /
          method: GET
          check:
            status: /^20/
© www.soinside.com 2019 - 2024. All rights reserved.