J-Fall 2023: Managing Testing Data – Elias Nogueira
Have you ever tried to troubleshoot an issue taking a looking at the log files? I bet you did! And it turns out the issue is related to data usage because, you know, users will use real data! Developers won’t! A good thing about your recent troubleshooting is that you can understand the data. It’s not a bunch of numbers or UUIDs in the name field. How about your development environment? Probably you use either hard-coded data or random strings. We must fix that! This presentation will show you how to manage testing data in two different ways. The first way is the creation of a Test Data Factory approach, where we will use the Factory Pattern to easily create any objects we want with understandable and reliable data. This approach will make you in control of your own data, so you can find any bug in the early stages of the SDLC and the DataFaker library will help us to generate good random data in every execution. In a second way, we will learn and apply the Data-Driven Testing approach, where the same requirement can be applied to different sets of data, generating different results. This approach can reduce the amount of code and the execution time. With the support of JUnit 5 you will learn how to do it in 5 different ways: value source, internal method source, external method source, argument provider, and CVS source.