Follow redirects ?

Hi,

Does anyone have an exemple on how to use .followRedirect ? (https://github.com/excilys/gatling/wiki/HTTP#wiki-follow-redirects)

cheers
Nicolas

Hi,

I’ve updated the documentation:
https://github.com/excilys/gatling/wiki/HTTP#wiki-follow-redirects

Does this help?

Cheers,

Steph

2012/4/5 Nicolas R. <nicolas.remond@gmail.com>

Yup, thanks a lot.

Nicolas

Actually, I still have a question.

Let’s imagine we have an e-commerce website. Then, typically, the payment page gonna be on a different domain.
How can I handle this in Gatling ?

.exec(
http(“Checkout”)
.post("/checkout")
.param(“address”, “Rue de Geneve, Paris”)

.headers(formHeaders)
.check(status.is(200))
// with .followRedirect, I’m expecting to go to a different domain
)
.pause(1, 3)
.exec(
http(“Payment”)
// is this working ? can I put an absolute URL ?
// is there a way to know the URL coming from the redirect ?
.post(“https://superbank.com/epayment”)
.param(“card_type”, “VISA”)

.param(“card_number”, “12345623456”)
.param(“card_expiration_date_month”, “1”)
.param(“card_expiration_date_year”, “2014”)
.param(“card_holder”, “Mr. Robert”)
.param(“card_cvv”, “123”)
.headers(formHeaders)
.check(status.is(200))
)

thanks!
Nicolas

// is this working ? can I put an absolute URL ?

Yes, of course. Please have a look at:
https://github.com/excilys/gatling/wiki/HTTP#wiki-base-url

// is there a way to know the URL coming from the redirect ?

Sorry, I don’t understand.

2012/4/10 Nicolas R. <nicolas.remond@gmail.com>