首页 > 代码库 > [Unit Test] Unit Test Brief Introduction
[Unit Test] Unit Test Brief Introduction
Levels of Testing
- Acceptance
- Performance
- Functional
- Integration
- Unit
Why Unit Testing
- Feedback Cycles
- Usage Model
- Eailier Bug Detection
- Refactoring
Test Driven Development (TDD)
`Write the tests before writing the code (incrementally)
- Better requirements understanding
- Better decomposition and design
- Better code testability
- Known expectation of code hebavior
- Bonus: unit tests & coverage
Frameworks
-General xUnit framework: Junit, Nunit CppUnit
-Mocking framework: mockito, easymock, powermocks
-Domain specific framework: HTTPUnit, xmlUnit, DBUnit
-Code Coverage: EclEmma Clover
-Performance Testing Tools: JMeter JUnitPerf JMeter + Badboy NeoLoad WAS
-Continuous Integration Tools: Jenkins, CruiseControl
-Web Service UI: SoapUI Rest-Client
Writing Unit Tests for legacy Code
- Legacy Code any code without tests
- Refactoring: Layer, Injection
- Characterisation Test
Rspec
Aptana Studio
SPAL
[Unit Test] Unit Test Brief Introduction