If you ran the example following Recorder Quick Start, you may have been surprised by overwhelmingly long generated scripts. It is because there are actually many HTTP/HTTPS messages even in a single web browsing which you didn't notice before. Do we have to include all these in the script? Sometimes it is useless to include all these in the performance test.
Usually developers might want to run the performance test on the web servers under their controls. Therefore, nGrinder Recorder includes several filtering features.
nGrinder Recorder recognizes the host names to which the proxy is connecting and how many calls are made. On the right panel there is a table which lists up the connected hosts and connection counts. When you don’t start Recording yet, this panel shows connected hosts but call count.
If you start Recording, it shows the recorded call count in “R” column. You can examine the host names and uncheck all hosts which you don’t interested in.
The easiest way to achieve this is to click “Unselect All” button downside and check the interested host one by one.
There is one more method to filter out unnecessary static resources. At the downside of the right panel, there is a filter based on file types. “Recorded Type” panel lists the general static resource content type.
You can completely remove all recording by selecting “Clear all recording” sub-menu which is popped up in “Reset” button.
There are several sub menus in Reset button. Each has the different action like below.
|Clear all recording||Clear all recorded messages. However it doesn't change the filter.|
|Clear all filters||Clear all filters. However it doesn't change the recorded messages.|
|Clear connection count||Make the all connection count 0 in the filter panel.|
|Reset browser cache||Delete all browser cache so that the browser can actually make a call to the given resources.|
|Reset cookies||Delete all saved cookies from the browser so that the browser is not interfered by the previously issued cookies.|
When a user clicks “Stop Recording” button, the recorded HTTP/HTTPS messages are transformed to The Grinder script. The script generated by nGrinder Recorder is little bit different from TCPProxy provides. We made the script template little bit more compact than what TCPProxy generates.
Be aware that “Stop Recording” doesn't mean “Reset Recording”. If you click Start Recording again, it continues to record the messages appending to existing recording. It’s because there are many reasons to pause the recording (A user might fall down by too much overwork)
There are one option for script generation. If you check “Add sleep time” in Script Generation Options option groups, the actual waiting time during recording are included in the unit of milliseconds at the final script like following.
If you went to the toilet after starting recording, Recorded sleep time might be very long. Please check the how long the script sleep between calls before running a script in nGrinder Controller.
Mobile Web Page Recording
nGrinder Recorder supports the user agent string manipulation which means you can navigate the mobile site which detects the browser type and send the appropriate contents. You can select the mobile user agent. Then even if you navigate the www.amazon.com, Then the mobile page is sent from the server like below.
If you don’t want to use this fake browser technique but the real mobile browser from your devices, you can record the messages by configuring your mobile devices proxy settings.
If you set up above, you can record the messages from your devices, just as you did in the embedded browser.
nGrinder Recorder supports HTTPS as well but very limited way. As described in Recorder Limitation, the private self-signed ceritificate is used to intercept the HTTPS messages. So you may see following alerts whenever you access HTTPS sites.
To avoid this alert, you have to import the self signed certificate in the trusted certificates. Check out Recorder-How to import self-signed certificates
nGrinder Recorder provides another way to work around this issue. Actually this method is introduced by TCPProxy and nGrinder uses it with little modification. If you are going to test your own HTTPS server, you might have already the valid certificate. You can provide this instead of embedded certificate for the proxy to use. You can refer how to provide your own certificate in Recorder Installation.