Let Say I have following C# project structure in Visual Studio
Now I want to connect my unit tests with Specification written in html in the following way
//http://../path.to.UserStory1.html#or_even_some_anchor
[TestFixture]
public class Test1
{
[Test]
public void SomeTest()
{
}
}
That way when I CTRL+Clik on the link in the comment I can jump to the specification and see what should be really tested. Problem is that I don't know how to do a relative path to html file included in the project.
I think that in your case the <see/>
documentation tag would make the most sense, but others are available .
This would change your example code to be the following:
/// <summary>
/// This test does something
/// </summary>
/// <see cref="http://../path.to.UserStory1.html#or_even_some_anchor"/>
[TestFixture]
public class Test1
{
[Test]
public void SomeTest() { }
}
I tested with http://www.google.com and it opened it in a new tab within VS. All of this is built into VS without any additional add-ons.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.