如何使用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


相关文章
|
5月前
|
存储 缓存 监控
Web 应用程序性能测试核心步骤
Web 应用程序性能测试核心步骤
|
XML 前端开发 测试技术
使用 jMeter 对 SAP Spartacus 进行并发性能测试
使用 jMeter 对 SAP Spartacus 进行并发性能测试
|
5月前
|
SQL JSON Java
性能工具之 nGrinder Get 请求脚本编写
【5月更文挑战第3天】性能工具之 nGrinder Get 请求脚本编写
50 8
|
5月前
|
JSON 测试技术 数据格式
性能工具之Jmeter关联入门
【4月更文挑战第4天】关联是每个性能测试人员必须掌握的技能,是解决性能脚本中的"金钥匙"。
60 2
性能工具之Jmeter关联入门
|
移动开发 IDE 调度
本地开发的 SAP UI5 应用,部署到 ABAP 服务器执行出错的问题分析
本地开发的 SAP UI5 应用,部署到 ABAP 服务器执行出错的问题分析
|
缓存 网络协议 安全
「Web应用架构」WebSocket用例,性能和性能检查列表
「Web应用架构」WebSocket用例,性能和性能检查列表
webpack优化篇(四十三):多进程/多实例构建:资源并行解析可选方案
webpack优化篇(四十三):多进程/多实例构建:资源并行解析可选方案
143 0
webpack优化篇(四十三):多进程/多实例构建:资源并行解析可选方案
EMQ
|
Java 测试技术 Linux
JMeter 扩展开发:BeanShell 数据模拟实现及性能探讨
本文是开源测试工具JMeter扩展性开发教程第三期,讲解如何采用JMeter内置功能BeanShell实现动态生成测试数据,并探讨其与Java扩展JMeter的实现方式对比。
EMQ
189 0
JMeter 扩展开发:BeanShell 数据模拟实现及性能探讨
|
JavaScript 前端开发 测试技术
【实测】django测试平台必看:各种请求方式的利弊和适用场景
【实测】django测试平台必看:各种请求方式的利弊和适用场景
【实测】django测试平台必看:各种请求方式的利弊和适用场景
|
测试技术
接口测试平台169:并发引擎文件
接口测试平台169:并发引擎文件
接口测试平台169:并发引擎文件