[英]NUnit in Finalbuilder: How can I provide a path to nunit-console without the finalbuilder option
My shop has a precedent of checking in 3rd party tools to source control and using relative paths in projects/builds to find everything. 我的商店开创了先签入第三方工具以进行源代码控制并在项目/构建中使用相对路径查找所有内容的先例。 Also, as NUnit releases new versions there have been several versions of NUnit admitted to this 3rd party libraries section in source control, so that changing older tests wasn't necessary to start using newer versions. 另外,随着NUnit发布新版本,源代码管理的第3方库部分中已经包含了NUnit的多个版本,因此不必使用旧版本的测试就可以开始使用新版本。
However, Finalbuilder defines the path to nunit-console.exe in the Tools | 但是,Finalbuilder在“工具” |“工具”中定义了nunit-console.exe的路径。 Options menus, and not only does this path not use environment variables, but there's only one of it. 选项菜单,并且此路径不仅不使用环境变量,而且只有一个。
Is there some way I'm missing to supply a path to the NUnit action? 我是否有某种方法无法提供NUnit操作的路径?
You can do this in the BeforeAction script event (javaScript) : 您可以在BeforeAction脚本事件(javaScript)中执行此操作:
var nunitOptions = GetOptionsObject("NUnit")
nunitOptions.NUnitLocation = FBVariables.MYUNITPATH
where MYUNITPATH is a FinalBuilder Project variable that points to nunit. 其中MYUNITPATH是指向nunit的FinalBuilder Project变量。 Note that you should avoid relative paths for this since they are not fully supported due to the multithreaded nature of FB. 请注意,您应该避免使用相对路径,因为由于FB的多线程特性,它们并未得到完全支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.