1

I tried stress testing with JMeter software to test a web site as it crashed after a sms campaign. Currently site has been moved to a physical server.

I tested multiple times by adding threads, it worked and gave few errors (for above 1000 threads), and worked for 400 threads with no error. So I tried distributed testing with 4 PCs including my one.

After I tried again with only my PC to send requests to the site by adding 400 threads(ramp up = 1 , loop = 1). But each and every requests gives error. Then I tried using 1 thread. Same error was given.

enter image description here

I checked my network connection, and there is no problem. Then I browsed the web site "http://www.myjobs.lk/", and it works fine.

These are the values I have given in testing.

enter image description here

enter image description here

enter image description here

Under this condition, I cannot perform the testing because it always gives errors. How can I overcome this problem?

  • i don't know why error is occurung in your case but in my case this error occurs everytime when my internet connection does not work. Make sure your internet should be working fine. – Däñish Shärmà Mar 28 '16 at 05:52
  • Internet connection is fine and Can access the web site, no problem of it – Tharindu Kandegedara Mar 28 '16 at 05:57
  • @TharinduKandegedara Can you check and show the values you are using for `Server Name or IP` and `Path` fields in `HttpRequest` or `HttpRequestDefaults` screen – Madhusudana Reddy Sunnapu Mar 28 '16 at 06:35
  • You could try to switch the sampler implementation to Java or HTTPClient4 or look at this [Click me](http://stackoverflow.com/questions/27942583/non-http-response-message-the-target-server-failed-to-respond-is-my-server-fai) – Boka Mar 28 '16 at 07:25
  • You don't need to post four screenshots to describe an `UnknownHostExceptuon`. Let me explain. It means that the hostname you tried to connect to is unknown. To the DNS. It's wrong. Fix it, or fix your DNS. – user207421 Mar 28 '16 at 08:40
  • So @EJP Can you give it as a answer. – Tharindu Kandegedara Mar 28 '16 at 08:59

3 Answers3

5

You're using incorrect JMeter configuration, change it as follows:

  1. Remove http:// from "Server Name or IP" input
  2. Put http to "Protocol input

    HTTP Request Defaults

    It is also possible to have the full URL in "Path" field like

    Path in HTTP Request Defaults

    But using "http://" in "Server Name or IP" won't work.

Also once you defined hostname, port, path, etc. in HTTP Request Defaults it will be automatically applied to all HTTP Request Samplers. You will be able to override an option for particular this or that sampler but if you don't - default value will be used. See Why It's SO Important To Use JMeter's HTTP Request Defaults for more detailed explanation and some use cases.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • 1
    I think this is the solution for the IllegalArgumentException caused by putting in a "http://" in the server name or IP from my answer, not the UnknownHostException which was the original question? Or am I wrong? – gustf Mar 28 '16 at 09:24
1

For me it was helpful to setup proxy server: Http Request Defaults-> Advanced

fascynacja
  • 1,625
  • 4
  • 17
  • 35
0

Looks like JMeter tries to connect to myjobs.lk, and you browse to www.myjobs.lk. Try changing so that JMeter also connects to www.myjobs.lk

gustf
  • 1,959
  • 13
  • 20
  • I tried it @gustf , but after that it give another error. I was unable find the problem. I mentioend it in my question. – Tharindu Kandegedara Mar 28 '16 at 08:38
  • I think you now changed it to include "http://", which is not the server name or IP (look at the answer from @Dmitri). I updated my answer with no "http://" to minimize confusion. – gustf Mar 28 '16 at 09:10