Question about checks in scenario

Hi!

I just run my first stress test with Gatling (BTW great tool, thank you for this!).
In my scenario I have following check:
val chain_login = execWithStdChecks(http(“Login request”)
.post("/example.com/login.html")
.param(""“login”"", “${username}”)
.param(""“passwd”"", “${password}”)
.check(
regex(""“failure”"").notExists
)

During the some of the users didn’t login.
The log was:
request was:
POST https://example.com/login.html
Connection: [Keep-Alive]
Accept: [/]
Accept-Language: [en-us]
Accept-Encoding: [gzip, deflate]
User-Agent: [Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)]
params=
defaultlocaleid: [2]
passwd: [somepass]
login: [user67]

Hi,

First of all, your application responds to a login.html failure with a status code 200 and a XML body. This should be treated as a bug: the status code should be 403 or 500 depending on the failure type, and the body HTML.

As I understand, most user/password couples do succeed.
I can guess 2 possible explanations:

  • if the failing couples are random, this is most likely to be an application failure under stress
  • if the failing couples are always the same, I suggest you might have login/password that use special characters that are not properly encoded. Gatling’s default is UTF-8 and you can change that in gatling.conf. If so, beware that your files (feeders, request bodies, etc) must use this same encoding.
    Let me know if that helps.

Cheers,

Stéphane

Hi, Stéphane!

I’ve just check all my failing users and seems, that they all for some reason was banned from system.
So trying to login they stay on login page (with status 200) with error message in tags failure.
I speak with our developers and they told me, that if even system will be down, on login page user almost always will see page with status 200, but with error message (it depends of error and may differ, but tags failure always will bee present). So i have to catch this errors.
May bee I can somehow improve my previous simple check?
.check(
regex(""“failure”"").
notExists

Regards
Natalja

What’s the problem exactly: some of the users fail to login, yet your check doesn’t fail?

There’s something very weird: the response page looks like XML, yet it’s invalid: there’s kind of blanks in the opening parts that make the closing parts not match:

Could it be that this character is actually no ASCII, while you set a regular space in your regex?

What’s the problem exactly: some of the users fail to login, yet your check doesn’t fail?

Yes

Could it be that this character is actually no ASCII, while you set a regular space in your regex?

I will recheck this one more time