How to click on button during the test

I just started do some tests with Gatling. And I didn’t have any background with stress testing. So I begin with simplest test, like login on page, click on button accounts, see accounts list and logout.

In RecordedSimulation I saw, that Gatling recorded click on button “Accounts” like .post(“accounts/accounts-list.xtml”) and during testing this request always fail.

I try check accounts with recorded URL and got “Internet Explorer cannot display the webpage”, it because on testing page you really couldn’t check your account by URL, but just clicking on button “Accounts” on the main page. Can I in any manner click on button, without going in accounts list by recorded URL?

Thank You in advance!

I’m very sorry, I don’t want to appear rude, but your explanations are not very clear.

Could you provide your recorded Simulation, the Simulation you might have edited, and the console output when you lower the log level to DEBUG (see, please?


Hi Natalja,

I first, would like to make something clear: Gatling is a load-testing tool that works on the HTTP level. So, there isn’t at all any concept of “click” within this tool. Is this what you want to do?

Then, for trying to help you, would it be possible to access the website you’re testing ?
Can we see the recorded simulation and the associated error ?



as you can see it is a POST request and so if you just open that url through browser, browser will always send a GET request. That is why you are getting that “page can not be displayed” thing.

Also, Gatling works differently than you are thinking, Gatling records each requests sent from browser when you perform any operation like button clicks or something…
Now when you execute the scenario, it doesn’t care about the button, it just sends the same request.

If you are interested in UI interactions, that is something called automation testing and done by tools like Selenium which actually open and ‘drives’ a browser(click on button). Gatling is for generating load, and it does not render the response or any other interaction.

Now, You can debug with lowering the logging levels in logback.xml to capture what response you are getting, mostly you will have to edit the recorded scenario by providing some parameters dynamically like session tracking hidden values and stuff like that.

Thank you for the answers!
I understand how work Gatling, I just (my bad and my experience gap in stress testing) didn’t know scala at all and modify my recorded scenario just using tutorial :frowning:
I’ll study gatling wiki one more time more carefully.