JMeter - Execute multiple test plans from single console - jmeter

I am new to JMeter. I have created several test plans. Is it possible to combine different test plans in a single '.jmx' file so that the user can see all the different test plans in one console? Not only that, the user can pick and choose more than one test plans and run them? The test plans may not be collaborating with each other. Theyare completely isolated test plans. The idea is, the user can view and execute them from one console?

First of all, looking into Adding and Removing Elements chapter of Building a Test Plan article:
Adding elements to a test plan can be done by right-clicking on an element in the tree, and choosing a new element from the "add" list. Alternatively, elements can be loaded from file and added by choosing the "merge" or "open" option.
You can also store multiple .jmx scripts as Test Fragments and add them to the "main" script via Include Controller and/or Module Controller
Check out How to Manage Large JMeter Scripts With JMeter Test Fragments article for more information.

instead of maintaining multiple test plans .. i would suggest make multiple thread groups in one test plan so whoever going to use specific group then can enable and run ..

I am not sure you can add multiple test plans in one JMX file, as above comment says you can create multiple Thread groups in one test plan.
You can even create a test plan with JDBC request to test Data base and another test plan with Http request to API tests.
Add different headers and Listeners in each thread group as needed.
If you want aggregate report of all thread groups, you can listener by right clicking on Test Plan.

Related

How to make several requests be made once? And the rest flow

I have 2 queries and a db connection that i would like to make once as part of testing
CSRF
DB CONNECT
LOGIN
And then comes the API method I need that I'm testing. Here it needs to be run a number of times.
I read the documentation, but I still don't understand. Please help.
Put them under the Once Only Controller, its children are being executed only during the 1st iteration of the Thread Group
I also see a number of Listeners in your Test Plan, when you finish test development and debugging don't forget to remove them as they don't add any value and only consume resources, you should execute your JMeter test plan in command-line non-GUI mode with all listeners disabled or deleted and once it's finished you can use Listeners to analyze the .jtl results file (or just generate HTML Reporting Dashboard from it)

How to create global setup in Taurus/jmeter

I want to create a setup scenario that runs once per test execution, creates dependencies for my tests and saves a reference to them in global properties. I can not find any examples of this.
As a more concrete example I want to load test my comment section. I want to create a single blog post then write a bunch of comments to the same blog post. I want to do these comments concurrently across threads using execution.
For vanilla JMeter you can consider using setUp Thread Group which is designed for implementing the preconditions, the values which you need to define globally can be populated using __setProperty() function to keep them in memory or stored into external file(s) using i.e. Flexible File Writer
Once you come up with a proper JMeter .jmx script you should be able to execute it using Taurus and see real-time results, define pass/fail criteria, etc.

Reference a Thread Group which has a set of samplers in Jmeter in an another test plan?

I am trying to reference a thread group (which has samplers in it) in an another test plan. Can I do this in jmeter?
Yes, a Thread Group can be added in the another test plan. With the help of Include Controller
Create a Test Fragment underneath the Test Plan
Add any desired samplers, controllers etc. below it.
Then save the Test Plan - this file is now ready to be included as part of other Test Plans.
Please note:
If the test uses a Cookie Manager or User Defined Variables, these should be placed in the top-level test plan, not the included file, otherwise they are not guaranteed to work.

JMeter test report

I'm using JMeter for integration and non-regression testing.
The tests are automated and reports are working.
But since it is scenario testing and not performance testing the report doesn't give real business added value for that kind of tests.
My question: Is there any way to have a scenario (transaction controller based)reporting?
For the moment, to have some more meaningful result, transactions controllers and dummy sampler are used.
What we would like to have is the number of success/failure scenarios of the last test run. And also an history of success/failures per test run (1 by day).
Thank you for your advices.
The easiest way of getting the things done is putting your JMeter test under Jenkins orchestration so it will be automatically executed based on a VCS hook or according to the Schedule
Once done you will be able to utilize Jenkins Performance Plugin which adds test results trends charts and ability to mark build as unstable/failed depending on various criteria.
If I am not wrong, you want to create a suite based on particular test cases. like if single case include execution of more than 1 request in a single execution.
If this is the case, you can simple create a test fragment through jmeter gui, and copy all the samplers in single fragment.
Now to control their execution you can use any controller of your choice, i would suggest you to use module controller for http samplers.

Endurance testing using Jmeter

I am new to Jmeter and trying to understand what all can be achieved using Jmeter. I want to perform endurance or soak testing of a application using Jmeter, i.e. I want to run a particular script for a particluar number of users for a period of 3 hours.
What all options are available to me and what is the best availablelistener to monitor the result?
Please help. Kindly add if I am missing anything that I should know before starting with soak testing?
For setting up the numbers of users and runtime of the test you use a Thread Group. Setting the runtime is done by checking the Scheduler check-box and specifying Duration.
Of the original listeners in JMeter I have found myself most oftenly just using the plain Summary Report. But JMeter Plugins gives additional listeners which may be better, it depends on what you want to measure. The JMeter Plugins also gives additional thread groups, where you can specify e.g. an increasing load over time.
Use a Thread Group to set up your number of users and the duration of your test (using the scheduler of the Thread Group).
Then add all the samplers and logic controllers you need to perform your testing.
Next, add a Summary Report listener to get an overview of your results (min/max/average and such), and add a View Result Tree listener to get an overview of EACH step your testplan is taking. This Tree listener is great to actually see what jmeter is doing, and to debug your tesplan.
BTW: if you add a HTTP Request Defaults object, you can set your URL and options in there, and don't need to add it to each and every sampler again. Especially works like a charm if you start using regexp extractors and such.

Resources