...

/

Parameterized Test with @CsvFileSource

Parameterized Test with @CsvFileSource

This lesson demonstrates the use of @CsvFileSource to pass different arguments to @ParameterizedTest.

We'll cover the following...

@CsvFileSource

@CsvFileSource allows you to use CSV files from the classpath. This csv file gets picked up from the classpath at the time of running test case and each line from a CSV file results in one invocation of the parameterized test. We can also provide a number of lines to skip from top to take comma-separated values.

Let’s look at a demo. ...