Conversation
Update to align with our current recommendations on how to use MSTest.
There was a problem hiding this comment.
Pull Request Overview
This PR updates the MSTest guidance in csharp-mstest.prompt.md to align with current best practices.
- Switched from referencing multiple MSTest packages to a single
MSTestpackage - Updated data-driven attribute recommendation from
[DataTestMethod]to[TestMethod] - Changed the exception assertion from
Assert.ThrowsException<T>toAssert.Throws<T>
| ## Data-Driven Tests | ||
|
|
||
| - Use `[DataTestMethod]` combined with data source attributes | ||
| - Use `[TestMethod]` combined with data source attributes |
There was a problem hiding this comment.
GitHub isn't allowing me to add a comment on the specific line. But on line 43, there is a mention of CsvDataSource. I'm not aware of such attribute 😄
We only have DataSourceAttribute which can be set to use Csv. A sample for using Csv is https://github.com/microsoft/testfx/blob/b1edce21fa74ac0444f92355d230a498196a3382/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DataSourceTests.cs, which is a bit involved.
There was a problem hiding this comment.
https://grep.app/search?q=%5BCsvDataSource%5D yeah that one seemed curious to me as well, does not seem to exist.
There was a problem hiding this comment.
yeah as they are outside the diff commenting isn't supported.
Let's get that fixed and then I can merge these changes.
|
|
||
| - Use a separate test project with naming convention `[ProjectName].Tests` | ||
| - Reference Microsoft.NET.Test.Sdk, MSTest.TestAdapter, and MSTest.TestFramework packages | ||
| - Reference MSTest package |
There was a problem hiding this comment.
I think we can suggest it, but not all repos use MTP and mstest.sdk is still not nicely supported in VS because of the nuget tooling, so I would not default to it.
| ## Data-Driven Tests | ||
|
|
||
| - Use `[DataTestMethod]` combined with data source attributes | ||
| - Use `[TestMethod]` combined with data source attributes |
There was a problem hiding this comment.
yeah as they are outside the diff commenting isn't supported.
Let's get that fixed and then I can merge these changes.
Syncs Learning Hub mirror with upstream github/copilot-cli-for-beginners commit 6ea4d0623687e8235ceb7fa0e2be37cefd024071 (PR #43, PR #24 recovery). Changes applied: - Replace 'Copilot coding agent' with 'GitHub Copilot cloud agent' (01, 03, 05) - Add /new and /rewind commands to context management section (02) - Update context usage example to 62k/200k tokens (02) - Reorder and expand slash command reference tables (01) - Update /allow-all description to include [on|off|show] options (01) - Add /clear, /new, /rewind to Session command table (01) - Update /rename description (01) - Update context efficiency tips table with /rewind row (02) - Update best practices and summary to include new commands (01, 02) - Update demo intro text for Demo 1 (01) - Bump lastUpdated to 2026-04-03 on all modified pages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update to align with our current recommendations on how to use MSTest.
Pull Request Checklist
node update-readme.jsand verified thatREADME.mdis up to date.Description
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.