如何使用jMeter测试SAP OData服务并发访问时的性能-阿里云开发者社区

开发者社区> 开发者小助手-bz4> 正文

如何使用jMeter测试SAP OData服务并发访问时的性能

简介: 如何使用jMeter测试SAP OData服务并发访问时的性能
+关注继续查看

For project reason I have to measure the performance of OData service being accessed parallelly. And I plan to use the open source tool JMeter to generate a huge number of request in parallel and measure the average response time. Since I am a beginner for JMeter, I write down what I have learned into this blog.


I will continue to explorer the advanced feature of JMeter in my daily work.


(1) Download JMeter from its official website.

Go to the installation folder, add the following text in file \bin\user.properties:

image.png

(2) Create a new test plan for example Customer_Query_OData_test, and right click on it and create a thread group from context menu.

image.png

Below configuration means I would like to generate three request in parallel via three threads, each thread is executed only once. And there is no delay during the spawn of each threads ( Ramp-Up Period = 0 )


image.png

Create a new Http Request and maintain the following settings:


Protocol: https

Server name:

Http request method: GET

Http path: /sap/c4c/odata/v1/c4codata/AccountCollection/

Use KeepAlive: do NOT select this checkbox

In Parameter tab, maintain query option $search with value ‘Wang’

image.png

Switch to Advanced tab, choose “HttpClient4” from drop down list for Implementation, and maintain proxy server name and port number.

image.png

(3) Create a new HTTP Header Manager and specify the basic authentication header field and value.

image.png

(4) Create a listener for the test plan. In my test I simply choose the most simple one: View Results in Table. image.png

Once done, start the test:

image.png

After the test is finished, double click on View Result Listener and the response time for each request and the average response time is displayed there:

image.png

Or you can use command line to achieve the same:


-n: use non-GUI mode

-t: specify which test plan you want to run

-l: specify the path of output result file

image.png

And I have written a simple Java application to generate parallel request via multiple thread and the result measured in Java program is consistent with the one got from JMeter.


image.png

How to generate random query for each thread in JMeter

Suppose we would like each thread in JMeter to generate different customer query via OData with the format JerryTestCustomer_<1~100>, we can simply create a new user parameter:


image.png

Parameter name: uuid

Parameter value: use JMeter predefined function __Random to generate random number. So the value is: ${__Random(1,100)}

image.png

and in http request, just specify reference to this variable via ${uuid}:

image.png

So that in the end each thread will issue different query to OData service end point.

image.png

Further reading

You can find a list of all other blogs related to OData written by Jerry.


Consume standard C4C OData service via ABAP code

Leverage C4C Odata notification to monitor C4C Opportunity change in CRM system

OData Service backend implementation in C4C, CRM and S4 HANA

JMeter beginner – how to use JMeter to measure performance of OData service accessed parallelly

Regarding cookie manipulation in CL_HTTP_CLIENT to avoid CSRF token validation failure issue


版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
Discord 公司如何使用 Cassandra 存储上亿条线上数据
Discord 是一款国外的类似 YY 的语音聊天软件。Discord 语音聊天软件及我们的 UGC 内容的增长速度比想象中要快得多。随着越来越多用户的加入,带来了更多聊天消息。2016 年 7 月,每天大约有 4 千万条消息;2016 年 12 月,每天超过亿条。
4299 0
并发服务器三种实现方式之进程、线程和select
这篇主要介绍如何实现并发服务器,主要通过三种方式:进程、线程和select函数来分别实现。
1419 0
系统捕获异常并发送到服务器
<p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-family:Arial; font-size:14px; line-height:26px"> 大家都知道,现在安装Android系统的手机版本和设备千差万别,在模拟器上运行良好的程序安装到某款手机上说不定就出现崩
1055 0
.NET性能调优之一:ANTS Performance Profiler的使用
.NET性能调优系列文章 系列文章索引 .NET性能调优之一:ANTS Performance Profiler的使用 .NET性能调优之二:使用Visual Studio进行代码度量 .NET性能调优之三:YSlow相关规则的调优工具和方法 在使用.NET进行快速地上手与开发出应用程序后,接下来面临的问题可能就是程序性能调优方面的问题,而性能调优有时候会涉及方方面面的问题,如程序宿主系统、数据库、网络环境等等,而当程序异常庞大复杂的时候,性能调优将变得更加无从下手。
1154 0
高并发Web服务的演变——节约系统内存和CPU
节约系统内存和CPU http://www.csdn.net/article/2015-02-12/2823952 Web系统大规模并发——电商秒杀与抢购 http://www.csdn.net/article/2014-11-28/2822858(曾经阿里电话面试和腾讯的后台开发都说过的问题,记住记住) 作者博客http://hansionxu.
899 0
2315
文章
0
问答
来源圈子
更多
+ 订阅
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载