Source: https://blog.bugsnag.com/better-software-testing/
I found a blog post called “You don’t have enough tests and you never will!” by William Starling. This post he talks about how there is never enough tests for coding. The reason why people do test is because the earlier you find a bug the cheaper it is to fix it. The sooner a developer finds the bug right after writing the code they can quickly fix it. He then goes off by talking about different tests such as unit testing, integration testing, and system testing. Testing is hard and software is complex. No matter how many testing you do there will always be a bug. He says a lot of software teams gets too caught up on trying to measure how much testing is being done. Sometimes they would do an unhelpful testing that would say the program is 100% correct but they are testing for the wrong behavior and the test itself could be buggy as well. So what is the best testing strategy? Typically the best is where you are testing for major and the most obvious bugs at first. Then you would test things that would affect the security or integrity of the program. An example he talks about is that what if you want to make a self-driving car so you don’t want to have it drive off the road thinking it’s still within the lines. More tests does not mean there are going to be less bugs. Focusing the tests in the right places can be the difference between a good code and a bad code. Examples of areas where testing can make a difference is complex logic, public accessible interfaces, and high impact code. You should also design your code to be able to modify later on to fix those bugs. Once the program is out for the public the best way for bug testing is the consumer themselves. When people are using the software they will find things that many programs will never think of so that way.
I chose this blog because testing code has come up a lot whenever I write code. In class, we do code that no matter how we wright it once it prints that final line we are done with it. However once we get out into the real world we are going to be writing code that will be used constantly and would be seen by billions of people and sometimes it won’t run the way that we expect it to and we would have to fix it so reading up on how to text and what test we should do is a good way to prep-ourselves for future projects
From the blog CS@Worcester – The Road of CS by Henry_Tang_blog and used with permission of the author. All other rights reserved by the author.