简体   繁体   中英

Link Unit Tests to Test Cases in TFS

In our application we've created a large number of Unit Tests (using MsTest) and from each of these Unit Tests we've gone back and manually created Test Cases in TFS 2010 against each of these. We've then linked the the Test Case to the relevant User Stories. That seems to have linked the Test Case to the Unit Test, and we can now get visibility of which Test Case test each User Story.

The problem we're now having is we want to see the link from Unit Tests to Test Cases. What we're worried about is if we've created a Unit Test but managed to skip over it when creating the test cases.

I've had a look at the tfs_warehouse database and I can see the test results for each unit test, but the testcaseid is always 0.

My question is have we missed something in the link from Unit Tests to Test Cases to complete this link? It certainly feels like we've only completed half of what we need to do to have the complete link of User Story -> Test Case -> Unit Test and Unit Test -> Test Case -> User Story.

There is no link from a unit test to a test case. There is only a reference to an assembly that contains your unit test. This is not the usual work item linking and therefore won't show up in the data warehouse.

You could try to link the test case to a changeset (or check-in) that contains your unit test. But this probably still will not give you the result you're looking for.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM