API request - DotNetCoreTest(ICakeContext, DotNetCoreTestSettings)
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 21
Description
Currently we have:
```cake
DotNetCoreTest(ICakeContext)
DotNetCoreTest(ICakeContext, DotNetCoreTestSettings, FilePath, XUnit2Settings)
DotNetCoreTest(ICakeContext, FilePath, DotNetCoreTestSettings, CoverletSettings)
DotNetCoreTest(ICakeContext, FilePath, XUnit2Settings)
DotNetCoreTest(ICakeContext, string)
DotNetCoreTest(ICakeContext, string, DotNetCoreTestSettings)
```
In some situations, we need to (only) supply settings to the default `DotNetCore()`, without manually constructing the test project path. The following API would be convenient in such situations:
```cake
DotNetCoreTest(ICakeContext, DotNetCoreTestSettings)
```
so we can do things like:
```diff
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
+ // workaround for test hangs on Unix: https://github.com/microsoft/vstest/issues/2080#issuecomment-539879345
+ var testSettings = new DotNetCoreTestSettings {
+ ArgumentCustomization = (args) => args.AppendQuoted("--logger:console;noprogress=true")
+ };
- DotNetCoreTest();
+ DotNetCoreTest(testSettings); // don't know/care how testPath looks like
});
```
---
Aside: this `--logger:"console;noprogress=true"` workaround for intermittent failure (1 out of 20 runs) is needed by many (if not all) downstream users at the moment, until https://github.com/microsoft/vstest/issues/2080 is resolved. Could this be baked into the cake core `DotNetCoreTest` implementation (with ability to opt-out / override)?
Contributor guide
Research direction
Locate the existing DotNetCoreTest overloads and their shared implementation, then compare how DotNetCoreTestSettings is handled in the current signatures. Check whether the requested settings-only overload can use the default test path and how the logger workaround should be treated. Done means the overload is available with the requested usage and its behavior is covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100