반응형
Benefits of automated Testing
-
Test your code frequently, in less time
-
Catch bugs before deploying
-
Deploy with confidence
-
Refactor with confidence
-
Focus more on the quality
-
Refactoring means chaging the structure of the code without changing its behavior.
Types of tests
-
Unit Test : Tests a unit of an application without its external dependencies.Cheap to write , Execute fast, Don't give a lot of confidence
-
Integration Test : Tests the application with its external dependencies.Take longer to execute, Give more confidence
-
End-to-End Test : Drives an application through its UI.Give you the greatest confidence, Very slow, Very brittle
With TDD you write your tests before writing the production code
Test-driven Development
-
Write a failing test.
-
Write teh simplest code to make the test pass.
-
Refactor if necessary.
세 스텝을 반복해서 목적하는 코드를 완성하는것.
Benefits of TDD
-
Testable Source Code
-
Full Coverage by Tests.
-
Simpler Implementation.
Characteristics of good unit tests
-
First-class citizens
-
Clean,readable and maintainable
-
No logic
-
Isolated
-
Not too specific/general
What to test and what not to test
-
Language features
-
3rd-party code
Naming and organising tests
-
[MethodName]_[Scenario]_[ExpectedBehaviour]
Basic techniques
Writing reliable tests
반응형
'Programming > C#' 카테고리의 다른 글
Delete All Files (0) | 2021.06.14 |
---|---|
OOP 설계의 기본 원칙 SOLID (0) | 2019.09.15 |
닷넷에서 오라클에 접근하는 7가지 방법 (0) | 2017.12.08 |
세션의 SET 옵션 확인하기 (0) | 2017.12.08 |
LinqToDataSet Helper (0) | 2017.09.29 |