I'm trying to set up automated testing in TFS. I have a solution with one project in, and two unit tests.
I can build my solution in TFS fine, and have associated my test cases with the unit tests.
When I run a test case via TFS, the status changes to "In progress", and I can see my agent picking up the task. A few seconds later the agent prompts "Job Release completed with result: SucceededWithIssues". When I check the logs for the agent, the last line is complete.
When I go back to TFS, the status is still in "In progress".
When I click the Run icon, it prompts me with a dialogue immediately, with a button to "View test run". When I click there, it displays "Aborted just now, Ran for 03 seconds".
Can anyone help me in the right direction?
UPDATE
I managed to track down a log file :
2019-03-01T08:50:15.6478536Z Total Tests : 1, Passed Tests : 0
2019-03-01T08:50:18.6816644Z Test source filter: **\Tests.dll
2019-03-01T08:50:18.6816644Z Count of test sources found: 0
2019-03-01T08:50:18.6826624Z ##[warning]No test sources found
2019-03-01T08:50:18.6896764Z ##[error]ExecutionTaskStateModel.ExecuteTask: Recived error while executing task: System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: No test assemblies found on the test machine matching the source filter criteria or no tests discovered matching test filter criteria. Verify that test assemblies are present on the machine and test filter criteria is correct.
From my build log, I get this :
2019-03-01T10:34:58.4371090Z Total tests: 2. Passed: 2. Failed: 0. Skipped: 0.
So it picks up my tests in the right location, and passes them, in the build, but not in testing-post-build (post release?) stage.
So it's finding a test, but then prompting it's not finding a test? What am I missing?
UPDATE -
When trying to change test selection the test the assemblies, I am prompted with this error message.
##[warning]No test sources found
. That means it can't discover the tests. Is your test assembly really named just "Tests.dll"? Do you have the appropriate test adapters for your test framework installed? – Daniel Mann