trainer holding brainstorming session

Checklist of Test Data Creation Strategies

Monday, November 25, 2019

Most developers and test engineers know that unit tests should include both happy and sad paths. For example, you might test an email validation method with several different correctly and incorrectly formatted email addresses. The goal is to ensure the code works in many different scenarios rather than just testing a single correct email address.

These same principles should apply to load tests. Since different parameters affect performance in different ways, you should test many different possibilities to get an accurate picture of overall performance. The challenge is implementing dynamic parameters without re-recording load tests, or scripting for hours.

Read more about how LoadNinja databanks simplify the process in our article on How to Use Databanks in LoadNinja.

  • Manual: Manual test data creation involves thinking through different scenarios and coming up with test data to fit each scenario. Often times, this works best for brand new software projects with no historical data or projects where there are unusual data types that are non-standard (e.g. not a zipcode or email address).
  • Production Data: You may copy data from a production environment to a test environment. By testing with production data, you can ensure that the test data mimics reality, but you may need to take precautions to anonymize the data to avoid privacy concerns — especially with credit cards and other sensitive data.
  • Test Generation Tools: There are several tools designed to create test data, including both free and enterprise tools. Using these tools, you typically define a data type, such as a zipcode or email address, and they will generate fake data. The problem is that you may need to manually add certain edge cases (e.g. incorrectly formatted data).

Ready to start performance testing? Sign up for your free LoadNinja trial today.