Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Command line arguments to include/exclude suites and tags #6

Open
Uli-Armbruster opened this issue Jun 30, 2016 · 6 comments
Open

Command line arguments to include/exclude suites and tags #6

Uli-Armbruster opened this issue Jun 30, 2016 · 6 comments
Milestone

Comments

@Uli-Armbruster
Copy link

Uli-Armbruster commented Jun 30, 2016

Hi,
I think your program is really what we need, but to make use of it we require the same options that MSpec provides:

--exclude
--include

I don't know if you want to support this since I don't know if every supported Testing Framework has these options. If you don't, I could provide an adapted version with support of this only for MSpec. I've already forked the current version but I didn't find the necessary entry points in the hurry.

Could you tell me if you would support this or otherwise if you would help me to develop a dedicated fork for this.

@matkoch
Copy link
Owner

matkoch commented Jun 30, 2016

What specific excludes/includes do you need? Assembly level? Type level? What about tags/categories and wildcards?

@Uli-Armbruster
Copy link
Author

Tags, for example:
[Tags("RegressionTest")] // this attribute supports any number of tags via a params string[] argument! [Subject(typeof(SecurityService), "Authentication")] public class When_authenticating_a_user { ... }

Usage:
Usage: mspec.exe [options]
Options:
-f, --filters Filter file specifying contexts to execute (full type name, one per line). Takes precedence over tags
-i, --include Executes all specifications in contexts with these comma delimited tags. Ex. -i "foo,bar,foo_bar"
-x, --exclude Exclude specifications in contexts with these comma delimited tags. Ex. -x "foo,bar,foo_bar"

@matkoch
Copy link
Owner

matkoch commented Jul 1, 2016

I actually implemented that once, but removed it for some reason that I don't know anymore )

Here is the draft:

private class Options
{
  [OptionList("assemblies", HelpText = "List of assemblies separated by semicolons.", Required = true, Separator = ';')]
  public IList<string> Assemblies { get; set; }

  [OptionList("filters", HelpText = "List of type/tag filters prefixed as include (+) or exclude (!) separated by semicolons. Wildcards supported. DAT files are interpreted as filter list.", Separator = ';')]
  public IList<string> Filters { get; set; }

  [Option("pause", HelpText = "Enables pausing before the process is terminated.")]
  public bool Pause { get; set; }

  [Option("debug", HelpText = "Enables debugging by calling Debugger.Launch().")]
  public bool Debug { get; set; }

  [Option("htmlReport", HelpText = "Enables generation of a HTML report. Specify 'default' or a custom ZIP archive with a 'template.cshtml' razor template.")]
  public string HtmlReport { get; set; }

  [Option("teamCity", HelpText = "Enables output for JetBrains TeamCity server (auto-detected). Disables standard output.")]
  public bool TeamCity { get; set; }

  [Option("dotCover", HelpText = "Enables code coverage by specifying path to JetBrains DotCover executable.")]
  public string DotCover { get; set; }

  [Option("output", HelpText = "Specifies the output directory for the HTML Report and DotCover as well.")]
  public string Output { get; set; }
}

Please let me know what you think about that.

@matkoch matkoch added the console label Jul 1, 2016
@Uli-Armbruster
Copy link
Author

Looks good for me! Is cleaner than the options of the MSpec runner.

@Uli-Armbruster
Copy link
Author

Can't find the draft for this, only for #7

@matkoch
Copy link
Owner

matkoch commented Jul 7, 2016

That was an issue-only draft 😁 I can implement this until next week probably.

@matkoch matkoch changed the title Add Include and Exclude Options for MSpec Add command line options to include/exclude test suites and tags Dec 9, 2016
@matkoch matkoch changed the title Add command line options to include/exclude test suites and tags Command line arguments to include/exclude suites and tags Dec 9, 2016
@matkoch matkoch modified the milestone: v1.0.0 Dec 12, 2016
@matkoch matkoch self-assigned this Dec 12, 2016
@matkoch matkoch removed their assignment May 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants