Skip to content
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

使用Pytest参数化后无法访问debugtalk中的自定义方法 #1745

Open
qinian222 opened this issue Apr 24, 2024 · 2 comments
Open

使用Pytest参数化后无法访问debugtalk中的自定义方法 #1745

qinian222 opened this issue Apr 24, 2024 · 2 comments
Labels
pending pending for confirmation

Comments

@qinian222
Copy link

问题描述

请对 bug 进行简要描述;
尽量附带运行的命令和报错时的堆栈信息

版本信息

请提供如下版本信息:

  • 操作系统类型: [e.g. macOS]
  • Python 版本: [e.g. 3.7]
  • HttpRunner 版本 [e.g. 3.1.4]

项目文件内容(非必须)

image
问题1:无法使用ENV方法获取环境变量值
问题2:无法使用debugtalk中的自定义方法

@qinian222 qinian222 added the pending pending for confirmation label Apr 24, 2024
@qinian222
Copy link
Author

如果不使用Pytest参数化,则没问题

@qinian222
Copy link
Author

问题已解决:
1、当前执行用例的目录非httprunner项目目录,解决方法①:切换至httprunner项目目录 解决方法②:将被执行脚本和debugtalk文件切换至当前工作路径
image
2、解决以上问题后发现参数化数组只读取第一组参数,最后发现是pydandic包版本的问题 重新安装:pip install pydantic==1.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending pending for confirmation
Projects
None yet
Development

No branches or pull requests

1 participant