我可以将参数值从TestInitialize传递给TestMethod吗? [英] Can I pass a parameter value from TestInitialize to TestMethod?
问题描述
我知道您可以使用DbParameter对象在预测试,测试和测试后脚本之间传递SQL值,但有没有办法从TestInitialize()方法中检索SQL值?
I know you can pass SQL values between pre-test, test, and post-test scripts using DbParameter objects, but is there any way to retrieve SQL values from the TestInitialize() method?
我想在TestInitialize中运行一个脚本,该脚本设置一个公共数据集,用于该类中的所有TestMethods。问题是,我需要在TestInitialize中生成的记录的ID,所以我可以在"测试"中测试它们。脚本。
I want to run a script in TestInitialize that sets up a common data set to use in all the TestMethods in that class. The thing is, I need the IDs of the records generated in TestInitialize so I can test them in the "test" script.
感谢您的帮助。
>> Matthew
>>Matthew
推荐答案
嗨Matthew,
Hi Matthew,
这是一个快速通知,告诉您我们正在对此问题进行研究,并会尽快回复您。感谢您的耐心等待。
This is a quick note to let you know that we are performing research on this issue and will get back to you as soon as possible. I appreciate your patience.
最诚挚的问候,
这篇关于我可以将参数值从TestInitialize传递给TestMethod吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!