我可以使用* .runsettings文件来调用url而不是app.config文件 [英] Can i use *.runsettings file to call the url instead of app.config file

查看:89
本文介绍了我可以使用* .runsettings文件来调用url而不是app.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想使用test.runsettings文件而不是使用App.config文件来启动浏览器。

I would like to use test.runsettings file instead of using App.config file to launch the browser.

这可能吗?

请给我一些如何创建runsettings文件并调用url以启动浏览器的步骤。

Is so could be please give me the steps how to create runsettings file and call the url to launch the browser.

提前谢谢

PV

推荐答案

嗨PV,

感谢您在MSDN论坛上发帖。

Thanks for post in MSDN forum.

据我所知,我们不能使用 .runsettings文件而不是app.config文件编码的UI测试中的

As far as I know, we cannot use .runsettings file instead of app.config file in Coded UI Test.

.runsettings  文件用于配置 单元测试
用于某些目的。

The .runsettings file is used for configuring unit tests for some purposes.

https:// msdn。 microsoft.com/en-us/library/jj635153.aspx?f=255&MSPPError=-2147217396

我在我身边使用.runsettings文件创建了一个简单的单元测试,它可以获得输出值。

I created a simple unit test using .runsettings file in my side, and it could get the output value.

但是,当编码的UI测试时,我得到错误"测试方法UnitTestProject1.CodedUITest1.CodedUITestMethod1引发异常:System.NullReferenceException:对象引用未设置为对象的实例。"

But, when comes coded UI test, I got the error "Test method UnitTestProject1.CodedUITest1.CodedUITestMethod1 threw exception: System.NullReferenceException: Object reference not set to an instance of an object."

所以这真的是一个限制。

So it's really a limitation.

参考:

http://stackoverflow.com/questions/32597776/testcontext-testrunparameters-in-coded-ui-test

抱歉,这给您带来了诸多不便。

Sorry about this brought you such inconvenience.

祝你好运,

Fletcher


这篇关于我可以使用* .runsettings文件来调用url而不是app.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆