-
Notifications
You must be signed in to change notification settings - Fork 163
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
Implementing ability to pass information about test method to a data provider method #28
Conversation
Hi @barancev, nice idea. May I ask what you want to do with it? Just for my curiosity and use cases for documentation :-) Cheers, |
This feature allows to create "universal data providers" that can be configured via annotations assigned to test methods, for example: @Test
@UseDataProvider("loadFromFile")
@TestDataFile("file1.dat")
public void test1() { ... }
@Test
@UseDataProvider("loadFromFile")
@TestDataFile("file2.dat")
public void test2() { ... }
@DataProvider
public static Object[][] loadFromFile(FrameworkMethod testMethod) throws IOException {
File testDataFile = new File(testMethod.getAnnotation(TestDataFile.class).value());
// load data from the specified file and return it
} |
Yes, passing null to call as static is correct, my bad. |
Can you change this directly in the pull request by adding just another commit to your branch from which the pull request is generated? And an acceptance test (= example) using the new feature in Thanks a lot for contributing! |
Will do both on the weekend |
Great, looking forward to it ... thanks a lot! |
Done |
Implementing ability to pass information about test method to a data provider method
Thank you very much, I have just added another test and refactored the code a bit. Also added release notes and example as you may see ... |
Thanks! Also remove it from the TBD section of the README |
But it's not release for now ... I will change the section as soon as I will release a new version, ok? Hopefully at the end of the week, will that be ok for you? |
OK |
Hi @barancev, I know that your PR request is a long time ago. Can you hereby agree to the new CLA:
Thank you very much again for your PR :-) |
Yes, I confirm I agree to this CLA. |
Thanks :-) |
No description provided.