<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Visual_Studio_Unit_Testing_Framework</id>
	<title>Visual Studio Unit Testing Framework - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Visual_Studio_Unit_Testing_Framework"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Visual_Studio_Unit_Testing_Framework&amp;action=history"/>
	<updated>2026-10-26T14:21:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Visual_Studio_Unit_Testing_Framework&amp;diff=8843971&amp;oldid=prev</id>
		<title>185.118.40.1: /* External links */ this page, including external links, is rather outdated; I am adding new external links only; more work seems to be needed on this page</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Visual_Studio_Unit_Testing_Framework&amp;diff=8843971&amp;oldid=prev"/>
		<updated>2025-05-30T09:36:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;External links: &lt;/span&gt; this page, including external links, is rather outdated; I am adding new external links only; more work seems to be needed on this page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;Visual Studio Unit Testing Framework&amp;#039;&amp;#039;&amp;#039; describes [[Microsoft]]&amp;#039;s suite of [[unit testing]] tools as integrated into some&amp;lt;ref&amp;gt;{{Cite web|url=https://greenicicle.wordpress.com/2010/04/13/visual-studio-2010-express-no-tests-please/|title = Visual Studio 2010 Express – No tests, please|date = 13 April 2010}}&amp;lt;/ref&amp;gt; versions of Visual Studio 2005 and later.  The unit testing framework is defined in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll.  Unit tests created with the unit testing framework can be executed in [[Visual Studio]] or, using [[MSTest]].exe, from a command line.&lt;br /&gt;
&lt;br /&gt;
==Elements==&lt;br /&gt;
===Test class===&lt;br /&gt;
Test classes are declared as such by decorating a class with the [http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testclassattribute.aspx TestClass attribute].  The attribute is used to identify classes that contain test methods.  Best practices state that test classes should contain only unit test code.&lt;br /&gt;
&lt;br /&gt;
===Test method===&lt;br /&gt;
Test methods are declared as such by decorating a unit test method with the [http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testmethodattribute.aspx TestMethod attribute].  The attribute is used to identify methods that contain unit test code.  Best practices state that unit test methods should contain only unit test code.&lt;br /&gt;
&lt;br /&gt;
===Assertions===&lt;br /&gt;
An [[Assertion (computing)|assertion]] is a piece of code that is run to test a condition or behavior against an expected result.  Assertions in Visual Studio unit testing are executed by calling methods in the [http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.aspx Assert class].&lt;br /&gt;
&lt;br /&gt;
===Initialization and cleanup methods===&lt;br /&gt;
Initialization and cleanup methods are used to prepare unit tests before running and cleaning up after unit tests have been executed.  Initialization methods are declared as such by decorating an initialization method with the [http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testinitializeattribute.aspx TestInitialize attribute], while cleanup methods are declared as such by decorating a cleanup method with the [http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.testcleanupattribute.aspx TestCleanup attribute].&lt;br /&gt;
&lt;br /&gt;
==Sample test==&lt;br /&gt;
Below is a very basic sample unit test:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using Microsoft.VisualStudio.TestTools.UnitTesting;&lt;br /&gt;
&lt;br /&gt;
[TestClass]&lt;br /&gt;
public class TestClass&lt;br /&gt;
{&lt;br /&gt;
    [TestMethod]&lt;br /&gt;
    public void MyTest()&lt;br /&gt;
    {&lt;br /&gt;
        Assert.IsTrue(true);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Software testing]]&lt;br /&gt;
* [[Unit testing]]&lt;br /&gt;
* [[Test-driven development]]&lt;br /&gt;
* [[Mock object]]&lt;br /&gt;
* [[List of unit testing frameworks]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
==External links==&lt;br /&gt;
*(old) [http://msdn.microsoft.com/en-us/library/ms379625.aspx A Unit Testing Walkthrough with Visual Studio Team Test]&lt;br /&gt;
*(old) [http://msdn.microsoft.com/en-us/library/ms243147.aspx Microsoft&amp;#039;s Unit Testing Framework page]&lt;br /&gt;
*(old) [http://msdn.microsoft.com/en-us/library/ms182486.aspx MSTest command-line test execution utility]&lt;br /&gt;
*[https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-intro MSTest overview] from [[Microsoft Learn]]&lt;br /&gt;
*[https://learn.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.testtools.unittesting Microsoft.VisualStudio.TestTools.UnitTesting Namespace] from Microsoft Learn&lt;br /&gt;
*[https://github.com/microsoft/testfx#readme Microsoft.Testing.Platform and Microsoft Test Framework (MSTest)], a [[readme]] file from the [[GitHub]] project page&lt;br /&gt;
&lt;br /&gt;
[[Category:Extreme programming]]&lt;br /&gt;
[[Category:Microsoft Visual Studio|Unit Testing Framework]]&amp;lt;!--This category has a custom sort order--&amp;gt;&lt;br /&gt;
[[Category:Unit testing]]&lt;/div&gt;</summary>
		<author><name>185.118.40.1</name></author>
	</entry>
</feed>