You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable binding redirect generation and add System.Collections.Immutable for net472 tests to satisfy MSTest 3.x at runtime. Update migrate-prompt.md to run the dotnet test command with a longer tail output and tighten guidance: record pass/fail counts for both net472 and net8.0 and require all tests to pass on both frameworks before proceeding. Also clarified failure-handling and strengthened wording around regressions and fixes.
Before making any changes, run the test suite to establish a baseline:
24
24
25
25
```bash
26
-
dotnet test project/dbatools.Tests/dbatools.Tests.csproj --no-build --verbosity quiet 2>&1| tail -5
26
+
dotnet test project/dbatools.Tests/dbatools.Tests.csproj --verbosity quiet 2>&1| tail -10
27
27
```
28
28
29
-
Record the pass/fail count. Any test that passes now MUST still pass after your conversion. If the baseline itself has failures, note them — you are not responsible for pre-existing failures, but you must not add new ones.
29
+
Record the pass/fail count for BOTH net472 and net8.0. ALL tests MUST pass on BOTH frameworks — zero failures, zero crashes. If the baseline has any failures on either framework, STOP and fix them before proceeding with the conversion. Do not ignore or skip failures on any framework.
30
30
31
31
#### Pester Baseline
32
32
@@ -176,10 +176,10 @@ Loading the dev-built library first satisfies dbatools-ralph's `RequiredModules
176
176
Run the test suite after the build to verify your conversion doesn't break anything:
177
177
178
178
```bash
179
-
dotnet test project/dbatools.Tests/dbatools.Tests.csproj --no-build --verbosity quiet 2>&1| tail -5
179
+
dotnet test project/dbatools.Tests/dbatools.Tests.csproj --verbosity quiet 2>&1| tail -10
180
180
```
181
181
182
-
Compare against the baseline from Step 0. If any test that previously passed now fails, fix your code and re-run. Do not proceed until the test count is equal to or better than baseline.
182
+
ALL tests MUST pass on BOTH net472 and net8.0. Compare against the baseline from Step 0. If any test fails on either framework, fix your code and re-run. Do not proceed until all tests pass on both frameworks.
183
183
184
184
### 5c. Write C# Unit Tests
185
185
@@ -382,9 +382,9 @@ pwsh -NoProfile -Command '
382
382
**Always use `pwsh -NoProfile`** — never test in the current session where the installed DLL may be locked or a stale module is loaded. The dev-built module at `artifacts/dbatools.library/` contains your freshly compiled `dbatools.dll` plus all dependency DLLs.
383
383
384
384
Compare results against the Pester baseline from Step 0:
385
-
-**All tests that passed in the baseline MUST still pass.**A previously-passing test that now fails is a regression in your C# implementation.
386
-
-**Pre-existing failures** (tests that failed in the baseline too) are not your responsibility, but document them.
387
-
-**New passes** (tests that failed before but pass now) are a bonus — note them.
385
+
-**ALL tests MUST pass.**There are no pre-existing failures — if something fails, it's a real problem that must be fixed.
386
+
-A previously-passing test that now fails is a regression in your C# implementation — fix it.
387
+
-If any test fails, determine the root cause and fix it before proceeding.
388
388
389
389
If any baseline-passing test now fails:
390
390
1. Determine if the failure is a C# implementation issue or a test adaptation issue
0 commit comments