Expose test arguments as filterable properties#5519
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Just to avoid redundant work for those who don't need this, and also to not interfere with any possibilities of users having explicitly set these, can we wrap them in a feature flag that the user can control? I added settings functionality in #5522 I'm thinking maybe something like: [Before(HookType.TestDiscovery)]
public static void Configure(BeforeTestDiscoveryContext context)
{
context.Settings.Metadata.EnableArgumentProperties = true;
} |
|
Also should this work with class constructors too? |
for my purposes, i dont need it |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
Parameterized tests can now be filtered by their resolved argument
values via `--treenode-filter`, e.g.:
--treenode-filter "/*/*/MyTests/*[arg0=*foo*]"
TestBuilder.InvokeDiscoveryEventReceiversAsync stringifies each entry
in TestDetails.TestMethodArguments and adds it to the DiscoveredTestContext
as arg0, arg1, ... so it flows into the existing property bag used by
the filter matcher. Wildcards in the value are supported by the platform's
built-in matcher.
b715cf4 to
d176ec6
Compare
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Parameterized tests can now be filtered by their resolved argument
values via
--treenode-filter, e.g.:TestBuilder.InvokeDiscoveryEventReceiversAsync stringifies each entry
in TestDetails.TestMethodArguments and adds it to the DiscoveredTestContext
as arg0, arg1, ... so it flows into the existing property bag used by
the filter matcher. Wildcards in the value are supported by the platform's
built-in matcher.