JMeter & Mule load testing for file to file test - jmeter

Is there a way to use JMeter to load test file to file inbound-outbound endpoints in mule? New to JMeter. Does JMeter have this capability or should I look to another framework to do file to file load testing?

I have accomplished this kind of load test before using JUnit and the Mule FunctionalTestCase. I simply create the files I need on my local filesystem under the target/ directory of the Mule application, and observe an output folder also under target/.
This allows me to understand the behavior of the mule application independent of other factors such as disk I/O contention on the server.
To the best of my knowledge, neither JMeter nor LoadUI offers a feature that would allow you to generate large numbers of files, nor to monitor for the output of files.

Related

JMeter - Multiple users reading requests from a directory

I have a directory of XML files, and I wanted to configure Jmeter such a way that multiple users(threads) should be able to read the XML files(SOAP requests) concurrently (in a round-robin way or some other way) and submit them to Web Service Endpoint, which means I wanted them to share the input files.. for example if my directory contains 100 XML files then all of my configured users(threads) should share the load and jointly have to process the XML files. (Each user should not process all the 100 files independently).
Is there any way to test the above scenario?
Thanks,
Siva
I believe Directory Listing Config plugin would be the easiest option to use
Just provide path to the directory where your XML files live, configure the plugin according to your test scenario and that's it, you will be able to use just one HTTP Request sampler and refer the file name (or path) as ${filename} where required.
You can install Directory Listing Config plugin and keep it up-to-date via JMeter Plugins Manager.

How can i upload different files per thread in jmeter

I can currently upload a file to a web service using a POST and path of the files.
JMeter 2.13
When running the tests with 1 thread it uploads all the files in the directory to the web service. If I run it with 2 threads it uploads all the files twice.
I want to be able to send x amount random files per thread but don't want to send the same files again.
Any advice on how I can do this without using a CSV file?
I can see at least 2 possible solutions:
Using HTTP Simple Table Server plugin. It has KEEP=FALSE option so the file will be removed from the list after uploading. You can install HTTP Simple Table Server using JMeter Plugins Manager
Use the following approach:
in setUp Thread Group use JSR223 Sampler to copy folder with your test files into a temporary location, the relevant Groovy code will be something like:
org.apache.commons.io.FileUtils.copyDirectoryToDirectory(new File('/path/to/source/folder'), new File('/path/to/destination/folder'))
after file upload request you can delete the file which has already been used in the JSR223 PostProcessor like:
new File('/path/to/the/file').delete()

Is there any way we can capture the client-side performance metrics through phantomjs by using JMeter

I tried configuring the "PhantonJS Driver Config" in the JMeter(version 2.13)
adding the following jar files under "apache-jmeter2.13/lib/ext" folder of JMeter and restarted.
But I could not see the config element under ThreadGroup-->Add-->config element
Throughout above PhantonJS Driver Config is there any way we can capture the following client-side performance metrics through phantomjs by using Jmeter
DomLoad
windLoad
ResourceCount
Resource size.
Thanks
Shankar

What are JTL's in Jmeter? how to use them?

I have read in best practices for jmeter -
Disable all JMeter graphs as they consume a lot of memory. You can view all of the real time
graphs using the JTLs tab in your web interface.
How is it done?
Also How can i generate graphs from JTL file.
I have read that xml format for saving results to file are pretty expensive in terms of resource utilization.
How can graphs be generated from logs with csv format?
Quote
JMeter can create text files containing the results of a test run.
These are normally called JTL files, as that is the default extension
- but any extension can be used.
from https://wiki.apache.org/jmeter/JtlFiles
And you can check how to create a plan here:
https://jmeter.apache.org/usermanual/build-web-test-plan.html
Graph Results
https://jmeter.apache.org/usermanual/component_reference.html#Graph_Results
Graph Results MUST NOT BE USED during load test as it consumes a lot
of resources (memory and CPU). Use it only for either functional
testing or during Test Plan debugging and Validation.
Just don't use it.
And here is some information as how to read the files:
How to make JMeter output graphs from log-file?
Just generate you own graph.
You should design your load testing as follows:
Store only those metrics which are absolutely required (you can control what values to save using properties which names start with jmeter.save.saveservice.*
Run JMeter test in non-GUI mode with all listeners disabled
Once test is finished you can do the following:
Open JMeter GUI, add Listener of your choice, i.e. Aggregate Graph and using "Browse" button locate and open resulting .jtl file. JMeter will render the graph
Use Graphs Generator Listener
See 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure article for JMeter performance tips and tweaks.
In Jmeter under Tools -> Generate HTML report:
This opens the dialog:
There you can select the .jtl file.
You also have to select the user.properties file (you find one in the bin directory of Jmeter) and pass a path to an output directory, which has to be empty.
Then you can generate the report, which you will find in the output directory.
There you will find an index.html file which includes the report.

Is it possible to reuse created jmeter test plan for another test environment?

I have recorded a jmeter script for wiki page. That record was done in one of our test environment. That script is working fine and now i want to perform same load test for another test environment(Both environments are same, only urls are different).Is it possible to reuse?How can i do it?
I have added HTTP Request default element at the begging of test plan creation. Now recorded script consist of many HTTP Request element. Each request element contains Server IP of test instance.
Extract IPs and other env-specific data to .properties file:
http://jmeter.apache.org/usermanual/get-started.html#options
Read them in your JMeter with JMeter built-in function ${__P(someName)} as you see fit
Run your generic JMeter test with env-specific config data in .properties file
Yes. It is possible to run the same test in multiple environments. It all depends on how you design your test plan.
This site has exact details you are looking for.
http://www.testautomationguru.com/jmeter-manage-test-plan/

Resources