還有很多定義和區分級別的其他方法。而無論用什么方法,分析任務總是合適的。這里要注意的是,需要避免隨意地從創建十分簡單的測試變成創建特別冗長復雜的測試。(一致同意)
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
文章來源于領測軟件測試網 http://www.kjueaiud.com/