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

参数化数据驱动parameters加载自定义函数没找到 #1467

Closed
BoxTester opened this issue Sep 5, 2022 · 3 comments
Closed

参数化数据驱动parameters加载自定义函数没找到 #1467

BoxTester opened this issue Sep 5, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@BoxTester
Copy link

问题描述

hrp run 运行json文件,json文件中使用parameters参数化数据驱动的其中一种方式,即返回list[dict]模式,报错函数未找到

版本信息

请提供如下版本信息:

  • 操作系统类型: Windows
  • Python 版本: 3.7
  • Go 版本: 1.18
  • HttpRunner 版本: 4.2.0

项目文件内容(非必须)

1
报错信息
PS $$$ hrp run testcases\suittestcasetestcopy.json -g
5:58PM INF Set log to color console other than JSON format.
5:58PM ??? Set log level
5:58PM INF [init] SetFailfast failfast=true
5:58PM INF [init] SetSaveTests saveTests=false
5:58PM INF [init] SetgenHTMLReport genHTMLReport=true
5:58PM INF [init] SetRequestsLogOn
5:58PM INF load file path="testcases\suittestcasetestcopy.json"
5:58PM INF load file path="C:\Users\95439\hrp4demo\.env"
5:58PM INF set env key=base_url
5:58PM INF set env key=USERNAME
5:58PM INF set env key=PASSWORD
5:58PM INF load testcases successfully count=1
5:58PM INF start to prepare python plugin output="C:\Users\95439\hrp4demo\.debugtalk_gen.py" path="C:\Users\95439\hrp4demo\debugtalk.py"
5:58PM INF exec command cmd="C:\WINDOWS\system32\cmd.exe /c python -m py_compile C:\Users\95439\hrp4demo\debugtalk.py"
5:58PM INF find all function names functionNames=["get_user_agent","sleep","sum","sum_ints","sum_two_int","sum_two_string","sum_strings","concatenate","setup_hook_example","teardown_hook_example","getkey","getparameters"]
5:58PM INF generate debugtalk success output="C:\Users\95439\hrp4demo\.debugtalk_gen.py"
5:58PM INF build python plugin successfully output="C:\Users\95439\hrp4demo\.debugtalk_gen.py" plugin="C:\Users\95439\hrp4demo\debugtalk.py"
5:58PM INF ensure python3 venv packages=["funppy==v0.5.0"] python3="C:\Users\95439\.hrp\venv\Scripts\python.exe"
5:58PM INF python package is ready name=funppy version=v0.5.0
5:58PM INF set python3 executable path Python3Executable="C:\Users\95439\.hrp\venv\Scripts\python.exe"
5:58PM INF load hashicorp go plugin success path="C:\Users\95439\hrp4demo\.debugtalk_gen.py"
5:58PM ERR call function failed error="function getparameters is not found" arguments=[] funcName=getparameters
5:58PM ERR parse parameters content failed error="function getparameters is not found" parametersRawContent=${getparameters()}
5:58PM ERR parse config parameters failed error="function getparameters is not found" parameters={"cardno-dtype-error_code":"${getparameters()}"} parametersSetting=null
5:58PM ERR [Run] init session runner failed error="parse testcase config failed: parse testcase config parameters failed: function getparameters is not found"
5:58PM INF quit hashicorp plugin process
2022-09-05T17:58:17.753+0800 [WARN] grpc-py: plugin failed to exit gracefully

@BoxTester BoxTester added the pending pending for confirmation label Sep 5, 2022
@ak-pipi
Copy link

ak-pipi commented Sep 16, 2022

同样遇到了,应该是bug还没修复吧

@Wangmin362
Copy link

golang中也是一样,parameters中找不到自定义的插件

1 similar comment
@Wangmin362
Copy link

golang中也是一样,parameters中找不到自定义的插件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants