I am trying to figure out how to associate a Test Case in TFS 2018 to a Xunit Fact in a .Net Core project.
If i click on the XUnit Fact in the Visual Studio 2017 Test Explorer, the association option is disabled.
Does anyone know how to associate a Xunit Fact to a Test Case in TFS?
The ability to associate xUnit test cases is finally available from the Test Explorer in the latest version of Visual Studio 2017 15.7.1. Here is more information on this and includes information on reporting and executing of the tests from a build or release. http://www.deliveron.com/blog/test-case-association-xunit-nunit-and-mstestv2-tests-available-visual-studio-2017-1571/
There is a Rest API could update work item filed.
For example:
PATCH https://servername:8080/tfs/DefaultCollection/_apis/wit/workitems/[testcaseid]?api-version=1.0
Content-Type:
application/json-patch+json
Body:
The AutomatedTestId is a Guid value, so you can generate a new Guid by using this C# code:
Take a look at this similar question How do I associate test methods to test cases?