1
votes

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 ;)

2
It suddenly just worked. The article you provided i have allready read it but it didn't do the trick for me. In the article it said i should disable xrsf but i did it in a different way and now all is working fine. Sorry for late response. Your article did provide a help in my solution so you will get the best answere trophy thingStefan van der WOlf

2 Answers

1
votes

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

0
votes

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.