-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add possibility to define test-case name #139
Comments
This goes into a similar direction as #134 and is actually a generalization of it. |
@nikowitt this feature is now implemented. It would be cool if you could shortly test it on your side and tell me what you think. You use the feature by adding the
The feature is included in version |
Sounds really cool - I will test this on Tuesday when I return to the office ☺ Am 9. Oktober 2015 17:09:48 MESZ, schrieb Jan notifications@github.com:
|
Sure :-) |
OK, I've just tested it - it's pretty fine for my cases. Something that is worth discussing is what happens if @CaseDescription is used and no @dataProvider is used. In this case, I expect the description to be displayed somewhere in my report even though it actually makes no sense to use the @CaseDescription here. |
Some more feedback: In our history test, we want e.g. to include the return type of the field to be tested. The @dataProvider only contains the name of the field, but the actual type is determined at test runtime. Maybe it is also possible to be able to reference test scenario variables in @CaseDescription? When I create a dummy variable and assign the value at runtime, it is still considered null. |
Mmh, I do not completely understand that. What do you mean by scenario variables? Could you make a short example? |
Sure:
The issue why I cannot provide -SumaHistoryTestSteps.getReturnType();- in the DataProvider is that for doing so, the Spring context is required, but not provided yet, so the value can only be calculated in the scenario itself. |
I think in this case it should be possible to do the following:
does that work? |
Yes, works perfectly :) |
Hi,
if you use JGiven use dataprovider to supply test cases, you may want to have a test-case description. Right now it can be done by calling an own method like given().the_test_case_is( description ), which is not a good solution IMHO.
Can you please provide a possibility to define a description of a test case? E.g. via special annotation of a test function argument.
Best regards,
Pavel
The text was updated successfully, but these errors were encountered: