Question

AutomateEverythingUnderTheSun on Fri, 01 Sep 2017 16:40:12


Hello,

Is there a way to execute a single specified test case via either TCM or other command line tool or the TFS API? I want to execute either a single test case within a test plan which contains hundreds of test cases or a single test not in a test plan?

Thanks


Sponsored



Replies

Starian chen on Mon, 04 Sep 2017 08:25:08


Hi,

You can run single test case based on test case id and test plan through TCM, for example:

tcm run /create /title:"commandrun" /planid:1 /querytext:"SELECT * FROM TestPoint WHERE TestCaseId =20" /testenvironment:"XXX" /collection:"XXX" /teamproject:XXX

More information about TCM: tcm: Running Tests from a Test Plan Using the Command Line Utility

On the other hand, you also can run test through TFS API: How to create a test run and result using the Team Foundation Server API.

Regards