I have created a jmeter script. In the advanced tab of the 'HTTP Defaults' I have mentioned the proxy server, port, username/password. When I run this script through jmeter in the corporate network it runs without any issue. Also when I ran this test with this jmx file through Taurus, it ran without any issue (bxt myScript.jmx).
After this I converted the .jmx to .jmx.yaml through the tool jmx2yaml. In the .jmx.yaml script the proxy details were not mentioned. So I mentioned the same in the file .bzt-rc like below
# General Settings
settings:
default-executor: jmeter # if you prefer using other executor by default - change this option
artifacts-dir: ~/bzt-artifacts/abc/%Y-%m-%d_%H-%M-%S.%f # change the default place to store artifact files
check-updates: false # check for newer version of Taurus on startup
check-interval: 1s # interval for Taurus engine to check test status and do other actions
proxy: # custom proxy settings
address: http://proxyserver:port # proxy server address
username: myUser # username and password used if authentication is configured on proxy server
password: myPass
Now when I run the command 'bzt myScript.jma.yaml', I get the below exception. Please can you help me solve this issue ?
java.net.UnknownHostException:
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.jmeter.protocol.http.sampler.hc.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:318)
at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:114)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:610)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:697)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:455)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1189)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1178)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
at java.lang.Thread.run(Unknown Source)
I am using Taurus with Jmeter 4.0.