还有很多定义和区分级别的其他方法。而无论用什么方法,分析任务总是合适的。这里要注意的是,需要避免随意地从创建十分简单的测试变成创建特别冗长复杂的测试。(一致同意)
24. Scripts loaded into the framework’s function library should generally contain error checking. (Consensus) 被载入框架的函数库的脚本一般应该包括错误检查功能。(一致同意)
This is good practice for any type of programming, but it is particularly important for test code because we expect the program that we’re testing to be broken, and we want to see the first symptoms of a failure in order to make reporting and troubleshooting easier.
这是任何类型编程都能得到的好经验,但是对于测试代码尤其显得重要。因为,我们希望我们测试的程序出现问题,并且,为了使报告和排除故障变得容易,我们希望看到失败的最初征兆。
25. When creating shared library commands, there are risks in dealing with people’s differing programming and documentation styles. People will not use someone else’s code if they are not comfortable with it.(Consensus)
当创建共享库命令时,就会出现处理不同编码和文档风格的问题。因为如果人们对某人的代码不满意,他们就不会使用它。(一致同意)
26. Beware of "saving time" when you create a scripts by circumventing your library. Similarly, beware of not creating a library. (Consensus)
在通过包绕函数库创建脚本时,要注意节省时间。与此类似,要注意不要创建单独的一个库。(一致同意)
The library is an organized repository for shared functions. If a function is too general, and requires the user to pass it a huge number of parameters, some programmers (testers who are doing automation) will prefer to use their own special-purpose shorter version. Some programmers in a hurry simply won’t bother checking what’s in the library. Some programmers won’t trust the code in the library because they think (perhaps correctly) that most of it is untested and buggy.
函数库是一个有组织的共享函数储藏区。如果有个函数太全面,需要用户向它传递大量的参数,那么一些程序员(正在做自动化的测试者)就可能会使用他们自己特定目的的较小版本。而有的程序员由于匆忙,不在意检查库中的代码。还有的程序员则不信任库中的代码,因为他们觉得(或许是正确的)库里的大部分东西没有被测试过,存在着bug。
27. It is desirable to include test parameters in data files such as .ini files, settings files, and configuration files rather than as constants embedded into the automation script or into the file that contains the script. (Consensus)
应该把测试参数包括在数据文件中,例如.ini文件,设置文件以及配置文件,而不是把嵌入在自动化脚本或含有脚本的文件中的常量包括在内。(一致同意)
28. Wrappers are a good thing. Use them as often as reasonably possible. (Consensus) 包裹是一个好东西。要尽可能多的合理使用它们。
Localization
文章来源于领测软件测试网 https://www.ltesting.net/