今天想寫個單元測試不想手寫百度 發現idea JUnitGenerator V2.0可以實現 但沒達到想要的結果

今天想寫個單元測試

1.    前提條件

  • 開發環境已正確配置
  • 工程已解決JUnit依賴關係(pom.xml)
  • 我用的是4.12版本:
    1 <dependency>
    2     <groupId>junit</groupId>
    3     <artifactId>junit</artifactId>
    4     <version>4.12</version>
    5 </dependency>

     

 

2.    IDEA中JUnit配置

  打開Settings窗口搜索junit,如圖(兩個插件都勾選添加):

 

  JUnitGenerator V2.0插件,可以幫助我們自動生成測試代碼。如果搜索juni

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章