Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Test Description question

There is a description entry for Unit Tests in Visual Studio. Is it possible to modify a test description after creation?

like image 567
Tarynn Avatar asked Aug 18 '11 19:08

Tarynn


People also ask

Which is a description of what a unit test does?

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. This testing methodology is done during the development process by the software developers and sometimes QA staff.

What are the three parts of a unit test?

A typical unit test contains 3 phases: First, it initializes a small piece of an application it wants to test (also known as the system under test, or SUT), then it applies some stimulus to the system under test (usually by calling a method on it), and finally, it observes the resulting behavior.

What is unit testing in C# Interview Questions?

Answer: In unit testing, we use mocking. An object you want to test may have other complex object dependencies. You replace the other objects with mocks simulating the behavior of the real objects to isolate the conduct of an object that you wish to test.


2 Answers

 [TestMethod]
 [Microsoft.VisualStudio.TestTools.UnitTesting.Description("Test Case Description")]
 public void EnsureTestCaseValid()
 {      
 }
like image 137
sll Avatar answered Sep 21 '22 14:09

sll


The Description column in the Test View is readonly, but if you select a test and look in the Properties window, you'll find that the Description property is editable. This will add a [Description("string")] attribute to the test.

like image 32
John Saunders Avatar answered Sep 19 '22 14:09

John Saunders