I Work on an Vaadin 10 Project and we want to perform an Load Test on our Website befor we used Vaadin 10 we could do that with Jmeter but with Vaadin 10 it seems that it doesnt work with Jmeter
We Tryed using Jmeter 5.1.1 and recorded the testcase the first problem was the csrf Toaken and the push id, both could get extracted with an regular expression extractor and we put them in the Body Data
{"csrfToken":"${csrf}","rpc": [{"type":"mSync","node":5,"feature":1,"property":"invalid","value":true}]," syncId":0,"clientId":0}
as far as i could see at least that worked but the only result we get back is an html site with "You have to enable javascript in your browser to use this web site."
does anyone know if there are better ways to perform an load test on an vaadin 10 application or how to get it working with jmeter?
most answeres i found until know are for vaadin 8 or 7, butn none for vadin 10+
Yes, it is possible to use JMeter for load test Vaadin 10+ applications. You should be able to use following regex for extracting the csrf token:
Vaadin-Security-Key":"(.+?)"
A screenshot of my JMeter when testing against Vaadin 13 Bakery app starter:
In addition to JMeter, Gatling is also a good option when scalability testing Vaadin (any version) applications. There is a quite good example Gatling test script in Bakery App starter for Vaadin 13: https://vaadin.com/start/latest/full-stack-spring See the path: \src\test\scala\BaristaFlow.scala of the project.
Edit:
I uploaded a small but fully functioning JMeter test against V13 application (the same Bakery Flow starter) here: https://gist.github.com/johannest/593309e31e35789f8e5b03bed074f13c
The example script shows the csrf token extract, but also how to extract component ids (such as an id used for the "New" button) and client and sync ids. Extracting these ids and using them as variables in the following requests (instead of using recorded ids) makes your test more stable.
来源:https://stackoverflow.com/questions/56167860/how-to-perform-an-load-test-performance-test-with-vaadin-10-is-it-possible-with