0 likes | 62 Views
Dive into the technical intricacies of utilizing Locust for load and performance testing. This guide unveils practical approaches to optimize system performance and ensure robustness under varying workloads.
E N D
Quality.Catalyzed Performance Testing Using DYNAMIC DATA WITH CSV To add flexibility to your load tests, you can use the CSV Data Set Config to insert dynamic data such as usernames and passwords. “You can give various virtual users dynamic login credentials by using the CSV Data Set Config element.” www.testrigtechnologies.com
Quality.Catalyzed #This class contains on_start() method which is used to read csv file and return data read from csv file #HttpUser: A class that defines a virtual user for your load test #on_start: A method that gets executed before any tasks start. Here, it's used to load data from a CSV file. #This class contains test case for each test case we have method for eg: def login_with_credentials() method for login test #wait _time: Specifies the time between consecutive requests made by virtual users. www.testrigtechnologies.com
Quality.Catalyzed #calling on_start() of MyUser class which helps to read data from csv and returned data we are collecting here in data #Loop through the loaded data #Make the POST request to login with credentials email and password # Check the response and handle it accordingly, here we are only asserting status code of login api response which is 200(OK) www.testrigtechnologies.com