Data-driving Your Load Tests with LoadUIWeb
Varying the data sent to your server is a critical component to building realistic load tests for two reasons: 1) we want to build tests that are as close to what real users are doing, and 2) some sites or apps don’t like the same data submitted more than once, maybe due to database constraints or business rules.
Sometimes it’s necessary to use different login credentials, form values, or other request parameters. Sometimes you need to pass valid information to your web forms, but generating a bunch of data up front takes time.
To pull data into your tests, you just click the ‘Set Parameter Values’ button at the top of the screen, and you’re presented with a list of the requests in your scenarios that contained variable data. Then you can select a field from your page, click next, and give the test data a name.
LoadUIWeb supports a wide range of data sources. You can load data from Excel and CSV files, and even connect up to an ODBC-compliant data source like SQL or Oracle databases. LoadUIWeb also allows you to automatically generate data (like Addresses, Phone Numbers, and Names) to save you time and test data management overhead.
To use data in an Excel spreadsheet, simply browse to your Excel file. Then select a worksheet, then the proper column. Finally, you’ll want to let LoadUIWeb know how to correlate your data with the virtual user instances in a larger load test, and there are a couple of options here. The first basically means that user 1 is going to get row 1, user 2 will get row 2, and so on.
You can also have LoadUIWeb generate some data automatically. Select the ‘LoadUIWeb variable’ option to generate lists of unique values, things like names and addresses, and change the number of rows to your desired amount of dynamically generated data. Now your requests can posts those values instead of what you originally recorded, all without having to maintain this data in your spreadsheets.
To connect to a database, you’ll need to specify the connection details first. Once connected, you can select either a table, a view, or write a custom query to pull specific data in, and then the rest of the process works the same as we saw before.
Data driven testing is fantastically easy with LoadUIWeb. Check it out for yourself, download our free trial and get started today.