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

[Enhancement] Extension Point to extend get_data_from_source for all readers #99

Open
Noordsestern opened this issue Aug 5, 2024 · 0 comments

Comments

@Noordsestern
Copy link

Hi,

i have a project with CSV reader (generic and specific), XLSX Reader and potentially JSON soon. As we have mass data being pumped threw RFW test cases, I would like to modify the test data on the fly, for instance limiting the number of rows processed by data driver to 10 (as example) when a specific variable is set..

Currently I implement a CustomReader for each datadriver reader inheriting the original reader:

  • class LimitedGenericCsvReader(genericCsvReader):
  • class LimitedCsvReader(csvReader):
  • class LimitedXlsxReader(xlsxReader):
  • ...

All these reader override get_data_from_source and return only the first i.e. 10 test cases of the data source.

Now instead of asking for another attribue for DataDriver, I thought maybe, it would be more convenient to provide some kind of extension point, where users could manipulate the test data.

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

No branches or pull requests

1 participant