@MethodSource equivalent with support for simple EL #792
Labels
⚙️ component: Pioneer
Issues about Pioneer own things (e.g. utils)
🚦 status: in discussion
📖 theme: extensions
🏗️ type: new feature
I have an idea of a potential new feature and was wondering if you think it is worth the effort.
When using parameterized tests, I tend to shy away from using
@MethodSource
, bc in heavily parameterized suites, it would force you to add a ridiculous amount of extra methods. To me, the main culprit seems to be the requirement for each such method to be parameterless, thus completely resistant to any generalization.I was wondering if it wouldn't make more sense to have sth like a
@ExpressionSource
where we could use some sort of an existing open-source EL engine.In its simplest form, it would allow for passing primitive parameters to methods (imagine e.g. a security test where you could use expressions like
@ExpressionSource("allRolesExceptFor('ADMIN')")
).In an advanced scenario, it could also allow access to: injected constructor params, test instance variables, test context (not sure how this would fit with the test lifecycle, though - it would probably require a little more investigation).
The text was updated successfully, but these errors were encountered: