Introduction
@ValueSource helps run the same test many times with different simple inputs. It saves time and avoids repeating code.
You want to check a method with many numbers or strings quickly.
You need to test if a function works for several fixed values.
You want to avoid writing many similar test methods for different inputs.
You want to catch errors that happen only for some specific inputs.
You want to keep your test code clean and easy to read.