Stefan van der WOlf
Stefan van der WOlf

Reputation: 13

Testing a Vaadin Website with JMeter

I need to test a Vaadin website with JMeter but I can't get it to work. I have tried recording my actions with a proxy and that went well, but when i try to run the test again it gives me an error: out of sync. I have disabled the xsrf.

Has this something todo with the fact Vaadin can't run in two tabs at the same time? I am using vaadin 6 and i can't easily upgrade.

Thanks in advance Stefan

the error response i get is:

for(;;);[{"changes":[], "meta" : {"appError": {"caption":"Out of sync","message" : "Something has caused us to be out of sync with the server.Take note of any unsaved data, and click here</u> to re-sync.","url" : null}}, "resources": {}, "locales":[]}]

Solution: - Disable xrsf because when you record and then start a new thread the request is sends the wrong security key. Enable it when going live ofcourse! - Make sure ever component is unique and consitent. The problem in my application was that the id's of the components were changing every request. So the request when recording is only validate while recording. When i replayed it, it asks for the wrong id. By making it unique and consitent this problem dissapears!

Good luck and have fun ;)

Upvotes: 1

Views: 2247

Answers (2)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34516

Read this:

Issue might be in disabling XSRF.

However, scripting Vaadin application is not easy as there are a lot of technical ids to correlate to create a successful simulation.

Either you do correlation manually which will require some work or you can use this commercial plugin for JMeter.

Note that disabling XSRF is only a part of the problem and will not solve all issues. And disabling it will not make application ISO-PROD.

Disclaimer : We are providers of this solution

Upvotes: 1

vernjan
vernjan

Reputation: 371

in case you cannot disable XSRF protection, automatic correlations feature of SmartMeter (based on JMeter) is the solution. While recording the test, it will automatically parse XSRF tokens from responses and use them in subsequent requests. Here is a detailed guide.

Upvotes: 0

Related Questions