Stress test Wordpress login page

Hello I’m trying to test a wordpress site where the users have to log in in order to display the content. I recorded the test using the K6 Browser Recorder, but when I run the test. I am getting a lot of dial: connection refused errors for the wp-login.php POST. Does anybody have experience testing the Wordpress log in process?

Thanks

Hello!

A few questions that would help us diagnose:

  • Is the error message inside a HTTP response or displayed in the console?
  • Is the POST request to wp-login.php the very first request in the script?
  • Are you seeing this error with just a single VU (in other words, does it always fail)?

A “connection refused” message generally suggests that a server is there but nothing is accepting connections on whichever port your HTTP requests are headed for (usually 80 or 443).

When I’ve seen this in the past (where you are able to record in the browser but not replay), it is most often due to the presence of a web/filtering/corporate proxy that your browser may be configured to use (fairly common on Windows AD-controlled domains). It could be that k6 isn’t aware of system-level proxy settings, which could explain why it isn’t able to reach out when the browser can. I’ll try to get confirmation on what our default behavior is.

In the meantime, if the site is publicly-accessible, I’d be happy to try a record and replay from my system which isn’t behind any proxies (message me the URL if you’d like to keep it private), just to rule that out.

Hi Tom

Like you mentioned the issue was related to a IP Banning tool in the server. I was able to run the test after whitelisting the IP address.

Thanks for your help.