Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

Can JMeter record capture requests from a .razor page?

Currently on launching the login page of the application (which is a .razor page) through JMeter after providing all the necessary JMeter configurations, the contents of the page are not displayed in UI.

If the source of the request is .razor and JMeter by itself is not capable of recording it, how can such applications be recorded through JMeter? Is there any work around?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

As per Wikipedia ASP.NET Razor article

Razor is an ASP.NET programming syntax used to create dynamic web pages with the C# or VB.NET programming languages.

JMeter doesn't know anything about the backend languages/technologies/patterns/whatever, it just sends HTTP requests, waits for responses and measures time in-between

In case of HTTP and HTTPS protocols you can record the requests using HTTP(S) Test Script Recorder

Looking at Introduction to Razor Pages in ASP.NET Core article it doesn't do any magic so JMeter should capture the requests and be capable of replaying them.

Just pay attention to these "async" calls, real browsers execute AJAX requests in parallel so if this is your case - you might want to put HTTP Request samplers representing async calls under the Parallel Controller

If JMeter is not recording anything the reasons could be in:

  • JMeter configuration is not correct: check jmeter.log file and your browser console window
  • The protocol(s) in use are not only HTTP/HTTPS, if there is something like WebSocket under the hood - you won't be able to record it with JMeter, you will have to inspect the requests using your browser developer tools and look for a way of replicating them using suitable JMeter Plugins

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...