-
Notifications
You must be signed in to change notification settings - Fork 20
Add MSTest support with comprehensive documentation and demo project #41
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
Conversation
Co-authored-by: mehrandvd <[email protected]>
Co-authored-by: mehrandvd <[email protected]>
Updated the `ChatScenarioTests` class to utilize a static property for `ScenarioAssert`, initialized in the `ClassInitialize` method. This change enhances logging consistency by using `context.WriteLine` and reduces redundancy by reusing the same `ScenarioAssert` instance across all test methods.
docs/test-framework-integration.md
Outdated
| $"MyProject.Scenarios.{scenarioName}.md", | ||
| typeof(ChatTests).Assembly); | ||
|
|
||
| await scenarioAssert.PassAsync(scenarios); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The PassAsync method requires a chatClient too. Follow the samples in Demo.MSTest style and don't create scenarioAssert instances per test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit b8bb30c. Updated all PassAsync calls to include the required chatClient parameter and refactored examples to follow the Demo.MSTest pattern using static ScenarioAssert instances instead of creating them per test method.
…STest pattern Co-authored-by: mehrandvd <[email protected]>
This PR adds comprehensive MSTest support to skUnit, demonstrating that the framework is truly test-framework agnostic. Previously, all documentation and samples used xUnit exclusively, which could mislead users into thinking skUnit had a dependency on xUnit.
What's Changed
🆕 New Demo Project:
Demo.MSTest[TestClass],[TestMethod],[DataTestMethod], and[ClassInitialize]attributesTestContext.WriteLineintegration for test output📖 Enhanced Documentation
docs/test-framework-integration.md- comprehensive guide covering all three major test frameworksdemos/README.mdto include the new MSTest demo🧪 Framework Comparison Examples
The new documentation shows how the same test looks across frameworks:
xUnit:
MSTest:
The documentation examples now correctly include the required
chatClientparameter in allPassAsynccalls and follow best practices by reusingScenarioAssertinstances rather than creating them per test.Why This Matters
This change proves that skUnit's architecture is genuinely framework-agnostic. The core
skUnitlibrary has zero dependencies on test frameworks - it only depends onMicrosoft.Extensions.AI,SemanticKernel.Abstractions, andMarkdig. Users can now confidently choose their preferred test framework without worrying about compatibility.Validation
Fixes #37.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.