I need to setup CBLite to a Jmeter script. Can anyone describe how to setup CBlite in existing Jmeter ?
Related
I am trying to clear cookies after each iteration in Taurus yaml.
I tried the solution from below thread but it didn't work:
[Google Group] https://groups.google.com/g/codename-taurus/c/wa4xIbxkUYI?pli=1
Above thread says:
For reference I did it like this:
modifications:
set-prop:
"Cookies>CookieManager.clearEachIteration": "true"
I have tried the same but didn't work.
Using JMeter I can clear the cookies but need the same behavior for Taurus. Any help.
What do you mean "for Taurus"? Taurus just provides YAML configuration of some of JMeter test elements. The "solution" you're referring is for running existing .jmx script using Taurus
Taurus doesn't support 100% of JMeter functionality when it comes to building test plan from config, refer the documentation to see what is supported.
If you want to use some JMeter functionality which is not supported by Taurus the options are in:
Reach out to Taurus developers via the forum you're referencing and ask them to implement the functionality you need
Implement it yourself, Taurus is an open source project
Switch to the existing .jmx script execution
Switch to JMeter and stop using Taurus as a wrapper
Use JR223 Test Elements to perform the removing of cookies, i.e. you could add a JSR223 PreProcessor to the first sampler in the Thread Group and call sampler.getCookieManager().clear() function there where sampler stands for HTTPSamplerBase
I'm using an openapi-generator-cli(5.4.0 v) jar to create a JMeter script. However, it is throwing errors for all the API's in swagger JSON.
I tried generating the script for pet store JSON. It's working.
Please let me know what could be the issue.
I don't think it's possible to use "openapi-generator-cli(5.4.0 v) jar to create a JMeter script", if you want to generate a JMeter test plan from the OpenAPI definition I would suggest doing this like:
Obtain Taurus tool
Use swagger2yaml tool to generate Taurus YAML file from the API specification
Run Taurus as bzt yaml-from-step-2.yml -gui - it will open JMeter with the generated test plan
Save the test plan as JMeter .jmx file
I am currently trying to automatically record a JMeter script using Selenium. Therefore i start Jmeter in GUI-Mode through Jenkins (using a batch file) with activated Script Recorder.
Then i run a Selenium-test also through Jenkins and a batch file. The requests that this Selenioum script is doing are successfully being recorded.
The only step that i was not able to figure out yet is to save the recorded JMX-Script and close JMeter.
Is there a way to do this through command line, batch file or other? Doing it manually is not an option since JMeter is running on a remote node through Jenkins.
I was able to close JMeter through a system exit/kill command but this way the jmx-file is not being saved.
I don't think it's possible as of JMeter 5.2.1, you will need to automate JMeter GUI separately using Appium or Sikuli or ldtp
However I believe it will make more sense to reconsider your approach and go for one of the following options:
Replay your Selenium test using JMeter's HTTP(S) Test Script Recorder as the proxy
Use Taurus tool which has Proxy2JMX Converter
If above 2 options for some reason cannot be used in your environment you can automate i.e. JMeter Chrome Extension from Selenium (check out 6 Easy Steps to Testing Your Chrome Extension With Selenium for details) so you will be able to start the recording and export resulting .jmx script directly from your browser without having to communicate with the remote Jenkins/JMeter instances.
I'm running tests on JMeter on a target server. So I start JMeter(GUI) on my Mac but it points to a Linux server and runs tests against it. I need to read a system property on the target server and use that in my If Controller.
System.getProperty("prop_name"); works if the property is defined on my mac. But it doesn't pick it up from the target server.
Any suggestion is much appreciated!
Thanks!
I can suggest 2 options:
If your application under test has JMX enabled - you can read the "interesting" property value in one of JSR223 Test Elements using Groovy code. The properties can be queried from the RuntimeMXBean.
See Java Management Extensions (JMX) Technology Tutorial for more information.
If there is no JMX exposed to the outer world you can still try to get the property value remotely. Be aware that you can run any command or program on remote Linux instance using SSH Sampler. SSH Sampler can be installed using JMeter Plugins Manager.
See How to Run External Commands and Programs Locally and Remotely from JMeter for more information.
What I need to do - create Jenkins job which runs Jmeter test in Blazemeter with some parameters such as a test URL. The parameters should be set in Jenkins before job starts.
What I have done:
Added Blazemter plugin for Jenkins.
Created an appropriate Jenkins job which will use the Blazemeter plugin for building.
Created Jmeter scenario and saved it in the .jmx format. I added a variable ${baseURL} with null value in the Jmeter's test plan which is used in the HTTP request as a Server Name or IP value.
Created a Jmeter test in Blazemeter and uploaded the jmx file. Saved the test.
Tried to run a job with the following parameters described in the session properties field in the Blazemeter plugin baseURL=${baseURL}. I set google.com as a property value in Jenkins.
Results - Blazemeter test has up and ran, it tested http:// however it had to http://google.com.
So the question is - What I did wrong or may be the Blazemeter plugin is not what i need or may be general approach is wrong.
The solution is the following: - use function __P or __property to get parameters into .jmx file. So i put ${__P(baseURL,)} function in the Server Name or IP statement and the Blazemeter successfully tested http://google.com.