Is it possible to retrieve the results of the Unit tests run using NUnit programmatically? If Yes then How? I have read that we can generate XML file using Nunit Console. Is there any other way around apart from generating and then parsing XML?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes, it is possible. You can use current test context to get name of test, status, working directory, etc
[TearDown]
public void TearDown()
{
var context = TestContext.CurrentContext;
// context.Test.Name
// context.Result.Status
}