Reputation: 764
I am trying to link coded ui methods with the actual written test case in test manager. But unfortunately i am not getting success.
Can you please help me to find what i am missing?
I have followed below steps:
I have added method like below which call browser launch and then perform some operation then if success then pass or else if fails.
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase","http://[servername]:8080/tfs/collection];[project]", "6546", DataAccessMethod.Sequential),TestMethod]
public void method2()
{
Playback.PlaybackSettings.ContinueOnError = true;
Driver er = new Driver();
er.Cos_Main(TestContext.DataRow["TestCaseID"].ToString());
string x = null;
}
then
in cos_main()
launch browser;
if()
//success
else
// assert.fail();
then i have opened same test case with ctrl+g i.e go to test case and over there in added associate automation option linked that coded ui method2
reading same test cases number manually from excel which is ok, but when assert.fail() executes it is not updating status in test manger .
please could you please tell me some missing from me?
Thanks in advance
Upvotes: 1
Views: 668
Reputation: 1946
5) now my test is running but test manager status is not getting updated
How do you start the tests?
Please check this article: Running automated test.
Are you starting your tests using one of the ways described there?
(Please note, if you just run your test method locally using Visual Studio test runner, MTM will not get any information about this.)
If yes, then it sounds like you are checking the status at the wrong place in MTM.
Each time you run an automated test a new test run is created and it is the status of this test run that show you if your test was successful or not.
Here is a right place to check the results:
Please check View and update tests results for more details.
Upvotes: 1