如何配置 apache jmeter 2.6 oauth 2.0 [英] how to config apache jmeter 2.6 oauth 2.0

查看:23
本文介绍了如何配置 apache jmeter 2.6 oauth 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 jmeter 为 oauth 2.0 安全 API 执行测试.我找到了以下插件

I need to perform tests using jmeter for an oauth 2.0 secured API. I have found the following plugin

http://code.google.com/p/jmeter-oauth/

我成功安装了它,但现在我被困在实际编写测试中.文档丢失了....有人知道如何实际使用插件吗?

I managed to successfully install it but now I am stuck with actually writing the tests. The documentation is missing....does anyone have a clue on how to actually use the plugin ?

谢谢.

推荐答案

您的问题是在 JMeter OAuth Sampler 的使用中 - 还是在 OAuth 协议测试策略本身?

Is your problem in JMeter OAuth Sampler usage - or in OAuth protocol testing strategy itself?

关于插件的 JMeter OAuth 采样器指南有什么问题网站?

What's wrong with JMeter OAuth Sampler guide on plugin's site?

请注意采样器在 Jmeter 版本 2.5.x/2.6 中无法正常工作或无法正常工作 - 请参阅 相关问题.
您还可以使用 OAuth 测试客户端进行额外验证.

Beware only that sampler could not work or work not properly with Jmeter versions 2.5.x/2.6 - see related issue.
You can also use OAuth Test Client for additional verification.

这里您会找到所有交互步骤的描述,这些步骤很容易映射到 JMeter OAuth 采样器指南中图片上的采样器:

Here you'll find description of all the steps of interaction that are easily mapped onto sampler on the picture in JMeter OAuth Sampler guide:

  1. 获取请求令牌(图片上的身份验证"采样器).在这里,您必须从中提取 oauth_tokenoauth_token_secret成功响应以在 OAuth 采样器中进一步使用:

  1. Getting a Request Token ("Authentication" sampler on the picture). Here you have to extract oauth_token and oauth_token_secret from successfull response to use further in OAuth Sampler:

oauth_token=requestkey&oauth_token_secret=requestsecret

相应的提取器显示为 Authentication 的子代采样器.

Corresponding extractors are displayed as children of Authentication sampler.

获取访问令牌(令牌验证")

获取数据(图片上的获取数据"OAuth 采样器).

Get Data ("Get Data" OAuth Sampler on the picture).

查找协议流程和规范此处.

这里的 ${oauth_token}${token_secret} 是从第一个采样器的响应中提取的.

Here ${oauth_token} and ${token_secret} are extracted from the 1st sampler's response.

这篇关于如何配置 apache jmeter 2.6 oauth 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆