When I try to add input param in a non-GUI mode in JMeter, it adding an extra space at the end of the variable. There is no space when I enter the params but it is added to the API value when run.
Jmeter is adding an extra space at the end of input parameter
552 Views Asked by Sekar Chan AtThere are 2 best solutions below
Steve Rawlins
On
this is extremely painful to track-down, for the reasons given. I had a working JMX, but when clicking in the JMeter GUI, I accidentally appended a space at the end of a variable name; this is within the tabular "User Defined Variables" element. It slipped past me and, since JMeter does NOT trim that "Name:" field, my variable became "duration " instead of "duration". Downstream, since the TGs were expecting "${duration}" for "Duration (seconds)", the TG did not execute at all because the variable did not resolve to an integer value.
This seems to be a mistake in the JMeter design. Simply trimming the variable name, within the GUI commit, would have solved it for me.
What possible value is there to having trailing spaces in a variable name?
Related Questions in JMETER
- Jmeter JDBC Connection Configuration Parametrization of Database URL for accessing SQL Database
- html data after login to mail server
- JMeter Requests are concurrent requests or sequential requests?
- Why am I receiving Response code: Non HTTP response code: java.net.SocketException?
- Getting connection refused error when trying to communicate through HTTPS
- ELB generating 504 GATEWAY_TIMEOUTS w/ 2 EC2 instances - Packets not reaching Servers
- Using Jmeter OS Process Sampler to collect script data
- Clicking an email verification link using jmeter
- How to run Java code in in JMeter and pass vairables from java code to Jmeter script
- Error instantiating class:class:null java.lang.reflect.InvocationTargetException
- how to get an attribute value from a href link in Jmeter
- Token Parsing Error: Lexical error
- Do we need to use JMeter Tool for .jmx file generation or write java code using eclipse etc
- using JMeter proxy recorder behind company proxy with SSL manager
- Can anyone explain me following RandomString
Related Questions in JMETER-PLUGINS
- How to get data from JMeter to influxDB with backend listener?
- How to Print variable in aggregate report jmeter?
- How to decide the ideal hold time in Ultimate Thread Group in Jmeter
- Advantages of Ultimate Thread group over normal thread group in jmeter
- Is there a way to automate Jmeter to run a number of testplans
- Listeners to visualise results of load test in JMeter
- XMPP sampler not found in jmeter
- How to use ACTIONS class in Jmeter-webdriver.plugin. - Webdriver Sampler.?
- Jmeter-Webdriver Webdriver Sampler - How to execute a script in HtmlUnitDriver?
- How to validate JMeter user defined variables?
- Jenkins - JMeter Plugin - How to compare with Previous build in terms of Average Response time in Seconds
- JMeter - Looping
- JMeter - How to pass data from the CSV Data Set Config to the ForEach Controller
- JMeter - WebDriver Sampler - waitForPopUp
- JMeter: Converting extracted time stamp value to date format
Related Questions in JMETER-5.0
- Jmeter throwing "SocketException: Connection Reset" error on 200 user load test which cant be found in server logs
- Jmeter : How to upload dynamic excel file which has different data and load test with Jmeter
- Run 2 CSV file for 2 HTTP requests in Jmeter
- JMeter - HTTPS proxy recorder - Cannot find keytool application and no keystore was provided
- JMeter WebDriver Sampler doesn't work and doesnt have headless
- JMeter MergeResults is not handling timeStamp label correctly (millis)
- How do I achieve a certain TPS in Jmeter
- In jmeter, can we use few parameters with in what we declared in the HTTP request parameter section
- if controller not working when I use ${status} == true
- Jmeter-Springboot-Mysql-ec2 Hikari connection pool - Connection not available
- NAS Folder Location
- JMeter Script Recording - NTLM Windows Authentication Fails - 401 Error
- jmeter - how to access dynamic array of variables in scripting?
- How to get data from Redis' Hash data structure using JMeter
- Need to encrypt the password using Jmeter
Related Questions in JMETER-4.0
- IE driver browser not working using JSR223 sampler - jmeter
- if controller not working when I use ${status} == true
- JMeter Script Recording - NTLM Windows Authentication Fails - 401 Error
- Jmeter oracle connection issue
- Jmeter Multiple data for update query
- Reuse the HTTP Header Manager in every call
- Jmeter transaction per minute
- Jmeter slave report filter
- Jmeter checkpoint for a specific transaction
- Jmeter remote testing heap size issue
- Jmeter is adding an extra space at the end of input parameter
- jmeter slave connection and configuration error
- Jmeter report generation apdex issue
- Delete cookie in jmeter
- How to add Assertion in JSR223 using java
Related Questions in JMETER-3.2
- How to run multiple .jmx recorded script at one instance on non-gui mode without Maven?
- JMeter, encoding all parameters
- how to update fields of text file , by taking response of previous http request in jmeter
- Jmeter 500 error in TCP
- Jmeter shows error after request takes more than 15 seconds to execute
- NO graph results with jmeter
- Jmeter: how to modify properties on the fly while distributed test is running?
- Jmeter Test Does not Stop
- How to store single result from XPath Extractor
- Stackoverflow error when upgrading to JMeter 3.2
- HTTP Cache Manager not caching request contents
- JMeter: adding extra characters in the payload \r\n
- Java class fields, object use in Beanshell
- output a rest API specific data using jmeter
- JMeter 3.2 source not compiling
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
JMeter doesn't "add" or "remove" anything, if there is a "space" - then it's you who added it.
JMeter GUI doesn't show whitespaces so you can open the test plan with any text/XML editor of your choice (JMeter's JMX scripts are basically XML documents) and see if there is a blank space there.
If the variable comes from an external source (Post-Processor, CSV File or Database) you might want to check it at its source.