Here’s the json that is being returned by the service:
{
“aboutMe”:“You won’t like me if I’m on fire”,
“acceptedTerms”:“true”,
“dob”:“2000-01-01”,
“email”:“bobby.tables@example.com”,
“firstName”:“Smokey”,
“gender”:“M”,
“lastName”:“Tester”,
“phone”:“5555555550”,
“userName”:“smokey”
}
Here are the checks I’m doing:
http(“Check All Demographics”)
.get("/p/demographics")
.check(status is 200)
.check(jsonPath("$.firstName") is (“Smokey”))
.check(jsonPath("$.lastName") is (“Tester”))
.check(jsonPath("$.userName") is (“smokey”))
.check(jsonPath("$.dob") is (“2000-01-01”))
.check(jsonPath("$.gender") is (“M”))
.check(jsonPath("$.email") is (“bobby.tables@example.com”))
.check(jsonPath("$.phone") is (“5555555550”))
.check(jsonPath("$.aboutMe") is (“You won’t like me if I’m on fire”))
.check(jsonPath("$.acceptedTerms") is (“true”))
Here’s the failure from simulation.log:
UPS Test 7252415221058156663-9 REQUEST UPS Test Check All Demographics 1389701348744 1389701348744 1389701348801 1389701348801 KO jsonPath($.email).is: (bobby.tables@example.com) failed: found Sun Nov 30 00:00:00 EST 2 https://dsx-dev.weather.com/p/demographics 200 {“aboutMe”:“You won’t like me if I’m on fire”,“acceptedTerms”:“true”,“dob”:“2000-01-01”,“email”:“bobby.tables@example.com”,“firstName”:“Smokey”,“gender”:“M”,“lastName”:“Tester”,“phone”:“5555555550”,“userName”:“smokey”}
I have a fix and proposed a pull request for the Boon parser.
I’ll have to wait for owner’s feedback before merging, releasing this dependency, and then push on Gatling’s master.
It will take a few hours at least, sorry.
As a workaround, you can build Boon on your own: https://github.com/RichardHightower/boon
There’s already a temporary fix in master there.
We’re using gatling in our CI environment, and I’d prefer not build another tool/dependency from scratch.
When 2.0.0-M4 rolls out, I probably should look at rolling over to the Jenkins plugin at that point. Right now, I’m doing some awesome bash scripting to run gatling and report D-:
I’m okay with their being nothing in the array - I just want the count to be 0.
I’ve got a slew of tests to write for a surprise deadline, so I can’t spend time debugging this right now. If you have anything specific you’d like me to check and report back, let me know.
Well, half the extactors were returning None, and the other half Some(0). I made Some(0) the standard behavior but this might be stupid… Will change the other way later tonight.
I’ve fixed the parser issue (weird date), change the count behavior so that it returns Some(0) instead of None.
jsonpJsonPath seems to be working fine, maybe it was also fixed.
Well, it looks like all of my jsonPath checks are passing now.
However, all of my jsonpJsonPath tests are still failing.
Attached is a screenshot from IDEA of the memoizedPrepared structure in memory.
You can see in the screenshot that in the response, body has children. However, IDEA is reporting “Invalid evaluation expression”. I’m not sure what’s up with that - if that’s the problem or just an IDEA-ism.
the body field has a sibling field, status, which has a value of 200
{“body”:{“ZFHdr”: { … more fields … }, “ZFData”: { … more fields … }}, “status”: 200}