Make sure you specify the test assembly as the test source as Deepa mentioned:
You could then use the criteria to specify the specific class you want to run tests from using:
FullyQualifiedName~NameSpace.Test
However pinning your build on a single class to run tests isn't a good practice. If you are using MSTest, consider using test categories:
If you have created automated tests using Visual Studio you can manage
these tests by categorizing them with test categories. When you run
these automated tests using Visual Studio, Team Foundation Build, or
mstest.exe, you can use these test categories to easily select which
tests you run. You add test categories as attributes to your test
methods.
source: MSDN
These will give you some more flexibility and prevent the build from no longer running test if you rename the class or anything
In your criteria specify the use the category to filter the tests that will run:
TestCategory=MyCategory
There is some more info about the criteria you can use in this blog post. The screenshot are taken from a build definition using the GitTemplate.12.xaml template.
.cs
file, you should be specifying a test assembly. – Daniel Mann