I have recorded a test plan for Files Upload processs from Blazemeter, still when I try to run it for the second time, get "Bad Request-->400" error - file-upload

I did as follows:
recorded a test script regarding file upload using Blazemeter.
tried to upload another file, so I replaced a new file with the previous one inside the "Jmeter --> Bin" directory.
Before running the script just changed the filename "Parameter -->vale" like the screenshot:
When I run the scripts, it shows error:

This request doesn't look like a proper one to me, my expectation is that the file should go to "Files Upload" folder of the HTTP Request sampler and Use multipart/form-data box should be checked.
I would rather recommend re-recording it using HTTP(S) Test Script Recorder, just make sure to copy the file you're uploading to JMeter's "bin" folder before executing the file upload request in browser. More information: Recording File Uploads with JMeter

Related

java.lang.nullpointer exception in jmeter in Non-GUI mode

When i try to execute my Jmeter (version 5.3) recorded script in Non-GUI mode, using a remote server, it displays a "java.lang.NullPointerException" while generating the dashboard(HTML) report. Also, my CSV file (or jtl report) is creating an empty file without any data.
I have used loop controller to call my http request .
I have added sample variables to my jmeter.properties file so that they can be recorded.
Also , I have set "jmeter.save.saveservice.output_format=csv" in properties file.
The summarizer shows 0 and it shows error in generating report: java.lang.nullpointerexception.
Also, my log file shows the following:
Please let me know if there is any possible way to overcome this issue. Thanks in advance!
You're getting this error because you're trying to generate HTML reporting dashboard from an empty .jtl results file
In its turn the .jtl results file is empty because no Samplers were executed
And finally no samplers were executed because all your Thread Groups are disabled
Open your .jmx script in JMeter GUI
Right click each Thread Group
Choose "Enable" from the context menu
Save the test plan
If for some reason you cannot open JMeter GUI just change this line(s) in the .jmx file:
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="false">
to
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
with your favourite text editor or use Taurus tool which can change any property of any element in the runtime
I re-installed jmeter and the same script worked well for me. Cheers!

upload file for SELENIUM IDE

I want to upload a file to automate a process with Selenium IDE from chrome, I already gave the permissions to the extension, however I get the following error yet.
The way I'm loading the file is as follows:
Command: type
id= txtFile
Value: C:\fakepath\factura.xls
Failed:
Unable to upload files due to cross origin frames in the page
https://i.stack.imgur.com/LNUqH.png
ist because of the Fakepath
You need to insert the direct path.
You can look it up by making a left click in the Explorer on the document.
The path should be visible now

Blazemeter (JMeter test) zip file upload fail

I get Non HTTP response message: /home/jmeter/my_file-to-upload.zip (No such file or directory) when uploading zip file in BlazeMeter.
But logs state that file is stored as expected INFO o.a.j.s.FileServer: Stored: /home/jmeter/my_file-to-upload.zip
I added test file along with jmx file when creating test as instructed here. Also, have gone through BlazeMeter blogs and tutorials, nothing helped.
This test works perfectly fine executed locally or in Team Service, but I need it in BlazeMeter.
Blazemeter platform automatically extracts any zip file that is being uploaded, and thats the reason your test is unable to find the required file.
As a workaround, you can upload the file in a different format, and change the upload path to match the new file format.
For example: Change the zip format to gzip, and change the upload path in your script to be /home/jmeter/my_file-to-upload.gz instead of /home/jmeter/my_file-to-upload.zip.
If there are other questions we can help with, feel free to contact us at support#blazemeter.com
Blazemeter Support Team

JMeter Test Results Monitoring/ Analysis

I want to start load testing by running JMeter from command line for more accurate test results, but how can I monitor the run and then analyze the results after the test finishes.
You can generate JTL (JMeter results) file while executing the JMX (JMeter script) file from command line. A sample command for generating JTL file will look like this..
jmeter -n -t path-to-jmeterScript.jmx -l path-to-jtlFile.jtl
After completion of script execution you can open the JMeter GUI and simply open the JTL file in any listener (as per your requirement).
Most of the listeners in JMeter have an option to save the results into a file. This file contains usually not the report itself, but the samples which are generated by the tests. If you define this filename, you can generate the reports using these saved files. For example see http://jmeter.apache.org/usermanual/component_reference.html#Summary_Report .
If you run JMeter in command-line non-GUI mode passing results file name via -l parameter it will output results there. After test finishes you will be able to open the file with the Listener of your choice and perform the analysis.
By default JMeter writes results in chunks, if you need to monitor them in real time add the following line to user.properties file (lives under /bin folder of your JMeter installation)
jmeter.save.saveservice.autoflush=true
You can use other properties which names start with jmeter.save.saveservice.* to control what metrics you need to store. The list with default values can be seen in jmeter.properties file. See Apache JMeter Properties Customization Guide for more information on various JMeter properties types and ways of working with them.
You can also consider running your JMeter test via Taurus tool - it provides some statistics as the test goes either in console mode or via web interface.

How upload file to Pentaho User Console server?

I need :
1) Let the user select a file from his local pc
2) Upload that file to the pentaho server
3) Process the file using a kettle transformation
I tried with a csv data source in Pentaho User Console (PUC) 5.0 but found no way to access it from a .ktr file uploaded to PUC repository. I also try to upload the csv file to a folder and still not able to access it from a .ktr file.
I think this requirement is valid :
Upload a csv data file and .ktr file to PUC folder. The .ktr should be able to read the uploaded csv file when it is executed from PUC
Imagine a simple user, with a csv. Will he be able to upload csv file to linux host using wincsp, filezilla or another ftp tool??
We need to give an easy upload functionality to our user, so after several researching hours (pentaho source code) without one line of Pentaho documentation, I found this test:
https://github.com/pentaho/pentaho-platform/blob/master/extensions/src/test/java/org/pentaho/platform/plugin/services/importer/PlatformImporterTest.java that showed me that a mimetype list should be exist somewhere.
So after search some words in all pentaho folder wiht grep command, I found this file:
/my_apps/pentaho-server-ce-7.1.0.0-12/pentaho-server/pentaho-solutions/system/ImportHandlerMimeTypeDefinitions.xml
With some intuition, I added this xml
<ImportHandler class="org.pentaho.platform.plugin.services.importer.RepositoryFileImportFileHandler">
<MimeTypeDefinitions>
<MimeTypeDefinition mimeType="text/plain" >
<extension>csv</extension>
</MimeTypeDefinition>
</MimeTypeDefinitions>
</ImportHandler>
At the bottom of file:
<tns:ImportHandlerMimeTypeDefinitions xmlns:tns="http://www.pentaho.com/schema/" .....
<ImportHandler ../>
<ImportHandler ../>
<!-- PUT CSV CONFIG HERE -->
</tns:ImportHandlerMimeTypeDefinitions>
Finally, I restarted my pentaho-server-ce-7.1.0.0-12 server and I was able to upload my csv file with this steps :
go to http://localhost:8080/pentaho
click en browse files
select some folder
click in upload (right side)
select csv and ok
Read this csv file from ktr is pending...
I hope this helps