Closed Angi2412 closed 3 years ago
I think @jo102tz used locust with the Teastore, maybe he can dig up his scripts.
The browse load profile traverses the following URLs:
http://TeaStoreIP/
Loads the landing pagehttp://TeaStoreIP/login
Visits the login pagehttp://TeaStoreIP/loginAction?username=user1&password=password
Login request, with a random user number in the range [1-90]http://TeaStoreIP/category?page=1&category=ID
visit random category page (category IDs can be extracted from the previously returned html)http://TeaStoreIP/product?id=ID
visit random product page (product ID can be extracted from the previously returned html)http://TeaStoreIP/cartAction?addToCart=&productid=ID
add random product to the cart (same ID as previous request)http://TeaStoreIP/category?page=1&category=ID
visit random category page (category IDs can be extracted from the previously returned html) http://TeaStoreIP/category?page=X&category=ID
visit random page for previous category (page numbers can be extracted from the previously returned html) http://TeaStoreIP/cartAction?addToCart=&productid=ID
add another random product to the cart (same ID as previous request)http://TeaStoreIP/profile
Look at user profile http://TeaStoreIP/loginAction?logout=
Logout againThe buy profile extends this behavior by executing http://TeaStoreIP/cartAction?firstname=User&lastname=User&address1=Road&address2=City&cardtype=volvo&cardnumber=314159265359&expirydate=12/2050&confirm=Confirm
between steps 10/11.
I hope this helps, let me know if you have any further questions.
In case you end up reimplementing this behavior in locust, feel free to open up a pull request that adds it to the examples folder.
Thank you very much for your fast response. This was very helpful. I reimplemented the behaviour with minor differences: the category, product and page ids are chosen randomly as well as the number of possible products in the cart based on settings from the database (for now this has to be entered manually). Is there an API request to get this information?
I will test the implementation further and then open a pull request :)
Unfortunately, I can not find our locust script anymore. However, feel free to share it, if yours runs well. :)
Minor update to previous URLs, I think they are all missing a /tools.descartes.teastore.webui/
such as:
http://TeaStoreIP/tools.descartes.teastore.webui/profile
For the number of products/categories, you could get that from the persistence API. I think the URL looks something like this:
http://PersistenceIP/tools.descartes.teastore.persistence/rest/categories
http://PersistenceIP/tools.descartes.teastore.persistence/rest/products
http://PersistenceIP/tools.descartes.teastore.persistence/rest/users
However, I can't test right now if these URLs are correct, you can find the underlying implementation here: https://github.com/DescartesResearch/TeaStore/tree/master/services/tools.descartes.teastore.persistence/src/main/java/tools/descartes/teastore/persistence/rest
Thank you 👍
Hello,
I want to use the application in my thesis and don't have experience with JMeter or the other load generating tool. So, I wondered if there is a converted version for locust.io available? Or would it be possible to describe the structure of the implemented user behaviour (with URLs)?
Thanks!