gr8vyguy@Blogjava

          JUnit Best Practices

          Do not use the test-case constructor to set up a test case, use setUp().

          Don't assume the order in which tests within a test case run.

          Avoid writing test cases with side effects.

          Call a superclass's setUp() and tearDown() methods when subclassing

          Do not load data from hard-coded locations on a filesystem

          Keep tests in the same location as the source code

          Name tests properly

          Ensure that tests are time-independent

          Consider locale when writing tests

          Utilize JUnit's assert/fail methods and exception handling for clean test code

          Document tests in javadoc

          Avoid visual inspection

          Keep tests small and fast

          Use the reflection-driven JUnit API

          Build a test case for the entire system

          Test thread safety

          posted on 2007-04-24 11:07 gr8vyguy 閱讀(484) 評(píng)論(0)  編輯  收藏 所屬分類: Java

          <2007年4月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          導(dǎo)航

          統(tǒng)計(jì)

          公告

        1. 轉(zhuǎn)載請(qǐng)注明出處.
        2. msn: gr8vyguy at live.com
        3. 常用鏈接

          留言簿(9)

          隨筆分類(68)

          隨筆檔案(80)

          文章分類(1)

          My Open Source Projects

          搜索

          積分與排名

          最新評(píng)論

          主站蜘蛛池模板: 康定县| 馆陶县| 镇远县| 邢台市| 界首市| 江永县| 贵德县| 通许县| 石首市| 永胜县| 璧山县| 湘潭市| 牟定县| 泾源县| 库车县| 同仁县| 犍为县| 高唐县| 兴宁市| 灵璧县| 彰化市| 嘉峪关市| 定结县| 鹰潭市| 石柱| 贵州省| 开平市| 苏尼特右旗| 鄯善县| 阿鲁科尔沁旗| 塘沽区| 舞阳县| 台东县| 木兰县| 黎平县| 工布江达县| 龙井市| 淄博市| 监利县| 石首市| 长沙县|