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

Categories

0 votes
1.1k 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...