- #108
- #107
- #106
- #105
- #104
- #103
- #102
- #101
- #100
- #99
- #98
- #97
- #96
- #95
- #94
- #93
- #92
- #91
- #90
- #89
- #88
- #87
- #86
- #85
- #84
- #83
- #82
- #81
- #80
- #79
- #78
- #77
- #76
- #75
- #74
- #73
- #72
- #71
- #70
- #69
- #68
- #67
- #66
- #65
- #64
- #63
- #62
- #61
- #60
Why Should Software Be Tested?
Writing tests is a good thing, right? It can automatically verify the behavior of the program and ensure its correctness, so you don’t have to test manually every time.
This was my initial thought, and then I dove in and wrote a lot of tests, spending a lot of time adding tests for every feature, only to find out… it didn’t really make much difference.
⚠ Tests are only valuable when executed
The value of a program is reflected when it is executed and used, and the value of a test is also reflected in its ability to verify the correctness of a certain behavior of the program; even if the program’s architecture is poor, it can still produce value because it works. Similarly, a test can be perfect, but if it doesn’t verify any behavior, it has no value.
The biggest mistake I made was simply writing a lot of tests without actively executing them. Letting the tests run and verifying the behavior of the program is where the value of testing lies; successful tests give you confidence, while failing tests help you catch bugs.
The confidence here refers to being sure that the program behaves as expected, allowing you to structure the code with more confidence and ensure that changes won’t affect the verified behaviors. The importance of integrating tests into the development process is as significant as the tests themselves; tests that don’t run are merely case documents. Does anyone ever look at infrequently used and non-binding specification documents? No!
- #59
- #58
- #57
- #56
- #55
- #54
- #53
- #52
- #51
- #50
- #49
- #48
- #47
- #46
- #45
- #44
- #43
- #42
- #41
- #40
- #39
- #38
- #37
- #36
- #35
- #34
- #33
- #32
- #31
- #30
- #29
- #28
- #27
- #26
- #25
- #24
- #23
- #22
- #21
- #20
- #19
- #18
- #17
- #16
- #15
- #14
- #13
- #12
- #11
- #10
- #9
- #8
- #7
- #6
- #5
- #4
- #3
- #2
- #1