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

Backport gh #2

Merged
merged 291 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
cb4a08d
Use dotnet-coverage 17.13.0 (#4211)
Evangelink Dec 2, 2024
b4e40bc
Remove VB from `NonNullableReferenceNotInitializedSuppressor` (#4210)
Youssef1313 Dec 2, 2024
70f973c
Ensure all analyzers we consume are previews (#4214)
Evangelink Dec 2, 2024
d685c63
Introduce and use warning and error output messages (#4217)
Evangelink Dec 2, 2024
b06fc72
Temporary restore `FormattedTextOutputDeviceDataBuilder` (#4220)
Youssef1313 Dec 3, 2024
a4d8395
[main] Bump dotnet-coverage from 17.13.0 to 17.13.1 (#4219)
dependabot[bot] Dec 3, 2024
0a3816b
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4222)
dotnet-maestro[bot] Dec 3, 2024
61c098d
Obsolete public types that should not be public (#4208)
Evangelink Dec 3, 2024
13fe4ef
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 3, 2024
fe1dffd
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 3, 2024
59dc620
Changelog for 3.6.4
Evangelink Dec 3, 2024
08a7aed
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 3, 2024
b115f39
Fix analyzers package to support VB.NET (#4224)
Evangelink Dec 3, 2024
e5283fd
[main] Bump MicrosoftTestingInternalFrameworkVersion from 1.5.0-previ…
dependabot[bot] Dec 4, 2024
cb496c2
Fix concurrency issue in TerminalTestReporter (#4229)
mariam-abdulla Dec 4, 2024
88872f5
Fix insertion from testanywhere repo (#4230)
Evangelink Dec 4, 2024
aede0da
Only push output device messages to Test Explorer, don't push logs (#…
Youssef1313 Dec 4, 2024
4f809f5
Bump version in samples (#4232)
Evangelink Dec 4, 2024
11a9ef7
Sort UnsupportedRunConfigurationSettings (#4234)
Youssef1313 Dec 4, 2024
52bcabf
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4236)
dotnet-maestro[bot] Dec 4, 2024
42f423b
Fix server mode in playground (#4243)
MarcoRossignoli Dec 5, 2024
8e26da6
[main] Update dependencies from dotnet/arcade (#4242)
dotnet-maestro[bot] Dec 5, 2024
7a760d8
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 5, 2024
5c721f5
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 5, 2024
2b15de2
chore: seal internal classes when possible (#4235)
Evangelink Dec 5, 2024
4da8915
Fix playground project
Evangelink Dec 5, 2024
a741052
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage, micro…
dotnet-maestro[bot] Dec 5, 2024
ee0cc58
Cleanup FailedStates in TrxReportEngine (#4247)
Youssef1313 Dec 5, 2024
ef27d27
[main] Bump MicrosoftCodeAnalysisAnalyzersVersion from 3.11.0-beta1.2…
dependabot[bot] Dec 6, 2024
dead25f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 6, 2024
1e0332b
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 6, 2024
65c3a72
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 6, 2024
df15c81
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 6, 2024
beb890d
Use `ValidationResult.ValidTask` instead of `Task.FromResult(Validati…
Youssef1313 Dec 6, 2024
d269367
Avoid Linq allocations from usage of Union (#4265)
Youssef1313 Dec 7, 2024
8dc8b14
Avoid repetitive string.Format call for every character of command-li…
Youssef1313 Dec 7, 2024
e101a9d
More efficient reflection (#4263)
Youssef1313 Dec 7, 2024
4224cea
[Performance] Avoid System.Action allocations for test context cancel…
Youssef1313 Dec 8, 2024
02579cc
[Performance] Avoid TraitCollection.AddRange call with empty array (#…
Youssef1313 Dec 8, 2024
97cb7b4
[Performance] Don't parse the same runsettings for each class in the …
Youssef1313 Dec 8, 2024
f560e78
Simplify Ignore handling in IsTestMethodRunnable (#4281)
Youssef1313 Dec 8, 2024
04a8dcc
Simplify AttributeComparer.IsDerived (#4280)
Youssef1313 Dec 8, 2024
ae0e9af
[Performance] Create dictionary with the right capacity (#4276)
Youssef1313 Dec 8, 2024
45e6516
[Performance] Avoid repetitive string allocations from TestRunDirecto…
Youssef1313 Dec 8, 2024
3e56b47
cleanup SourceGeneratedFileOperations (#4285)
SimonCropp Dec 9, 2024
aa671a8
remove some un-used parameters (#4283)
SimonCropp Dec 9, 2024
e871a5e
remove redundant ascending (#4287)
SimonCropp Dec 9, 2024
6b1017d
remove param values where same as default (#4286)
SimonCropp Dec 9, 2024
fcee02a
[Performance] Ensure ReflectionOperations return `Attribute[]` when p…
Youssef1313 Dec 9, 2024
881b5e6
leverage out null pattern in IsValidDeploymentItem (#4048)
SimonCropp Dec 9, 2024
7b2656e
Show running tests (#4221)
drognanar Dec 9, 2024
bd822c7
Refactor GetTestFromMethod (#4279)
Youssef1313 Dec 10, 2024
447290e
Preserve message and parameters in MSTEST0025 fixer (#4301)
Youssef1313 Dec 10, 2024
2d0cd70
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 10, 2024
b60755a
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 10, 2024
23dd83b
Support 'TestPropertyAttribute' on test classes (#4249)
Youssef1313 Dec 10, 2024
ab879c4
Refactor GetResultOrRunClassInitialize to have clearer intent (#4306)
Evangelink Dec 10, 2024
056912d
Enroll Testing.Platform project to source build (#4295)
nohwnd Dec 10, 2024
6aa7715
Revert "Refactor GetResultOrRunClassInitialize to have clearer intent…
Evangelink Dec 10, 2024
19b63cd
Avoid dictionary resizes when the size is approximately known (#4313)
Youssef1313 Dec 11, 2024
17e322a
Support '--maximum-failed-tests' to abort test run when failure thres…
Youssef1313 Dec 11, 2024
87c2172
Cleanup duplicate logic for timeout handling when creating assembly i…
Youssef1313 Dec 11, 2024
e1051b6
Update dependencies from devdiv/DevDiv/vs-code-coverage, microsoft/te…
Evangelink Dec 11, 2024
23321d7
[Refactor] Use `List<T>` rather than `Collection<T>` (#4315)
Youssef1313 Dec 11, 2024
88286f6
Fix displaying progress in non-ansi terminal (#4320)
Evangelink Dec 11, 2024
33f94f8
Allow to disable test expansion on implementations of ITestDataSource…
Evangelink Dec 11, 2024
0e55e43
Move main to MSTest 3.8 and MTP 1.6 (#4323)
Evangelink Dec 12, 2024
b097a45
Display an error when '--maximum-failed-tests' is used with a framewo…
Youssef1313 Dec 12, 2024
5628f5f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 12, 2024
1c70665
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 12, 2024
bf1ab51
Upload test results for all OSes (#4327)
Evangelink Dec 12, 2024
1a4d2a3
Add source build to official build (#4329)
nohwnd Dec 12, 2024
8695661
Improve doc comment (#4335)
Youssef1313 Dec 13, 2024
c1651d5
Fix incorrect doc comment (#4334)
Youssef1313 Dec 13, 2024
c416216
Remove unnecessary overloads in ReflectHelper (#4336)
Youssef1313 Dec 13, 2024
7c34a4d
Mark analyzers as released (#4342)
Evangelink Dec 13, 2024
44c7ba2
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 13, 2024
81a9a24
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 13, 2024
1415e6e
Don't consider TestClassAttribute for inheritance when calculating as…
Youssef1313 Dec 13, 2024
39832f5
Mark public API as shipped (#4341)
Evangelink Dec 13, 2024
2a26466
Make MSTest.TestFramework depends upon MSTest.Analyzers (#4351)
Evangelink Dec 13, 2024
47cda79
Make obsolete only on release (#4353)
Evangelink Dec 14, 2024
b10bda3
Introduce Assert.Throws(Async) and Assert.ThrowsExactly(Async) APIs (…
Evangelink Dec 14, 2024
d6d6bbe
Throw exception if ExpectedExceptionBaseAttribute is applied more tha…
Youssef1313 Dec 16, 2024
170ca02
Support generic test method (#4204)
Youssef1313 Dec 16, 2024
f711ef0
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 16, 2024
1a51bed
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 16, 2024
4193dc9
Add support for ValueTuple for all target frameworks (#4360)
Evangelink Dec 16, 2024
02b6159
Don't make TestDataSourceDiscoveryOption obsolete (#4366)
Evangelink Dec 16, 2024
e6030a8
Fix analyzers version
Evangelink Dec 16, 2024
09af447
Reduce alloc in GetStackTraceInformation (#4367)
SimonCropp Dec 17, 2024
e733620
Move TATF based tests to MSTest (#4348)
Evangelink Dec 17, 2024
f81364c
Auto detect DynamicDataSourceType (#4340)
Youssef1313 Dec 17, 2024
35a6176
Fix main (#4373)
Youssef1313 Dec 18, 2024
961a1e1
Open source Retry and Hot Reload extensions (#4354)
Evangelink Dec 18, 2024
a010db2
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
8ef716f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
ea8fee7
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
d2ab2f9
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 18, 2024
18e39e9
Use test display name instead of UID for slowest tests (#4377)
Evangelink Dec 18, 2024
367b922
Fix false positive for PreferTestCleanupOverDispose on non-test class…
Youssef1313 Dec 18, 2024
8cf945b
[main] Bump Polly from 8.4.2 to 8.5.0 (#4375)
dependabot[bot] Dec 18, 2024
85ce759
Remove unused resources in TestAdapter (#4379)
Youssef1313 Dec 18, 2024
68fd5bd
Add DisplayMessage to TestContext (#4345)
Youssef1313 Dec 18, 2024
2dd2f37
Improve some flaky tests (#4381)
Evangelink Dec 18, 2024
352bd40
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
6cbfc9f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
e39ae6c
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 18, 2024
8bea025
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 18, 2024
b9c8363
Report diagnostic if DynamicData is referencing a member that's not m…
Youssef1313 Dec 18, 2024
61b558f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 18, 2024
3a00320
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 18, 2024
abc7029
Simplify test dependencies (#4382)
Evangelink Dec 18, 2024
7b7ec1d
Cleanup retry and hot reload versions and refs (#4393)
Evangelink Dec 19, 2024
3fc020b
Fix DiagnosticExtensions class name (#4390)
Youssef1313 Dec 19, 2024
5bdcacd
Allow any IEnumerable as return type to DynamicData source member (#4…
Evangelink Dec 19, 2024
ddf39b4
Fix flakiness on test Log_WhenAsyncFlush_StreamWriterIsCalledOnlyWhen…
Evangelink Dec 19, 2024
8165be4
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 19, 2024
49f9c1f
Fix FileLogger tests
Evangelink Dec 19, 2024
1c4e496
Fix DynamicDataTests (#4399)
Youssef1313 Dec 20, 2024
c9ab615
Fix one more dynamic data test (#4400)
Youssef1313 Dec 20, 2024
1ec111d
Drop dependency to System.ValueTuple (#4398)
Evangelink Dec 20, 2024
7b519c8
Simplify adapter props and targets (#4397)
Evangelink Dec 20, 2024
c1ab221
[forward port] Don't reference MTP in UWP (#4402) (#4404)
Evangelink Dec 20, 2024
ed891e8
Fix MSTestV2Files msbuild items (#4405)
Evangelink Dec 20, 2024
5cdcbc5
Cleanup MSTest.Sdk now that analyzers are deps of framework (#4407) (…
Evangelink Dec 20, 2024
378afeb
Add changelog for 3.7.0 and 1.5.0 (#4409)
Evangelink Dec 20, 2024
5e4d216
Update issue templates (#4417)
Youssef1313 Dec 21, 2024
76665ae
fix exception nullability in TryGetMessage (#4421)
SimonCropp Dec 21, 2024
0e39273
Allow AssemblyCleanup/ClassCleanup to have TestContext parameter (#4387)
Youssef1313 Dec 23, 2024
6a91b27
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 23, 2024
6047de0
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 23, 2024
7907cbd
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 23, 2024
0386846
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 23, 2024
9eb23b3
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 23, 2024
d3a3c36
use EnumPolyfill.IsDefined (#4418)
SimonCropp Dec 23, 2024
811d014
use polyfill in TestFramework.ForTestingMSTest (#4412)
SimonCropp Dec 23, 2024
cc1acfd
use EnumPolyfill.GetNames correctly (#4413)
SimonCropp Dec 23, 2024
530bee3
UnreachableException is more correct (#4431)
SimonCropp Dec 23, 2024
d0e61e2
leverage some global usings (#4424)
SimonCropp Dec 23, 2024
2564c52
Fix analyzer messages not localized (#4434)
Youssef1313 Dec 23, 2024
db7191d
remove redundant requestedName != null check (#4433)
SimonCropp Dec 23, 2024
9cdc9fa
remove redundant bodies (#4437)
SimonCropp Dec 23, 2024
ccf922f
merge some conditional expressions (#4436)
SimonCropp Dec 23, 2024
fdf27d2
Test coverage for TestContext analyzer for case sensitivity (#4438)
Youssef1313 Dec 23, 2024
49594fb
invoke methods as extension methods (#4423)
SimonCropp Dec 23, 2024
61aaa2d
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage, micro…
dotnet-maestro[bot] Dec 23, 2024
b3ac849
method scope fix (#4415)
SimonCropp Dec 24, 2024
88bfc95
Best effort tracking for properties assigned indirectly via fields fo…
Youssef1313 Dec 24, 2024
5e179b1
Fix main build (#4446)
Youssef1313 Dec 25, 2024
d109b63
Fix main build (#4447)
Youssef1313 Dec 25, 2024
83f6a63
Avoid tail recursion in IsAsyncDisposeImplementation (#4432)
SimonCropp Dec 26, 2024
40c2ae4
Avoid Immutable.Add (#4442)
SimonCropp Dec 26, 2024
55c7e47
Fix typo in analyzer message (#4452)
Youssef1313 Dec 26, 2024
5d40843
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 26, 2024
c0b675c
Rename runSettingXml into runSettingsXml (#4451)
Evangelink Dec 26, 2024
06eb7e4
remove some redundant qualifiers (#4435)
SimonCropp Dec 26, 2024
f70bdd9
MSTEST0037 (proper assert analyzer): Don't report for user defined eq…
Youssef1313 Dec 27, 2024
a50e2b8
[main] Bump MSTest from 3.8.0-preview.24616.6 to 3.8.0-preview.24623.…
dependabot[bot] Dec 27, 2024
cbcc9c9
Fix MSTEST0017 false positive when both actual/expected are constants…
Youssef1313 Dec 28, 2024
8fe2465
Better handling of CTS and timeout tokens (#4444)
Evangelink Dec 28, 2024
438eec4
Fix "Could not load file or assembly 'System.Runtime.CompilerServices…
Evangelink Dec 28, 2024
b7480a2
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 28, 2024
96f5d8f
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 28, 2024
351f9ff
[main] Update dependencies from microsoft/testanywhere (#4463)
dotnet-maestro[bot] Dec 29, 2024
549f7d9
remove redundant null check in ComputeStringHash (#4420)
SimonCropp Dec 29, 2024
c743f67
Hide DataTestMethodAttribute from IntelliSense (#4465)
Youssef1313 Dec 29, 2024
56cacdd
Refactor running of data driven tests (#4466)
Evangelink Dec 29, 2024
ec5041a
Small cleanup to Assert.AreEqual (#4472)
Youssef1313 Dec 30, 2024
81f9499
[main] Update dependencies from microsoft/testanywhere (#4470)
dotnet-maestro[bot] Dec 30, 2024
2cab07f
[main] Bump MSTest from 3.8.0-preview.24623.10 to 3.8.0-preview.24629…
dependabot[bot] Dec 30, 2024
7067bc6
[main] Bump MicrosoftCodeAnalysisPublicApiAnalyzersVersion from 3.11.…
dependabot[bot] Dec 30, 2024
3930163
Don't report MSTEST0001 when TestAdapter isn't referenced (#4481)
Youssef1313 Dec 31, 2024
f9f91bb
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Dec 31, 2024
272c63b
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Dec 31, 2024
edf018c
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage (#4479)
dotnet-maestro[bot] Dec 31, 2024
0121dce
[main] Bump MSTest from 3.8.0-preview.24629.5 to 3.8.0-preview.24630.…
dependabot[bot] Dec 31, 2024
3a30ddb
Update SB reference packages (#4485)
Youssef1313 Dec 31, 2024
3e602ee
[main] Bump Polyfill from 7.5.0 to 7.9.1 (#4475)
dependabot[bot] Dec 31, 2024
74aefa8
Move codecov yml file to root
Evangelink Dec 31, 2024
068de75
Fix match all filter not working when property expression is present …
Youssef1313 Jan 2, 2025
8291cec
Simplify unnecessary extension methods in analyzers (#4497)
Youssef1313 Jan 2, 2025
d7cf836
[main] Bump MSTest from 3.8.0-preview.24630.3 to 3.8.0-preview.24631.…
dependabot[bot] Jan 2, 2025
38ba48f
[main] Update dependencies from microsoft/testanywhere (#4488)
dotnet-maestro[bot] Jan 2, 2025
dd0ac32
Implement != operator for filtering (#4494)
Youssef1313 Jan 2, 2025
60e7c87
Update ExpectedException codefix to use the new Assert.Throws[Exactly…
Youssef1313 Jan 3, 2025
950c909
Introduce interpolated string handler overloads for assertions (#4476)
Youssef1313 Jan 3, 2025
f2886eb
[main] Update dependencies from microsoft/testanywhere (#4499)
dotnet-maestro[bot] Jan 4, 2025
0b65aa2
Add analyzer for value type usage with Assert.AreSame (#4493)
Youssef1313 Jan 4, 2025
5f134f5
Allow DynamicData source to be on base types (#4482)
Youssef1313 Jan 4, 2025
b1e4e11
[main] Bump MSTest from 3.8.0-preview.24631.6 to 3.8.0-preview.25052.…
dependabot[bot] Jan 4, 2025
8643e6b
[main] Update dependencies from microsoft/testanywhere (#4517)
dotnet-maestro[bot] Jan 5, 2025
919af5d
Mark TestMethodOptions.Executor as non-nullable (#4518)
Youssef1313 Jan 5, 2025
f1532a2
[main] Update dependencies from microsoft/testanywhere (#4520)
dotnet-maestro[bot] Jan 6, 2025
91e0c92
[main] Bump MSTest from 3.8.0-preview.25052.2 to 3.8.0-preview.25055.…
dependabot[bot] Jan 6, 2025
f049f23
Move ExpectedException attribute resolution out of TypeCache/ReflectH…
Youssef1313 Jan 6, 2025
8520876
Use different message for Assert.AreEqual when string difference is c…
Youssef1313 Jan 6, 2025
d7d0ee1
Report diagnostic when AreNotSame is passed value type (#4523)
Youssef1313 Jan 6, 2025
da39a9b
Move ResolveTestContext from TypeCache to TestClassInfo (#4498)
Youssef1313 Jan 6, 2025
91b6b0f
Implement analyzer and codefix to switch to Assert.ThrowsExactly[Asyn…
Youssef1313 Jan 6, 2025
e88a90e
Fix main build (#4528)
Youssef1313 Jan 6, 2025
5248f5d
Update ExpectedException analyzer message/description to use the new …
Youssef1313 Jan 6, 2025
a908cc8
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 6, 2025
39c6506
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Jan 6, 2025
4abf7f5
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage, micro…
dotnet-maestro[bot] Jan 6, 2025
f7ddde6
Small ClassInitialize refactoring (#4503)
Youssef1313 Jan 6, 2025
8c80b99
[main] Update dependencies from microsoft/testanywhere (#4533)
dotnet-maestro[bot] Jan 7, 2025
c5843c5
[main] Bump MSTest from 3.8.0-preview.25055.1 to 3.8.0-preview.25056.…
dependabot[bot] Jan 7, 2025
36eaf05
Add ability to ignore specific test cases (#4457)
Youssef1313 Jan 7, 2025
1db1afd
Don't report diagnostic for DeploymentItem on abstract class (#4538)
Youssef1313 Jan 7, 2025
3f21675
Fix "Could not load file or assembly 'Microsoft.Testing.Platform'" ex…
Evangelink Jan 7, 2025
1d43f8b
Fix NaN behavior for Assert.AreEqual/AreNotEqual (#4536)
Youssef1313 Jan 7, 2025
6dcb80f
Implement codefix for MSTEST0026: Avoid conditional access in asserti…
Youssef1313 Jan 7, 2025
e8edc35
Add messageBuilder overloads for Assert.Throws[Exactly][Async] (#4541)
Youssef1313 Jan 7, 2025
8a7a75c
[main] Update dependencies from microsoft/testanywhere (#4554)
dotnet-maestro[bot] Jan 8, 2025
6d3b7ce
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 8, 2025
d455de0
[main] Bump MSTest from 3.8.0-preview.25056.11 to 3.8.0-preview.25057…
dependabot[bot] Jan 8, 2025
860c0ff
remove destructor pattern from TempDirectory (#4545)
SimonCropp Jan 8, 2025
1087e19
remove un-used list in ExceptionFlattener.cs (#4548)
SimonCropp Jan 8, 2025
a2f50bc
remove redundant string.ToString() (#4550)
SimonCropp Jan 8, 2025
2306c49
missing usings on MessageBusProxy instances (#4547)
SimonCropp Jan 8, 2025
afc61d9
remove object based override of GetTypeDisplayName (#4551)
SimonCropp Jan 8, 2025
a97ef87
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 8, 2025
47004dc
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 8, 2025
a337be1
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Jan 8, 2025
eb27c4a
Add dotnet test client to be used in dotnet/sdk (#4558)
nohwnd Jan 8, 2025
9682c1d
Fix flaky `WhenSpecificDataSourceIsIgnoredViaIgnoreMessageProperty` (…
Youssef1313 Jan 8, 2025
90df696
Set MTP editorconfig as non-root explicitly (#4567)
Youssef1313 Jan 9, 2025
5462e24
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 9, 2025
578fc77
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
dotnet-bot Jan 9, 2025
35a3f5b
[main] Update dependencies from devdiv/DevDiv/vs-code-coverage, micro…
dotnet-maestro[bot] Jan 9, 2025
395aee9
Localized file check-in by OneLocBuild Task: Build definition ID 1218…
github-actions[bot] Jan 9, 2025
e482b23
make some methods static (#4564)
SimonCropp Jan 9, 2025
9e07121
Cleanup unnecessary await CompletedTask (#4562)
Youssef1313 Jan 9, 2025
f3bf1a5
remove redundant conditional compilation in TypeCache (#4569)
SimonCropp Jan 9, 2025
22edf6d
deconstruct some KeyValuePair (#4573)
SimonCropp Jan 9, 2025
bbce070
use dictionary Values directly when Key is not used (#4574)
SimonCropp Jan 9, 2025
07b52ea
Update CODEOWNERS (#4576)
Youssef1313 Jan 9, 2025
b9eda74
inline string literals (#4578)
SimonCropp Jan 9, 2025
ef3b985
Fix ExpectedException codefix to handle few edge cases (#4560)
Youssef1313 Jan 9, 2025
cd2ac93
remove redundant string interpolation (#4571)
SimonCropp Jan 9, 2025
00996f2
fix some nullability warnings (#4581)
SimonCropp Jan 9, 2025
46c2a7d
[main] Update dependencies from dotnet/arcade (#4258)
dotnet-maestro[bot] Jan 9, 2025
e4877be
Update CODEOWNERS (#4579)
Youssef1313 Jan 9, 2025
887175d
Implement codefix for 'Are[Not]Same' usage with value types (#4584)
Youssef1313 Jan 9, 2025
53488cf
[port] Fix "Found multiple properties of type 'Microsoft.Testing.Plat…
Evangelink Jan 9, 2025
1251143
better use of IsInstanceOfType (#4583)
SimonCropp Jan 9, 2025
79c2c29
remove redundant StringBuilder in TestHostResult (#4572)
SimonCropp Jan 9, 2025
2cf523d
Add backport GH Actions (#4592)
Youssef1313 Jan 9, 2025
4231021
GH Actions backport
Youssef1313 Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-coverage": {
"version": "17.13.1",
"commands": [
"dotnet-coverage"
],
"rollForward": false
}
}
}
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ tab_width = 4
# Do not set end_of_line property, this is causing issues with Linux,
# see https://github.com/dotnet/roslyn/issues/55526

# MSTESTOBS: Type or member is obsolete
dotnet_diagnostic.MSTESTOBS.severity = none

#### .NET Coding Conventions ####

## Organize usings
Expand Down Expand Up @@ -211,6 +214,7 @@ dotnet_diagnostic.CA1827.severity = warning # CA1827: Do not use Cou
dotnet_diagnostic.CA1836.severity = warning # CA1836: Prefer IsEmpty over Count
dotnet_diagnostic.CA1840.severity = warning # CA1840: Use 'Environment.CurrentManagedThreadId'
dotnet_diagnostic.CA1852.severity = warning # CA1852: Seal internal types
dotnet_code_quality.CA1852.ignore_internalsvisibleto = true
dotnet_diagnostic.CA1854.severity = warning # CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method
# Disabled as it's making the code complex to deal with when multi targeting
dotnet_diagnostic.CA1863.severity = none # CA1863: Use 'CompositeFormat'
Expand Down Expand Up @@ -245,6 +249,7 @@ dotnet_diagnostic.SA1402.severity = none # SA1402: File may only
dotnet_diagnostic.SA1515.severity = none # SA1515: Single-line comment should be preceded by blank line
dotnet_diagnostic.SA1611.severity = none # SA1611: Element parameters should be documented
dotnet_diagnostic.SA1615.severity = none # SA1615: Element return value should be documented
dotnet_diagnostic.SA1633.severity = none # SA1633: File should have header
dotnet_diagnostic.SA1649.severity = none # SA1649: File name should match first type name

# -----------------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners

src/Package/MSTest.Sdk @MarcoRossignoli
src/Platform @MarcoRossignoli @Evangelink
src/Package/MSTest.Sdk @MarcoRossignoli @Evangelink
src/Platform @MarcoRossignoli @Youssef1313 @Evangelink
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a bug report to help us improve MSTest
about: Create a bug report to help us improve Microsoft.Testing.Platform and MSTest
labels: [bug, need-triage]
---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest a new feature/idea for MSTest
about: Suggest a new feature/idea for Microsoft.Testing.Platform or MSTest
labels: [feature-request, need-triage]
---

Expand Down
265 changes: 265 additions & 0 deletions .github/workflows/backport-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
on:
workflow_call:
inputs:
pr_title_template:
description: 'The template used for the PR title. Special placeholder tokens that will be replaced with a value: %target_branch%, %source_pr_title%, %source_pr_number%, %cc_users%.'
required: false
type: string
default: '[%target_branch%] %source_pr_title%'
pr_description_template:
description: 'The template used for the PR description. Special placeholder tokens that will be replaced with a value: %target_branch%, %source_pr_title%, %source_pr_number%, %cc_users%.'
required: false
type: string
default: |
Backport of #%source_pr_number% to %target_branch%

/cc %cc_users%
repository_owners:
description: 'A comma-separated list of repository owners where the workflow will run. Defaults to "dotnet,microsoft".'
required: false
type: string
default: 'dotnet,microsoft'

jobs:
cleanup:
if: ${{ contains(format('{0},', inputs.repository_owners), format('{0},', github.repository_owner)) && github.event_name == 'schedule' }}
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Cleanup workflow runs
uses: actions/github-script@v7
with:
script: |
const repo_owner = context.payload.repository.owner.login;
const repo_name = context.payload.repository.name;

// look up workflow from current run
const currentWorkflowRun = await github.rest.actions.getWorkflowRun({
owner: repo_owner,
repo: repo_name,
run_id: context.runId
});

// get runs which are 'completed' (other candidate values of status field are e.g. 'queued' and 'in_progress')
for await (const response of github.paginate.iterator(
github.rest.actions.listWorkflowRuns, {
owner: repo_owner,
repo: repo_name,
workflow_id: currentWorkflowRun.data.workflow_id,
status: 'completed'
}
)) {
// delete each run
for (const run of response.data) {
console.log(`Deleting workflow run ${run.id}`);
await github.rest.actions.deleteWorkflowRun({
owner: repo_owner,
repo: repo_name,
run_id: run.id
});
}
}

run_backport:
if: ${{ contains(format('{0},', inputs.repository_owners), format('{0},', github.repository_owner)) && github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to') }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Extract backport target branch
uses: actions/github-script@v7
id: target-branch-extractor
with:
result-encoding: string
script: |
if (context.eventName !== "issue_comment") throw "Error: This action only works on issue_comment events.";

// extract the target branch name from the trigger phrase containing these characters: a-z, A-Z, digits, forward slash, dot, hyphen, underscore
const regex = /^\/backport to ([a-zA-Z\d\/\.\-\_]+)/;
target_branch = regex.exec(context.payload.comment.body);
if (target_branch == null) throw "Error: No backport branch found in the trigger phrase.";

return target_branch[1];
- name: Unlock comments if PR is locked
uses: actions/github-script@v7
if: ${{ github.event.issue.locked == true }}
with:
script: |
console.log(`Unlocking locked PR #${context.issue.number}.`);
await github.rest.issues.unlock({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
- name: Post backport started comment to pull request
uses: actions/github-script@v7
with:
script: |
const target_branch = '${{ steps.target-branch-extractor.outputs.result }}';
const backport_start_body = `Started backporting to ${target_branch}: https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: backport_start_body
});
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run backport
uses: actions/github-script@v7
env:
BACKPORT_PR_TITLE_TEMPLATE: ${{ inputs.pr_title_template }}
BACKPORT_PR_DESCRIPTION_TEMPLATE: ${{ inputs.pr_description_template }}
with:
script: |
const target_branch = '${{ steps.target-branch-extractor.outputs.result }}';
const repo_owner = context.payload.repository.owner.login;
const repo_name = context.payload.repository.name;
const pr_number = context.payload.issue.number;
const comment_user = context.payload.comment.user.login;

try {
// verify the comment user is a repo collaborator
try {
await github.rest.repos.checkCollaborator({
owner: repo_owner,
repo: repo_name,
username: comment_user
});
console.log(`Verified ${comment_user} is a repo collaborator.`);
} catch (error) {
console.log(error);
throw new Error(`Error: @${comment_user} is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your ${repo_owner} team membership visibility is set to Public on https://github.com/orgs/${repo_owner}/people?query=${comment_user}`);
}

try { await exec.exec(`git ls-remote --exit-code --heads origin ${target_branch}`) } catch { throw new Error(`Error: The specified backport target branch ${target_branch} wasn't found in the repo.`); }
console.log(`Backport target branch: ${target_branch}`);

console.log("Applying backport patch");

await exec.exec(`git checkout ${target_branch}`);
await exec.exec(`git clean -xdff`);

// configure git
await exec.exec(`git config user.name "github-actions"`);
await exec.exec(`git config user.email "[email protected]"`);

// create temporary backport branch
const temp_branch = `backport/pr-${pr_number}-to-${target_branch}`;
await exec.exec(`git checkout -b ${temp_branch}`);

// skip opening PR if the branch already exists on the origin remote since that means it was opened
// by an earlier backport and force pushing to the branch updates the existing PR
let should_open_pull_request = true;
try {
await exec.exec(`git ls-remote --exit-code --heads origin ${temp_branch}`);
should_open_pull_request = false;
} catch { }

// download and apply patch
await exec.exec(`curl -sSL "${context.payload.issue.pull_request.patch_url}" --output changes.patch`);

// const git_am_command = "git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch";
// let git_am_output = `$ ${git_am_command}\n\n`;
// let git_am_failed = false;
// try {
// await exec.exec(git_am_command, [], {
// listeners: {
// stdout: function stdout(data) { git_am_output += data; },
// stderr: function stderr(data) { git_am_output += data; }
// }
// });
// } catch (error) {
// git_am_output += error;
// git_am_failed = true;
// }

// if (git_am_failed) {
// const git_am_failed_body = `@${context.payload.comment.user.login} backporting to ${target_branch} failed, the patch most likely resulted in conflicts:\n\n\`\`\`shell\n${git_am_output}\n\`\`\`\n\nPlease backport manually!`;
// await github.rest.issues.createComment({
// owner: repo_owner,
// repo: repo_name,
// issue_number: pr_number,
// body: git_am_failed_body
// });
// core.setFailed("Error: git am failed, most likely due to a merge conflict.");
// return;
// }
// else {
// // push the temp branch to the repository
// await exec.exec(`git push --force --set-upstream origin HEAD:${temp_branch}`);
// }

// if (!should_open_pull_request) {
// console.log("Backport temp branch already exists, skipping opening a PR.");
// return;
// }

// prepare the GitHub PR details

// get users to cc (append PR author if different from user who issued the backport command)
// let cc_users = `@${comment_user}`;
// if (comment_user != context.payload.issue.user.login) cc_users += ` @${context.payload.issue.user.login}`;

// replace the special placeholder tokens with values
// const { BACKPORT_PR_TITLE_TEMPLATE, BACKPORT_PR_DESCRIPTION_TEMPLATE } = process.env

// const backport_pr_title = BACKPORT_PR_TITLE_TEMPLATE
// .replace(/%target_branch%/g, target_branch)
// .replace(/%source_pr_title%/g, context.payload.issue.title)
// .replace(/%source_pr_number%/g, context.payload.issue.number)
// .replace(/%cc_users%/g, cc_users);

// const backport_pr_description = BACKPORT_PR_DESCRIPTION_TEMPLATE
// .replace(/%target_branch%/g, target_branch)
// .replace(/%source_pr_title%/g, context.payload.issue.title)
// .replace(/%source_pr_number%/g, context.payload.issue.number)
// .replace(/%cc_users%/g, cc_users);

// open the GitHub PR
// await github.rest.pulls.create({
// owner: repo_owner,
// repo: repo_name,
// title: backport_pr_title,
// body: backport_pr_description,
// head: temp_branch,
// base: target_branch
// });

// console.log("Successfully opened the GitHub PR.");
} catch (error) {

core.setFailed(error);

// post failure to GitHub comment
const unknown_error_body = `@${comment_user} an error occurred while backporting to ${target_branch}, please check the run log for details!\n\n${error.message}`;
await github.rest.issues.createComment({
owner: repo_owner,
repo: repo_name,
issue_number: pr_number,
body: unknown_error_body
});
}

- uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
with:
token: ${{ secrets.BACKPORT_MACHINE_USER_PAT }}
push-to-fork: youssef-backport-bot/testfx

- name: Re-lock PR comments
uses: actions/github-script@v7
if: ${{ github.event.issue.locked == true && (success() || failure()) }}
with:
script: |
console.log(`Locking previously locked PR #${context.issue.number} again.`);
await github.rest.issues.lock({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
lock_reason: "resolved"
});
23 changes: 23 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Backport PR to branch
on:
issue_comment:
types: [created]
schedule:
# once a day at 13:00 UTC to cleanup old runs
- cron: '0 13 * * *'

permissions:
contents: write
issues: write
pull-requests: write
actions: write

jobs:
backport:
if: ${{ contains(github.event.comment.body, '/backport to') || github.event_name == 'schedule' }}
uses: microsoft/testfx/.github/workflows/backport-base.yml@main
with:
pr_description_template: |
Backport of #%source_pr_number% to %target_branch%

/cc %cc_users%
23 changes: 19 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@

<!-- The TFMs to build and test against. -->
<PropertyGroup>
<NetFrameworkMinimum>net462</NetFrameworkMinimum>
<UwpMinimum>uap10.0.16299</UwpMinimum>
<WinUiMinimum>net6.0-windows10.0.18362.0</WinUiMinimum>
<NetCurrent>net8.0</NetCurrent>

<SupportedNetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0</SupportedNetFrameworks>
<MicrosoftTestingTargetFrameworks>net6.0;net7.0;net8.0</MicrosoftTestingTargetFrameworks>
<MicrosoftTestingTargetFrameworks>net6.0;net7.0;net8.0;net9.0</MicrosoftTestingTargetFrameworks>
<SupportedNetFrameworks>netcoreapp3.1;net6.0;net7.0;net8.0;net9.0</SupportedNetFrameworks>
</PropertyGroup>

<!-- Build config -->
Expand Down Expand Up @@ -67,4 +65,21 @@
<MoqPublicKey>0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7</MoqPublicKey>
</PropertyGroup>

<ItemGroup>
<Using Include="System.Collections" />
<Using Include="System.Collections.Concurrent" />
<Using Include="System.Globalization" />
<Using Include="System.Diagnostics" />
<Using Include="System.Diagnostics.CodeAnalysis" />
<Using Include="System.Reflection" />
<Using Include="System.Runtime.CompilerServices" />
<Using Include="System.Runtime.InteropServices" />
<Using Include="System.Runtime.Versioning" />
<Using Include="System.Text" />
<Using Include="System.Text.RegularExpressions" />
<Using Include="System.Xml" />
<Using Include="System.Xml.Linq" />
<Using Include="System.Xml.XPath" />
</ItemGroup>

</Project>
Loading
Loading