กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
แอปอัจฉริยะ เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้เบราว์เซอร์นี้ไม่ได้รับการสนับสนุนอีกต่อไป
อัปเกรดเป็น Microsoft Edge เพื่อใช้ประโยชน์จากคุณลักษณะล่าสุด เช่น การอัปเดตความปลอดภัยและการสนับสนุนด้านเทคนิค
You can run tests on already published output by using the dotnet vstest
command. This will work on xUnit, MSTest, and NUnit tests. Simply locate the DLL file that was part of your published output and run:
dotnet vstest <MyPublishedTests>.dll
Where <MyPublishedTests>
is the name of your published test project.
The commands below demonstrate running tests on a published DLL.
dotnet new mstest -o MyProject.Tests
cd MyProject.Tests
dotnet publish -o out
dotnet vstest out/MyProject.Tests.dll
หมายเหตุ
Note: If your app targets a framework other than netcoreapp
, you can still run the dotnet vstest
command by passing in the targeted framework with a framework flag. For example, dotnet vstest <MyPublishedTests>.dll --Framework:".NETFramework,Version=v4.6"
. In Visual Studio 2017 Update 5 and later, the desired framework is automatically detected.
คำติชม .NET
.NET เป็นโครงการโอเพนซอร์ส เลือกลิงก์เพื่อให้คำติชม:
กิจกรรม
17 มี.ค. 21 - 21 มี.ค. 10
แอปอัจฉริยะ เข้าร่วมชุด meetup เพื่อสร้างโซลูชัน AI ที่ปรับขนาดได้ตามกรณีการใช้งานจริงกับนักพัฒนาและผู้เชี่ยวชาญร่วมกัน
ลงทะเบียนตอนนี้การฝึกอบรม
โมดูล
การทดสอบ C# ใน Visual Studio - Training
เริ่มต้นการทดสอบแอป C# ของคุณโดยใช้เครื่องมือทดสอบใน Visual Studio เรียนรู้วิธีการเขียนการทดสอบ ใช้ Test Explorer สร้างชุดการทดสอบ และใช้รูปแบบสีแดง สีเขียว การปรับโครงสร้างเพื่อเขียนโค้ด
เอกสาร
Use code coverage for unit testing - .NET
Learn how to use the code coverage capabilities for .NET unit tests.
.NET Core unit testing code coverage - Code Samples
.NET Core unit testing code coverage and reporting with coverlet and ReportGenerator.
Microsoft.Testing.Platform support in NUnit (NUnit runner) - .NET
Learn about the NUnit runner, a lightweight way to run tests without depending on the .NET SDK.