深入BDD规则实施(rule processing)(3)
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://xmuxsp.blog.51cto.com/144876/75651 |
User exit scriptsIn some situations the standard rule processing options may not be sufficient to meet your requirements. To extend the capabilities of rules, you can create user exit script(s).
在某些情况下标准规则实施选项并不足够满足需求。要扩展规则的能力,你需要创建用户exit脚本。
User exit scripts are specified in the customsettings.ini file, and are processed before and after the CustomSettings.ini rules for each section are processed. User exit scripts have full access to the global variables.
用户exit脚本在customsettings.ini中制定,而在customsettings.ini的sections规则前后实施。用户exit脚本能完全访问全局变量
The user exit script is essentially a function library. You create the functions you need to extend the rule processing functionality and then place them in a user exit script. You then reference the functions within the user exit script from the customsettings.ini file.
用户exit脚本本质上是一个函数库。你可以创建你需要的函数来扩展规则,并把他们放到用户exit脚本中。接下来你能在customsettings.ini中引用这些函数。
For example you may want to use the MAC Address with the colons stripped out as the computer name. A function can be used to “clean” MAC address. The result of the function can then be assigned to the computer name.
例如你想要使用不带冒号的mac地址来作为电脑的名称。一个函数用于删除那些冒号。
The following is an example of a eser exit script that would perform this function.
|


xmuxsp
博客统计信息
热门文章
最新评论
友情链接