79404790

Date: 2025-02-01 10:36:07
Score: 0.5
Natty:
Report link

Yes we can execute a single test by following below mentioned steps:

  1. Build your dontnet project dontnet build

  2. List the test using dotnet test --list-tests so we can listdown the test in the desired format to execute it dotnet test --list-tests

    as response we got scenario like

Successfulloginwithvalidcredentials("user1","pass123")

  1. now pass the response in test runner command and ensuring each " is escaped with """ and each () is escaped with \ like :

vstest.console.exe <your-dll-path>/TestCaseFilter:"FullyQualifiedName~Successfulloginwithvalidcredentials/("""user1""","""pass123"""/)

NOTE : The above example execute on windows machine

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: SHUBHAM