Complete the code to read test data from an external source.
String username = [1].getProperty("username");
The config object holds external test data properties, so using config.getProperty("username") reads the username from data separated from the test code.
Complete the code to loop through test data rows for multiple test cases.
for (int i = 0; i < [1].size(); i++) {
The testData list contains multiple data rows. Looping through it allows running tests with different inputs, improving coverage.
Fix the error in the assertion to compare expected and actual values from separated data.
assertEquals([1], actualTitle);The expectedTitle variable holds the expected value from separated test data. Comparing it to actualTitle verifies correct behavior.
Fill both blanks to create a data-driven test method signature and annotation.
@[1](name = "LoginTest", dataProvider = "[2]") public void testLogin(String username, String password) {
The @Test annotation marks the test method, and loginData is the name of the data provider supplying test data, enabling data separation and coverage.
Fill all three blanks to define a data provider method returning separated test data.
public Object[][] [1]() { return new Object[][] { [2], [3] }; }
The method named loginData returns a 2D Object array with separate username and password pairs, enabling data-driven tests and better coverage.