Getting Unknown Host Exception in JMeter while testing web application - testing

I am getting Unknown Host Exception every time I use J meter for web testing. I can only access https sites in my company and I am not allowed to change proxy settings as its disabled in my office.

You don't need to change your machine proxy settings in order to be able to use JMeter, you need to make JMeter aware of your company proxy
The options are in:
You can pass your corporate proxy settings via command-line options each time you run JMeter like:
jmeter -H your_corporate_proxy_host -P your_corporate_proxy_port
You can add the next lines to JMeter system.properties file (lives in "bin" folder of your JMeter installation)
http.proxyHost=your_corporate_proxy_host
https.proxyHost=your_corporate_proxy_host
http.proxyPort=your_corporate_proxy_port
https.proxyPort=your_corporate_proxy_port
Replace your_corporate_proxy_host and your_corporate_proxy_port with real values of your company proxy (if you don't know the details - contact your network administrator)

Related

Facing issue in authentication

I am doing performance testing for restricted websites using jmeter, so I made changes in Krb5.conf , jass.conf files and now I am able to record and replay the applications but for one application during replay 401 unauthorized error is coming. Need your suggestions please
Without knowing your domain/KDC configuration it is not possible to come up with the HTTP Authorization Manager and associated files setup instructions.
First of all enable Kerberos debugging in Java, it can be done my adding the next line to system.properties file (lives in "bin" folder of your JMeter installation)
sun.security.krb5.debug=true
JMeter restart will be required to pick the property up.
Once you will get more information regarding what exactly fails and where - you will be able to amend JMeter configuration accordingly.
References:
Introduction to JAAS and Java GSS-API Tutorials
Kerberos Throubleshooting
Windows Authentication with Apache JMeter

jmeter + influxdb backend: howto specify user name and password?

I could not find any authorization GET parameter in the influxdb docs. ( https://docs.influxdata.com/influxdb/v1.5/guides/writing_data/ )
I see no way of specifying user name and password. I cannot disable authentication because the influxdb server is a live server that is public and available on the internet. I'm not able to move this server to a local machine, because I want (actually I must) run jmeter in paralel from many machines, and send all results to the same database for later aggregation.
Maybe I could setup an ssh tunnel, but that is too bad - I need to run jmeter on many machines, and it would really be painful to setup new ssh tunnels + disable influxdb auth + add firewall rules etc. during the test, then restore everything to normal, then do it again when I need to test again...
As per this doc try setting url to:
http://127.0.0.1:8086/write?u=todd&p=influxdb4ever

file then how to run jmeter script for load testingHow to run jmeter laod testing if add ip address in hosts?

Jmeter load testing if add ip address in hosts file.i have already tried in host file configuration
I believe you should add DNS Cache Manager to your Test Plan, it has Static Host Table feature which can be used as the equivalent of hosts file manipulation on OS level
See The DNS Cache Manager: The Right Way To Test Load Balanced Apps article for more details.

Integrating liferay tomcat with apache web server

I am trying to integrate the liferay tomcat with apache web server.I successfully integrate the liferay with web server.
Condition:
Life ray deployed on ip say : 10.10.10.70
Apache web server on ip say: 10.10.10.80
I provided all the requirement virtual host requirement in httpd.conf file..and provided the web.server.host in portal-ext.properties file.
Problem: When i run liferay portal i can open it on ip: 10.10.10.70
but when i click on any page link (let say /home)that is present in my portal it moved the request to
10.10.10.80:8080/home instead of 10.10.10.70:8080/home
I want to know how to handle this condition.
Because i dont have any page resource on web server doc folder only contain static css..
You might be a bit more precise what "all the required virtual host settings" are, e.g. what did you configure?
Note that by explicitly configuring hostnames/IP-addresses, you're explicitly overriding the autodetected settings from the request - no matter how you get to your portal, Liferay will generate URLs based on the explicitly configured hostname/port.
What's the point in having an Apache in front and then trying to reach tomcat through the non-apache IP/Port? Typically you might have static resources, rewrites, caches on Apache, so that you'll get different results when you alternatively access tomcat through both URLs.
If you configure Apache to "properly" handle the requests before tomcat sees them, you'll typically not need to configure Liferay at all, because Apache will make the actual hostname that it's requested under available to Tomcat. I'm typically using mod_jk for this and it beautifully handles all the configuration with almost no need to explicitly configure tomcat/liferay. If you don't like this, keep in mind that you're explicitly configuring Liferay for the virtual host setup - naturally this explicitly configured name is what Liferay uses. It would be weird if the explicit value would not be used, right?

Change hosts file on Jenkins executor node

We are planning to migrate our java web application build environment to Cloudbees but one aspect is currently blocking us. We are developing a multi-tenant application. It uses host subdomain to identify tenants and we use wildcard dns entries to do that in production (e.g. : *.example.com).
In development, we have hardcoded a few entries in our hosts file to mimic that. Those entries are enough to run our tests :
...
127.0.0.1 test1.app.dev
127.0.0.1 test2.app.dev
127.0.0.1 test3.app.dev
127.0.0.1 test4.app.dev
So basically, Jenkins should set the hosts file, then launch our app using our web container locally. Then the test suite is executed against the running web app.
I tried to add a pre-process step in the Jenkins project configuration to edit the hosts file but as expected, the Jenkins job does not have permission to do that.
Is there a way to change the hosts file before my test suite is run? Or is there something else we could do to simulate wildcard dns entries?
You could use the xip.io service from 37signals:
http://37signals.com/svn/posts/3191-announcing-pow-040-with-xipio-support
Thus your host names would be
test1.127.0.0.1.xip.io
test2.127.0.0.1.xip.io
test3.127.0.0.1.xip.io
test4.127.0.0.1.xip.io
I'd personally try and keep these in a centrally configured area, just in case the xip.io service was decommissioned, but it's probably fairly cheap to operate and so should be around for a while at least.