question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type and Member filtering for running specs

See original GitHub issue

Add support for -filters for filtering down to specific types to run - similar to what the console runner for the .NET Framework has.

dotnet test --filters My.Spec.In.Namespace.MySpec, My.Spec.In.Namespace.MyOtherSpec

In addition, it would be really nice to have something to specify which member within a specification should be run.

dotnet test --specs My.Spec.In.Namespace.MySpec#Member, My.Spec.In.Namespace.MyOtherSpec#Member

This will be extremely helpful in the Visual Studio Code extension I’m working on. I plan to invoke the dotnet test tool directly.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
einaricommented, Sep 5, 2016

I’ve now implemented something. But please let me know if this is just wrong. I’ve been zipping through the Nunit and Xunit runners and they both implement -test and basically from what I can gather they both rely on unique testnames. The way I write my MSpec Specifications, there is no way to guarantee a unique name without including the entire namespace for the spec, because I don’t prefix or postfix the classname - or include in any way a reference to the unit being specified. So I figured that -test takes a comma separated list of fully qualified Namespace + class and an optional # and then the name of a specific assertion.

Anyways, PR sitting here: https://github.com/machine/dotnet-test-mspec/pull/6

0reactions
einaricommented, Aug 12, 2016

This vacation thing has really done my head in - obviously it should have been the ´-test / --test´ option:

this.Add("test=", "Comma-separated list of {NAMES} of tests to run or explore. This option may be repeated.",
                v => ((List<string>)TestList).AddRange(TestNameParser.Parse(RequiredValue(v, "--test"))));

I’ll dig into the format of what is being sent to these so that we match that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure AD Connect sync: Configure filtering
By using filtering, you can control which objects appear in Azure Active Directory (Azure AD) from your on-premises directory.
Read more >
Notes about Filtering on Types of Fields and Values
Keep these tips in mind when filtering on text fields, date fields, numeric values, picklist values, and blank or null values.Filtering on Text...
Read more >
How Search Filters Work in Recruiter
Use the All groups filter to find potential candidates who are members of specific LinkedIn Groups. Applicants. Use the Applicants filter to narrow...
Read more >
Filtering R/3 Material Groups and Material Types
Hi, I am trying to filter the Material groups and material types during master data upload from R/3 to SRM 4.0 I am...
Read more >
Best Water Filters for Trail Running of 2023
It's small, lightweight, compact, and reliable. The filter and soft flask weigh just 59 grams and measure about 4.3 inches in length, including ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found