Discussion:
Invoking local file
krish na
2018-08-10 08:51:30 UTC
Permalink
Hi All,
i try to invoke my local json file by following below steps.
1. in HTTP Request - server name or ip - file and path is E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
When i run the scripts i got the below error:
Response code: Non HTTP response code: java.net.URISyntaxExceptionResponse message: Non HTTP response message: Illegal character in path at index 14: http://file/E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
I tried using _urlencode
E%3A%5CKrishna%5Capache-jmeter-4.0%5Capache-jmeter-4.0%5Cbin%5CSampleJson.json

Output is below:Response code: Non HTTP response code: java.net.UnknownHostExceptionResponse message: Non HTTP response message: No such host is known (file)
2. Used JSR223preprocessor with below groovy scripting:org.apache.jmeter.config.Arguments args = sampler.getArguments()sampler.getArguments().removeAllArguments()args.each {    sampler.addEncodedArgument(it.getName(), it.getValue())} Output:Response code: Non HTTP response code: java.net.URISyntaxExceptionResponse message: Non HTTP response message: Illegal character in path at index 14: http://file/E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
3.Tried to update encode value as True but the tag itself is missing in the .jmx file.

<boolProp name="HTTPArgument.always_encode">false</boolProp>
Any help will be much appreciated.
Regards,
Krishna - +91-9884451279.


CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype
krish na
2018-08-10 09:08:21 UTC
Permalink
Adding few more options:
1. Tried to update client implementation as HttpClient4 and the output is below:
Response code: Non HTTP response code: java.net.URISyntaxExceptionResponse message: Non HTTP response message: Illegal character in path at index 14: http://file/E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
2. Tried to update client implemenation as HttpClient4 and the output is below:
Response code: Non HTTP response code: java.net.UnknownHostExceptionResponse message: Non HTTP response message: file
Looking for support to resolve the above issue.
Regards,
Krishna - +91-9884451279.

CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype

On Friday, 10 August, 2018, 2:21:43 PM IST, krish na <***@yahoo.in.INVALID> wrote:

Hi All,
i try to invoke my local json file by following below steps.
1. in HTTP Request - server name or ip - file and path is E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
When i run the scripts i got the below error:
Response code: Non HTTP response code: java.net.URISyntaxExceptionResponse message: Non HTTP response message: Illegal character in path at index 14: http://file/E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
I tried using _urlencode
E%3A%5CKrishna%5Capache-jmeter-4.0%5Capache-jmeter-4.0%5Cbin%5CSampleJson.json

Output is below:Response code: Non HTTP response code: java.net.UnknownHostExceptionResponse message: Non HTTP response message: No such host is known (file)
2. Used JSR223preprocessor with below groovy scripting:org.apache.jmeter.config.Arguments args = sampler.getArguments()sampler.getArguments().removeAllArguments()args.each {    sampler.addEncodedArgument(it.getName(), it.getValue())} Output:Response code: Non HTTP response code: java.net.URISyntaxExceptionResponse message: Non HTTP response message: Illegal character in path at index 14: http://file/E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
3.Tried to update encode value as True but the tag itself is missing in the .jmx file.

<boolProp name="HTTPArgument.always_encode">false</boolProp>
Any help will be much appreciated.
Regards,
Krishna - +91-9884451279.


CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype
ZK
2018-08-10 09:25:26 UTC
Permalink
Hi,
the problem is in the path to your json file

Try this with the HTTP Sampler:

Protocol = file
Server Name or IP = ///
Method = GET
Path = E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json

Implementation <BLANK> <- meaning empty field (maybe under 'advanced tab')




ZK




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@jmeter.apache.org
For additional commands, e-mail: user-***@jmeter.apache.org
krish na
2018-08-10 09:31:25 UTC
Permalink
Excellent thanks its working fine.
Regards,
Krishna - +91-9884451279.

CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype

On Friday, 10 August, 2018, 2:55:34 PM IST, ZK <***@gmail.com> wrote:

Hi,
the problem is in the path to your json file

Try this with the HTTP Sampler:

Protocol = file
Server Name or IP = ///
Method = GET
Path = E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json

Implementation <BLANK> <- meaning empty field (maybe under 'advanced tab')




ZK




--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@jmeter.apache.org
For additional commands, e-mail: user-***@jmeter.apache.org
Jmeter Tea
2018-08-12 07:16:30 UTC
Permalink
Thank you ZK
Post by krish na
Excellent thanks its working fine.
Regards,
Krishna - +91-9884451279.
CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype
On Friday, 10 August, 2018, 2:55:34 PM IST, ZK <
Hi,
the problem is in the path to your json file
Protocol = file
Server Name or IP = ///
Method = GET
Path = E:\Krishna\apache-jmeter-4.0\apache-jmeter-4.0\bin\SampleJson.json
Implementation <BLANK> <- meaning empty field (maybe under 'advanced tab')
ZK
--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html
---------------------------------------------------------------------
g***@live.com
2018-08-13 06:42:33 UTC
Permalink
You don't need this "http" URL scheme as you're working with the local file,
file:///E:/Krishna/apache-jmeter-4.0/apache-jmeter-4.0/bin/SampleJson.json
Going forward be aware that there is a Dummy Sampler
<https://www.blazemeter.com/blog/jmeters-dummy-sampler-the-ultimate-guide>
which allows you to mimic arbitrary responses. You can use it in combination
with __FileToString()
<https://jmeter.apache.org/usermanual/functions.html#__FileToString>
function in order to return the content of the local file.

Dummy Sampler can be installed using JMeter Plugins Manager
<https://jmeter-plugins.org/wiki/PluginsManager/>



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@jmeter.apache.org
For additional commands, e-mail: user-***@jmeter.apache.org
krish na
2018-08-13 06:46:50 UTC
Permalink
Thanks its working fine.
Regards,
Krishna - +91-9884451279.

CallSend SMSAdd to SkypeYou'll need Skype CreditFree via Skype

On Monday, 13 August, 2018, 12:12:39 PM IST, ***@live.com <***@live.com> wrote:

You don't need this "http" URL scheme as you're working with the local file,
file:///E:/Krishna/apache-jmeter-4.0/apache-jmeter-4.0/bin/SampleJson.json
Going forward be aware that there is a  Dummy Sampler
<https://www.blazemeter.com/blog/jmeters-dummy-sampler-the-ultimate-guide> 
which allows you to mimic arbitrary responses. You can use it in combination
with  __FileToString()
<https://jmeter.apache.org/usermanual/functions.html#__FileToString> 
function in order to return the content of the local file.

Dummy Sampler can be installed using JMeter Plugins Manager
<https://jmeter-plugins.org/wiki/PluginsManager/>   



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-***@jmeter.apache.org
For additional commands, e-mail: user-***@jmeter.apache.org

Loading...