Can jmeter cli tools record a test script? - jmeter

I am new to jmeter. Creating a simple script seems easy via browser actions recording. Can that be done without launching the jmeter IDE?

As per latest stable JMeter version 5.4.1 it's not possible to start HTTP(S) Test Script Recorder without starting JMeter GUI
If you cannot do this for any reason the options are in:
Use JMeter Chrome Extension
Use your browser developer tools to record your test request into a .HAR file, once done you can:
either use online conversion tool to convert .har file into a JMeter script
or manually create JMeter's HTTP Request samplers by looking into requests details in the browser developer tools. If you cannot launch JMeter GUI at this stage as well you can consider using Taurus automation framework which allows creation of JMeter test plans using YAML syntax

You need to start the JMeter proxy for recording the test and it is not possible to start the proxy through available options.
There is a number of ways available for building test plans including the HTTP(S) Test Script Recorder.
Ten different ways to build JMeter Test Plans
The recording feature can be used even for complex scripts. You will have to use/add JMeter components and configure them once the recording is done to achieve the desired user actions.

Related

Jmeter Recording xml issue

I am trying to record a script for web application (https protocol)using jmeter-5.3. The xml file in the view result tree of HTTP(S) Test Script Recorder is capturing all the calls. but once I finished my recording and check the xml file doesn't have the calls(the first 3-4 transaction calls) in the beginning of the script in the xml. why its happening and how can I fix it?
According to JMeter Best Practices you should be using the latest version of JMeter so consider upgrading to JMeter 5.4.3 (or whatever is the latest version which is available at JMeter Downloads page)
Check "Grouping" setting of the HTTP(S) Test Script Recorder, it might be the case you have Store 1st sampler of each group only selected and it can discard important requests:
Make sure to use Recording Template as it generates good and valid recording test plan
Check jmeter.log file for any suspicious entries
Try alternative way of recording a JMeter test i.e. JMeter Chrome Extension and see whether all requests which should be captured are captured.

Blazemeter Chrome Extension - Correlation in Jmeter

I have recorded a script, successfully via Blazemeter Chrome Extension. But now, would like to identify the dynamic values to be correlated. Is there a way to view the recorded responses? It becomes very difficult otherwise.
Regards,
Ajith
I don't think BlazeMeter Chrome extension can store the responses, the options are in:
You can enable requests recording in Chrome Developer Tools and export requests/responses as HAR
You can switch to JMeter's HTTP(S) Test Script Recorder, if you add View Results Tree listener and configure it like
the recording.xml file will contain all request and response data
There is an alternative option of recording a JMeter test: BlazeMeter Proxy Recorder, it has nice feature of exporting recorded tests in "SmartJMX" mode with automatic detection and correlation of the dynamic parameters, see How to Cut Your JMeter Scripting Time by 80% article for more details.

Specflow (cucumber) for Load Test (Jmeter)

Is there a way to create JMeter load test plan from .feature files? I have been looking around and I did not find any existing framework or a way to use existing specflow's feature files to create JMX files.
I don't think this is currently supported.
If you use Specflow/Cucumber for running Selenium tests (or your tests use HTTP/HTTPS protocol(s) you can configure your WebDriver initialization to use JMeter's HTTP(S) Test Script Recorder as a proxy for Selenium WebDriver instances so when you run your Specflow/Cucumber test JMeter will capture the requests coming from browsers and convert them into HTTP Request samplers.
This way you will be able to build a JMeter test plan out of your existing functional test and replay it with increased number of users. See How to Convert Selenium Scripts into the JMX Converter for more details.
As an alternative you can consider Ruby-JMeter DSL or Taurus tool which allow creating JMeter tests declaratively.

jp#gc - Chrome Driver Config

I would like to automate my JMeter recorded scripts using jp#gc - Chrome Driver Config to execute in chrome tab. Is there any way to run my recorded script in Chrome Driver Config without using javascript in jp#gc - WebDriver Sampler ?.
I am using Apache JMeter 3.2 version and for reference I have attached screenshot of my Test Plan, please verify it.
JMeter acts on HTTP protocol level so it is not possible to convert recorded HTTP requests into full browser tests. You can convert existing Selenium tests into JMeter ones, but not in the opposite direction.
You can try using i.e. Selenium IDE to record your UI-based scenario, export it to Java language and use them as a basis for your WebDriver Sampler based scripts (it supports variety of languages), however you will still need to amend the recorded script as the code, generated by Selenium IDE won't be consumed by the WebDriver Sampler "as is"

JMeter HTTP(S) Test Script Recorder

I am now trying to use Apache JMeter HTTP(S) Test Script Recorder, but I have a difficult problem!
I've done the following Settings in JMeter .
enter image description here
And I configured the proxy in firefox.
Then I recorded a simple script.
But when I replayed the script, it didn't work, and I got the following tips:
enter image description here
What should I do? Please give me some advice!Thanks!
I don't fully understand two things:
Why you are asking Badboy-related question in JMeter forum?
How it can be convenient to use 2 separate tools while JMeter has its own HTTP(S) Test Script Recorder?
So please retry recording using JMeter's Proxy Server and if the issue persists - come back here so we could take a look into the issue.
There is one more alternative solution for JMeter tests recording which used to work under any conditions: JMeter Chrome Extension, you can consider it as a fallback solution.
No one will ever read this or benefit from it, but just in case....
Right click your test plan and select Add > Listener > View Results Tree.
Re-run your script and read what's in the results tree.

Resources