編寫單元測試 的英文怎麼說
中文拼音 [biānxiědānyuáncèshì]
編寫單元測試
英文
writing the unit tests-
Martin has also written several books and i can recommend his refactoring : improving the design of existing code book, which you can also find on the website
我不會在書中講述很多敏捷開發方法,但是我會使用單元測試和簡短的概念,單元測試設計,然後反復編寫代碼在書中將貫穿整個項目。Furthermore, as an addict, i tend to write a plethora of test cases
而且,作為一個單元測試狂,我喜歡編寫多餘的測試用例。You can create unit tests using a code generation feature that creates the initial source code of the test, or you can write the test completely by hand
可以使用能夠創建測試的初始源代碼的代碼生成功能來創建單元測試,也可以完全手動編寫測試。What clearly emerges while using testng is that this framework is already a good choice for writing unit tests, and that it is, by design, simple to integrate with other libraries and tools, so its future development can bring developers some interesting news. a new path has been forged
在使用testng時最明顯的是,這個模板已經是編寫單元測試的一個好選擇了,而且,在設計上,它與其他庫和工具的集成非常簡單,所以它未來的發展會給開發人員帶來一些有趣的新東西。To add to your test project a source file that contains a valid but empty unit test method that you can then code by hand. use unit test wizard
使用「單元測試」在測試項目中添加一個源文件,該文件中應包含一個有效的空白單元測試方法,您以後可以手動編寫該方法的代碼。Write unit tests before you write the code
在編寫代碼之前編寫單元測試。Write unit test programs for your code
為你的代碼編寫單元測試程序。You accomplish several quality goals by writing unit tests first
您通過首先編寫單元測試來完成幾個質量目標:You can write unit tests by hand or generate them automatically
既可以手動編寫單元測試,也可以自動生成它們。You would write the unit tests, run them, and see that they fail
你將編寫單元測試程序,運行他們,看到他們運行失敗。Write unit tests
編寫單元測試。When you re dealing with simple data or service objects, writing unit tests is straightforward
當您正在處理簡單數據或服務對象時,編寫單元測試很簡單。Mock objects are a useful way to write unit tests for objects that act as mediators. instead of calling the real
模仿對象( mock object )是為起中介者作用的對象編寫單元測試的有用方法。The unit testing framework provides numerous additional assert classes and other classes that give you flexibility in writing unit tests
單元測試框架提供了眾多的附加assert類和其他類,為您編寫單元測試帶來了極大的靈活性。I will then show you how i would write a unit test for this class, after which i will add the unit test to the build process
然後,我會告訴您我是如何為這個類編寫單元測試,以及在編寫完它以後又是如何將單元測試添加到構建過程中的。Finally we have considered an example in java and based on its ecfg, applied these cases to arrive at the e - cc of the total system as well as proposed a methodology for calculating the basis set, i. e., the set of independent paths for the oo system that will help in creation of test cases for code testing
這會對代碼測試產生測試用例帶來幫助。在cfg被用做單元測試的同時, ecfg也會用作對所有面向對象軟體類的綜合測試。最後,我們在一個用java編寫的代碼例子上應用我們的模型,計算ecc和基礎集合去證實我們的解決方法。To illustrate the use of testng, i ll write some unit tests for a widely used open source library called jakarta common lang, which contains some useful classes to handle and manipulate strings, numbers, and java objects
為了演示testng的用法,我要為叫做jakarta common lang的這個廣泛應用的開源庫(其中包含一些處理和操縱字元串、數字和java對象的有用的類)編寫一些單元測試。You can use them when you have written the unit test from scratch or are refining a unit test that was generated from code you are testing
當您從頭開始編寫了單元測試或對由測試的代碼生成的單元測試進行改進時,您便可以使用這些類和成員。Good developers write the unit tests first. once tests are done, they write implementation code until the unit tests pass. then they stop
好的開發者應該先寫單元測試。測試代碼完成以後,他們才開始編寫具體的實現代碼,並使之能夠通過單元測試。然後當前的開發就可以告一段落了。These attributes are assigned automatically when unit tests are generated ; when you code unit tests by hand, you have to add class and method attributes yourself
屬性標記的測試方法。這些屬性是在生成單元測試時自動分配的;如果是手動編寫單元測試代碼,則必須自行添加類和方法的屬性。分享友人