JUnit

 JUnit是個單元測試(Unit test)框 架,單元測試指的是測試一個工作單元(a unit of work)的行為。舉例來說,對於建築橋墩而言,一個螺絲釘、一根鋼筋、一條鋼索甚至一公斤的水泥等,都可謂是一個工作單元,驗證這些工作單元行為或功能 (硬度、張力等)是否符合預期,方可確保最後橋墩安全無虞。


VV https://cpmaltose.wordpress.com/2017/08/01/junit-fast-tutorial/


VV  Junit 4 詳細介紹 

在這邊需要注意的是~

所有的的method都要是public

而@BeforeClass與@AfterClass的兩個method 還要加上static才能運作

 

下次再發Spring+Hibernate的Junit的配置

有關自動化測試等到下次發Junit時再一併說明

https://nerdyworld.pixnet.net/blog/post/24269847


VV Junit5 

https://blog.cti.app/archives/5393

https://medium.com/java-magazine-translation/part-2-%E4%BD%BF%E7%94%A8-junit-5-3fde2f696d4c


https://openhome.cc/Gossip/JUnit/UnitTest.html

https://ithelp.ithome.com.tw/articles/10192367

https://hackmd.io/@KaiChen/rJ6Al2WKI


https://www.itread01.com/content/1568721962.html



留言

這個網誌中的熱門文章

考績被打差了 輕率離職會更傷

Arrays - DS (Reverse array) [Easy]

WireMock