I'm using JMETER to test my own odoo modules performance, but it cannot log and give me an error of Bad request csrf token in web/login. however i search for it and i found that already csrf=false in route, and this success in odoo 10 but now i'm using odoo 11 and this is not success. is any change happen for csrf token disable in odoo 11?
0
votes
1 Answers
0
votes
Looking into How to disable CSRF protection ticket:
the parameter is
csrf=False
to set on the route. However, it implies redefining all routes, which I guess is not what you want...I don't see an easy way to disable CSRF and this is not something I would recommend anyway.
So my expectation is that you should implement "normal" correlation in your script, to wit build it as follows:
- Request #1 - open login page
- Extract the CSRF token using a suitable JMeter PostProcessor
- Request #2 - perform the login. You will need to replace recorded token with what you extracted in the previous step
Check out How to Load Test CSRF-Protected Web Sites article for more detailed explanation and example implementation.