Posts

Showing posts with the label Jmeter

Common Issues While Creating Performance Scripts

Common Issues While Creating Performance Scripts When you start load testing a web site (especially if this is the first load test in your life) you may see a lot of errors in the report. Possibly you will even have to stop the test before it completes, because at some point in time it becomes clear that something goes wrong. If the problem is not so obvious, it is still recommended to check the report for the errors related to each virtual user profile (i.e. to each different type of virtual users) before looking at any performance data. Issue 1:   Most probably the errors appear because you have not parameterized the HTTP requests in your profile. Note that initially all requests are recorded as is. If user use a recorded profile without any modifications. Performance tool will simply repeat all the same requests with the same values of all parameters. However some values should be unique for each session. You can check the “Logs” folder for errors and find the first ...

HOW TO UNINSTALL JENKINS

Image
How to uninstall Jenkins on Mac system 1.     Execute from terminal             /Library/Application Support/Jenkins/Uninstall.command 2.     Or use Finder to navigate into that folder and double-click on Uninstall.command. 3.     If the uninstallation script cannot be found, use:        sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist        sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist        sudo rm -rf /Applications/Jenkins "/Library/Application Support/Jenkins"     /Library/Documentation/Jenkins 4.     if you want to get rid of all the jobs and builds:    sudo rm -rf /Users/Shared/Jenkins 5.   to delete the jenkins user and group (if you chose to use them):        sudo dscl . -delete /Users/jenkins        sudo dscl . -de...

Jmeter bean shell script, create file, read jmeter variable value, store script variable value into jmeter variable

Image
Hi All, Some times in JMeter scripting we need to store the output value in file or wanna show the run time  variable value in console window. OR we need to get the current JMeter script directory path. This can be achieved via scripting in Bean Shell Pre/Post Processor. Here I am using time and counter function of JMeter to create the file.In bean shell scripting we are reading the JMeter variables value and storing script variable value into JMeter variable or creating Jmeter variable Here is the  Bean Shell script : import org.apache.jmeter.services.FileServer; import org.apache.jmeter.services.FileServer; import java.util.Date; import java.text.SimpleDateFormat; SimpleDateFormat formatter = new SimpleDateFormat( "yyyyMMddHHmmss" ); String datetime = formatter.format( new java.util.Date() ); // Get current running counter value(C refrence name deifned in counter config element) String counter= vars.get("C"); // Get Jmeter variable value in bean she...

Jmeter: pass a value between threads

Image
Synopsis:  Find out ways to pass a value between threads (i.e. capturing a value in one of the thread and passing it to the other thread in the same test plan). Tool Used:      JMeter: Performance testing tool. Solution:        Sharing Variables 1)       Used Sampler : BSF Sampler 1)       Screenshot displaying the use of the BSF Sampler using  ${__setProperty(storeid, ${storeid})}; for capturing the time. The website used is http://www.mail-archive.com/jmeter-user@jakarta.apache.org/info.html for displaying the value captured in one thread to the other thread. Screenshot 1: Displaying the BSF Sampler capturing the time value using ${__setProperty(storetime, ${__time(HMS)})}; Screenshot 2: Displaying the time captured using ${__property(storetime)} in the other thread. Screenshot3: Successful execution of the script ...