automation - 如何使用 Vividus 工具测试下载文件
解决方案
推荐的方法:
- 在 Web UI 上找到链接
- 提取链接 URL
- 使用
vividus-plugin-rest-api
步骤下载文件(您可能还需要使用步骤将 cookie 从浏览器注入 Web UIvividus-plugin-web-app-to-rest-api
) - 验证 HTTP 响应代码和内容
实现示例:
When I set 'href' attribute value of the context element to the 'scenario' variable 'file-to-download'
When I set browser cookies to the API context
When I issue a HTTP GET request for a resource with the URL '${file-to-download}'
Then `${responseCode}` is equal to `200`
推荐阅读
- html - HTML jQuery 多选下拉菜单工作不完美
- javascript - 包含某些扩展名但允许包含查询参数的正则表达式匹配
- routes - 如何更改openshift oauth认证的路由url?
- python - 对 2D numpy 数组的每一列进行切片
- node.js - mongodb中两个请求之间的竞争条件
- c# - Visual Studio 2019 无法加载应用程序配置数据。请检查文件“runtime.config”是否存在且正确
- php - 每7天循环一次
- python - 如何从字符串字符构建所有可能的对
- wordpress - 帖子 Masonry 不适用于 WP Bakery Page builder
- python - 日期时间类和模块不能一起工作?