开发者

How to pass parameters to NUnit Test Cases through the UI

Is th开发者_运维知识库ere any third-party UI tool to accept and pass parameters to NUnit Test Cases? I am desperately looking for it. Your comment and suggestion are much appreciated!!


Not that I'm aware of, you could prompt with a simple winforms dialog for some text from the [Setup] method before each test. I'm not sure however you would be able to work out which test was being run at this point. You would also need to take care re-threading as nunit 2.4 will not run tests using UI capable threads (STAThreads).

Far better would be to load test configuration data from an input file during [SetupFixture]


I was using Interaction.InputBox Method.


Maybe you can use the TestCaseSource attribute

You can pass data in test even from file or a collection of items.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜