我正在从一个挥霍无度的定义生成Jmeter的jmx文件,生成的JMX和测试数据CSV似乎毫无用处,它没有API所期望的参数信息,也没有响应映射信息的http状态代码等等。
您可以使用任何定义文件,以复制以下内容:
我所期望的是一个带有整个API框架的JMX,这样QA人员就不必担心这个问题,而只关注测试。
我为其他语言/工具生产的所有客户端都足够好,除了Jmeter之外,我在这里做了什么错事吗?
发布于 2016-09-14 16:32:47
我为不同的API生成了JMeter (JMX),并使其正常工作,尽管有一些问题和注意事项。
首先生成
警告和发布
- testCases variable has a bug in the template it defines testCases as ${\_\_P(host,10)} but it should be ${\_\_P(testCases,10)} 

编辑后的参数

示例Swagger工作
下面是我使用的昂格格文件 (从echo修改)和生成的JMX (对参数进行修改)。我已经使用JMX测试了这个RedLine13示例测试,并根据需要传递了参数。传入参数
-JtestCases=50
-Jhost=mazimi-prod.apigee.net
-Jport=80下面是Yaml的例子
---
swagger: '2.0'
info:
version: 1.0.0
title: Echo
description: |
#### Echos back every URL, method, parameter and header
Feel free to make a path or an operation and use **Try Operation** to test it. The echo server will
render back everything.
schemes:
- http
host: mazimi-prod.apigee.net
basePath: /echo
paths:
/{id}:
get:
parameters:
- name: id
in: path
description: ID
type: string
required: true
- name: user
in: query
description: name
type: string
required: true
- name: location
in: query
description: location
type: string
required: true
responses:
200:
description: Echo GETSwagger CodeGen中的JMEter更新模板
由于在SwaggerCode中实现无缝工作存在一些问题,所以我创建了一个发出和拉动请求。如果您需要更早地使用它,分叉就在这里,https://github.com/richardfriedman/swagger-codegen/commit/5aff601eaccf67ec44bb681816d40a25e5aa20a3
https://stackoverflow.com/questions/39482537
复制相似问题