Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"name": "dotnet-test",
"source": "./plugins/dotnet-test",
"description": "Skills for running and diagnosing .NET tests: test execution, filtering, platform detection, and MSTest workflows."
"description": "Skills for running, diagnosing, and migrating .NET tests: test execution, filtering, platform detection, and MSTest workflows."
}
]
}
2 changes: 1 addition & 1 deletion .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{
"name": "dotnet-test",
"source": "./plugins/dotnet-test",
"description": "Skills for running and diagnosing .NET tests: test execution, filtering, platform detection, and MSTest workflows."
"description": "Skills for running, diagnosing, and migrating .NET tests: test execution, filtering, platform detection, and MSTest workflows."
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This repository contains the .NET team's curated set of core skills and custom a
| [dotnet-upgrade](plugins/dotnet-upgrade/) | Skills for migrating and upgrading .NET projects across framework versions, language features, and compatibility targets. |
| [dotnet-maui](plugins/dotnet-maui/) | Skills for .NET MAUI development: environment setup, diagnostics, and troubleshooting. |
| [dotnet-ai](plugins/dotnet-ai/) | AI and ML skills for .NET: technology selection, LLM integration, agentic workflows, RAG pipelines, MCP, and classic ML with ML.NET. |
| [dotnet-test](plugins/dotnet-test/) | Skills for running and diagnosing .NET tests: test execution, filtering, platform detection, and MSTest workflows. |
| [dotnet-test](plugins/dotnet-test/) | Skills for running, diagnosing, and migrating .NET tests: test execution, filtering, platform detection, and MSTest workflows. |

## Installation

Expand Down
2 changes: 1 addition & 1 deletion plugins/dotnet-test/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dotnet-test",
"version": "0.1.0",
"description": "Skills for running and diagnosing .NET tests: test execution, filtering, platform detection, and MSTest workflows.",
"description": "Skills for running, diagnosing, and migrating .NET tests: test execution, filtering, platform detection, and MSTest workflows.",
"skills": "./skills/"
}
396 changes: 396 additions & 0 deletions plugins/dotnet-test/skills/migrate-vstest-to-mtp/SKILL.md

Large diffs are not rendered by default.

373 changes: 373 additions & 0 deletions tests/dotnet-test/migrate-vstest-to-mtp/eval.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MyApp.Tests;

[TestClass]
public class ServiceTests
{
[TestMethod]
public void HealthCheck_ReturnsOk()
{
Assert.IsTrue(true);
}

[TestMethod]
public void GetStatus_ReturnsRunning()
{
Assert.AreEqual("Running", "Running");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestFramework" Version="3.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
trigger:
- main

pool:
vmImage: 'ubuntu-latest'

steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '8.0.x'

- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: 'restore'

- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
arguments: '--no-restore --configuration Release'

- task: VSTest@3
displayName: Run tests
inputs:
testAssemblyVer2: |
**/*Tests.dll
!**/obj/**
runSettingsFile: 'test.runsettings'
codeCoverageEnabled: true

- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/*.trx'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MyApp.Tests;

[TestClass]
public class AppTests
{
[TestMethod]
public void Initialize_Succeeds()
{
Assert.IsTrue(true);
}

[TestMethod]
public void Shutdown_Succeeds()
{
Assert.IsTrue(true);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="MSTest.Sdk/3.8.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseVSTest>true</UseVSTest>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MyApp.Tests;

[TestClass]
public class CalculatorTests
{
[TestMethod]
public void Add_ReturnsCorrectSum()
{
Assert.AreEqual(4, 2 + 2);
}

[TestMethod]
public void Subtract_ReturnsCorrectDifference()
{
Assert.AreEqual(0, 2 - 2);
}

[TestMethod]
[TestCategory("Slow")]
public void Multiply_ReturnsCorrectProduct()
{
Assert.AreEqual(6, 2 * 3);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestFramework" Version="3.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using NUnit.Framework;

namespace MyApp.Tests;

[TestFixture]
public class CalculatorTests
{
[Test]
public void Add_ReturnsCorrectSum()
{
Assert.That(2 + 2, Is.EqualTo(4));
}

[Test]
public void Subtract_ReturnsCorrectDifference()
{
Assert.That(2 - 2, Is.EqualTo(0));
}

[Test]
[Category("Slow")]
public void Multiply_ReturnsCorrectProduct()
{
Assert.That(2 * 3, Is.EqualTo(6));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit.Analyzers" Version="4.6.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Xunit;

namespace MyApp.Tests;

public class CalculatorTests
{
[Fact]
public void Add_ReturnsCorrectSum()
{
Assert.Equal(4, 2 + 2);
}

[Fact]
public void Subtract_ReturnsCorrectDifference()
{
Assert.Equal(0, 2 - 2);
}

[Theory]
[InlineData(2, 3, 6)]
[InlineData(4, 5, 20)]
public void Multiply_ReturnsCorrectProduct(int a, int b, int expected)
{
Assert.Equal(expected, a * b);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
</Project>
Loading