- Test-Driven Java Development(Second Edition)
- Alex Garcia Viktor Farcic
- 206字
- 2021-06-24 18:31:48
Code coverage tools
The fact that we wrote tests does not mean that they are good, nor that they cover enough code. As soon as we start writing and running tests, the natural reaction is to start asking questions that were not available before. What parts of our code are properly tested? What are the cases that our tests did not take into account? Are we testing enough? These and other similar questions can be answered with code coverage tools. They can be used to identify the blocks or lines of code that were not covered by our tests; they can also calculate the percentage of code covered and provide other interesting metrics.
They are powerful tools used to obtain metrics and show relations between tests and implementation code. However, as with any other tool, their purpose needs to be clear. They do not provide information about quality, but only about which parts of our code have been tested.
Let's take a look at one of the most popular tools used to calculate code coverage.
- SpringMVC+MyBatis快速開發(fā)與項(xiàng)目實(shí)戰(zhàn)
- jQuery從入門到精通 (軟件開發(fā)視頻大講堂)
- 名師講壇:Spring實(shí)戰(zhàn)開發(fā)(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- Learning Node.js for .NET Developers
- Qt5 C++ GUI Programming Cookbook
- 愛上C語言:C KISS
- Scala Functional Programming Patterns
- ASP.NET求職寶典
- Go語言入門經(jīng)典
- Practical Predictive Analytics
- Software-Defined Networking with OpenFlow(Second Edition)
- 算法超簡(jiǎn)單:趣味游戲帶你輕松入門與實(shí)踐
- Wearable:Tech Projects with the Raspberry Pi Zero
- Joomla!Search Engine Optimization
- JBoss AS 7 Development