Get 404 error code when visiting the third party API .

When I record scripts using gatling-charts-highcharts-bundle-2.1.2-bundle, and then run scrpt and gets error codes 404 for the following request.

There’s probably some auth tokens that can’t be replayed as is and have to be captured in previous responses.

Hi Stéphane

But the same script including the above requests run successfully in 2014-9-14, but yesterday got error 404 when I run the script.

And Google didn’t warn you that they changed something in their APIs? How surprising…

Seems token does not work, I record again, and the new tokens can work well.

Yeah, because the tokens have to be captured as they have a lifespan.

Tracy,

What Stephane is saying that you should capture those tokens using CSS or regex check and use them as param in subsequent requests.

If you need help with that, provide us your code and response and we might be able to point you in the right direction.

Abhinav

Hi Abhinav,
Thank your reply, the following is my code, please help me and point how to using css or regex check.

val uri1 = “maps.google.com
val uri2 = “https://manager-stage.everbridge.net:443
val uri3 = “https://maps.googleapis.com:443/maps/api/js

.exec(http(“request_166”)
.get(“https://” + uri1 + “:443/maps/api/js?v=3.7&sensor=true”)
.headers(headers_2)
.resources(http(“request_167”)
.get(uri2 + “/information/features?_=1422260949315”)
.headers(headers_56)))
.pause(6)
.exec(http(“request_168”)
.get(uri3 + “/AuthenticationService.Authenticate?1shttps%3A%2F%2Fmanager-stage.everbridge.net%2Funiverse&5e1&callback=xdc._4um8vz&token=69014”)
.headers(headers_2)
.resources(http(“request_169”)
.get(uri2 + “/statics/combine/eb_view.universe.js?version=V4.0.0-2015-01-02%2017:18:03”)
.headers(headers_2)))