realbrowserlocusts
realbrowserlocusts copied to clipboard
Maybe integrate this into locust-plugins?
Hi @nickboucart !
I'm one of the maintainers of Locust and the creator of "locust-plugins", a collection of addons for locust.
Before I found your code, I made my own "WebdriverLocust" as part of "my" package (see https://github.com/SvenskaSpel/locust-plugins/blob/66c880057576634711fb3a5ed26c72dde086d942/locust_plugins/users.py#L98 / https://github.com/SvenskaSpel/locust-plugins/blob/master/examples/webdriver.py).
I think yours looks a lot better, with its built in support for multiple browsers and proper timing measurements.
Would you consider contributing it to "my" repo? (released under the apache license). You would of course be credited, and if you want I can add you as maintainer for the repo.
Hi Lars,
Thanks for reaching out.
I’m happy you did, because I’m not using nor maintaining this project anymore. I once needed to do some performance testing of a webapp in really ancient technology, that generated urls on the fly, only way to test that was through a browser... I stumbled upon Locust and immediately loved the syntax and philosophy.
I made this little library, put in on GitHub and actually forgot about it. Every now and than, I get screwiness or a question, each time I feel sorry to not spending more time on it.
If you would like to take over the library as a whole, or part of the code and integrate it in bigger ecosystem of plugins, feel free to do so. In fact, I’d be happy to see that someone who’s more committed to locust would adopt/leverage the code, it will most likely be more helpful than it is now.
What do you think? how can I help you with the transfer?
Hope this helps, Nick
On Sat, 30 May 2020 at 14:34, Lars Holmberg [email protected] wrote:
Hi @nickboucart https://github.com/nickboucart !
I'm one of the maintainers of Locust and the creator of "locust-plugins", a collection of addons for locust.
Before I found your code, I made my own "WebdriverLocust" as part of "my" package (see https://github.com/SvenskaSpel/locust-plugins/blob/66c880057576634711fb3a5ed26c72dde086d942/locust_plugins/users.py#L98 / https://github.com/SvenskaSpel/locust-plugins/blob/master/examples/webdriver.py ).
I think yours looks a lot better, with its built in support for multiple browsers and proper timing measurements.
Would you consider contributing it to "my" repo? (released under the apache license). You would of course be credited, and if you want I can add you as maintainer for the repo.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nickboucart/realbrowserlocusts/issues/12, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVFPKJHA3C6D6726RCLHDRUD4O3ANCNFSM4NOVW4RQ .
Cool! I think this is how a lot of open source projects get started today - it is really nice how easy it is to share your stuff with the world today :)
Could you make a PR to the locust-plugins repo? Put your example into the examples directory and the rest (Locust class) in a single file (maybe realbrowser.py, or webdriver.py).
If you have the time to update it for Locust 1.0 that would be even better! Some things have changed, like ”Locust” classes are now ”User” classes, and your User class should have a property called ”abstract” set to True (otherwise Locust may try to run it as well, even though it doesnt have tasks defined). If you dont have the time, or if you run into trouble, I can help with this.
Feel free to add your name to a comment in the header. ”Contributed by ...” or something.
When it is done, you could replace the contents of your current repo with a readme that points people to locust-plugins instead.
Hi Lars,
Sounds good to me. I'll try to find some time on an evening during this week. I really like this solution and would feel happy with this outcome.
i can't really promise an exact timing (and please, do not hesitate to send me a ping every now and than) , I'll do my best :)
Keep you posted. Nick
On Sun, May 31, 2020 at 7:44 PM Lars Holmberg [email protected] wrote:
Cool!
Could you make a PR to the locust-plugins repo? Put your example into the examples directory and the rest (Locust class) in a single file (maybe realbrowser.py, or replace my webdriver.py).
If you have the time to update it for Locust 1.0 that would be even better! Some things have changed, like Locust classes are now User classes, and your User class should have a property called ”abstract” set to true (otherwise Locust may try to run it as well, even though it doesnt have tasks defined). If you dont have the time, I can help with this.
Feel free to add your name to a comment in the header. ”Contributed by ...” or something.
When it is done, you could replace the contents of your current repo with a readme that points people to locust-plugins instead.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nickboucart/realbrowserlocusts/issues/12#issuecomment-636503944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVFPN65AEP6NUGDXZV23LRUKJPJANCNFSM4NOVW4RQ .
Cool! Thanks! :)
*ping*
@nickboucart ;)
@cyberw I have tried cloning this repository with Locust to User change. I am getting the below exception. Have you come across anything like this when spawning?
locust.runners: Unhandled exception in greenlet: <Greenlet at 0x107a3d488:
Hi! I think it is related to this code:
def __init__(self):
super(RealBrowserLocust, self).__init__()
It should be more along these lines (copied from users.py in locust-plugins)
class SocketIOUser(HttpUser):
abstract = True
def __init__(self, parent):
super().__init__(parent)
(the exception is because of the parent parameter being missing, but you should also add the abstract
property, or you will run into a different problem)
@cyberw Thanks for this. It has worked out.
@cyberw @nickboucart Any updates on the plugin or future news of maintaining this repo?
No news, still waiting for the PR from Nick.
Just to be clear, the PR doesnt need to be perfect, but for copyright reasons I think it makes sense that he makes it.
@nickboucart Any chance you'll have time to look at this?