Skip to content
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 option to filter test results in GetTestRuns to specific test outcomes #275

Closed
pascalberger opened this issue Nov 2, 2020 · 5 comments · Fixed by #311
Closed

Add option to filter test results in GetTestRuns to specific test outcomes #275

pascalberger opened this issue Nov 2, 2020 · 5 comments · Fixed by #311
Milestone

Comments

@pascalberger
Copy link
Member

Add an option to only read test results in GetTestRuns for specific test outcomes

@yansklyarenko
Copy link
Contributor

@pascalberger How would you suggest passing the test outcomes?

I'm thinking about the following signature:

public IEnumerable<AzureDevOpsTestRun> GetTestRuns(int? maxResultsPerTestRun, string testOutcomeFilter)

where testOutcomeFilter is a comma-separated list of outcomes, e.g. "Failed, Aborted", which is then translated to the appropriate IEnumerable<TestOutcome> down the stack.

Does this make sense?

@pascalberger
Copy link
Member Author

pascalberger commented Oct 20, 2021

@yansklyarenko what is your idea for passing a comma-separated list instead of an enumerable?

@yansklyarenko
Copy link
Contributor

@pascalberger Well, I just thought it looks more intuitive from the user perspective.
Like, this:
var results = GetTestRuns(5, "Failed, Aborted");
instead of this:
var results = GetTestRuns(5, new string[] { "Failed", "Aborted" });

Does it look like an unnecessary optimization to you?

@pascalberger
Copy link
Member Author

pascalberger commented Oct 21, 2021

@yansklyarenko My issue with it is more that it is less "typesafe" and has the potential to be used wrong, like this for example:

var results = GetTestRuns(5, "Failed; Aborted");

@yansklyarenko
Copy link
Contributor

@pascalberger Yep, that makes sense, thanks!

yansklyarenko added a commit to yansklyarenko/Cake.AzureDevOps that referenced this issue Oct 25, 2021
Add option to filter test results in GetTestRuns to specific test outcomes
pascalberger pushed a commit to yansklyarenko/Cake.AzureDevOps that referenced this issue Feb 25, 2022
Add option to filter test results in GetTestRuns to specific test outcomes
@pascalberger pascalberger added this to the 2.0.0 milestone Feb 25, 2022
pascalberger added a commit that referenced this issue Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants