-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URLs with #
in them are not evaluated
#433
Comments
#
in them are not tested#
in them are not evaluated
It looks like the default HTTP client for Locust.io is 'requests', which does not support JavaScript interactions (it runs by sending pure HTTP verbs GET/POST to the server). I imagine this is the root cause of the issue you are seeing. Angular JS probably never sees the actions taken by Locust.io, since JavaScript events are not triggered. (# is usually used by JS frameworks such as Angular as a form of navigation within a page, by binding to JavaScript events on document.location.) Setting up Selenium (http://selenium-python.readthedocs.io/) as a Locust HTTP client would likely resolve the issue. (Selenium does support JavaScript interactions, by passing all interactions through a browser instance). At this moment, I have no idea how to set up Selenium as a Locust.io HTTP client. I stumbled across this issue while looking to see if anyone else has. If I run across anything promising in my search, I will come back and link it from here for your reference. |
Following the recipe at http://docs.locust.io/en/latest/testing-other-systems.html, but using Selenium, may solve this for you.
In theory, anyway. |
driving multiple browsers via selenium is a bad idea if you want any sort of realistic performance results. |
The hash fragments part of the URL is only displayed in browsers, and never sent to the server. You won't be able to simulate more than a few simultaneous users if you run a Selenium browser for each user, and the results won't be realistic like @cgoldberg says. My recommendation would be to make requests to the actual URLs which Angular requests behind the scenes (you can see these requests in the network tab in the developer tools of Chrome or Firefox). |
Thanks all--makes sense |
I have an Angular app I'm testing, and any URL I add to the locustfile that has a
#
symbol in them are ignored.The text was updated successfully, but these errors were encountered: