Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel DataProvider - Enhancement request to return value based on the field names #345

Open
parulselvan opened this issue Nov 7, 2016 · 0 comments

Comments

@parulselvan
Copy link

SeLion Version

All

Steps to Reproduce

Below method is reading the values from Excel and mapping it to the POJO class based on the order in which the fields are declared in the class. We are expecting small enhancement here to map the values based on the field names in the POJO class. Here the field names will match with column names. So if we map the value by matching the field and column name, then we don’t need to worry about the order of field declaration. So all the test class can use the same Data Provider class (POJO class) and it will be easy for maintenance also.

DataResource resource =
new FileSystemResource("src/test/resources/testdata/MyDataFile.xls",
SimpleData.class);
SeLionDataProvider dataProvider =
DataProviderFactory.getDataProvider(resource);
return dataProvider.getAllData();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants