238 Star 672 Fork 330

GVP许雪里 / xxl-api

接口测试,写了参数,接口没接收到

Closed
勐萌  Opened this issue

在 Test接口 功能里面,写了需要测试的接口的参数,但是接口没接收到参数
查看源码,XxlApiTestController 的 run 方法里面:

Map<String, String> queryParamMap = null;
		List<Map<String, String>> queryParams = (StringUtils.isNotBlank(xxlApiTestHistory.getQueryParams()))? JacksonUtil.readValue(xxlApiTestHistory.getQueryParams(), List.class):null;
		if (CollectionUtils.isNotEmpty(requestHeaders)) {
			queryParamMap = new HashMap<String, String>();
			for (Map<String, String> item: queryParams) {
				queryParamMap.put(item.get("key"), item.get("value"));
			}
		}

为什么是判断 requestHeaders 不为空?是写错了吗?还是必须要写 requestHeaders 吗?

requestHeaders也传入值,测试发现

formParams 也确实添加了参数,但是接口里面接收不到

378604 xuxueli0323 1578922035 4214 mamacmm 1578914239 total 2 participants

Comments (1)

378604 xuxueli0323 1578922035
许雪里 2017-05-31 16:46 owner

你好,这是之前一个版本的bug,已经修复并推送master了啊。

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/xuxueli0323/xxl-api.git
git@gitee.com:xuxueli0323/xxl-api.git
xuxueli0323
xxl-api
xxl-api

Search