How to write tests that find bugs - Software Engineering Unlocked Podcast

How to write tests that find bugs - Software Engineering Unlocked Podcast

Introduction

So this is a summary on the amazing Podcast which I listened on Software Engineering Unlocked Poadcast.

Importance of Testing

Testing is the process of executing a program with the aim of finding errors. To make our software perform well it should be error-free. If testing is done successfully it will remove all the errors from the software.

As a developer it's important to have critical thinking and find a positive approach towards getting it perfectly fit that's where code reviews helps to find out the missing things for developer's and make them effective towards fixing it. And there's one thing I learned about is domain testing and structural testing how do they integrate with each other.

So just imagine you wrote your feature, maybe you did test-driven development, and now it’s time that, you know, for systematic testing, you want to explore all the possible edge cases to look for bugs. Author's first suggestion is for you to do domain testing, meaning you look at the required. You know what the program needs to do, and this is the requirements.

It doesn’t have to be Unified Modeling Language or a user story, whatever you like. And then you systematically apply domain testing techniques there to come up with test cases. So, you know, those are the inputs of program. These are the outputs of the program. After this you create multiple test cases. And after running those look on your source code and try to think of hints which you can Implement to make optimization successfully and do some extra testing if required.

Different Types Of Testing

property-based testing, design the contracts are two techniques that should be majorly considered core for someone that wants to grade group tests.

Main Testing - Main Testing can be done at any level and second thing is about code coverage usually focused on unit testing. And, but the main difference from what we will see is there is that code coverage is not there for us to see a number.

Code Coverage

Code coverage is performed to verify the extent to which the code has been executed. Code coverage tools use static instrumentation in which statements monitoring code execution are inserted at necessary junctures in the code. Now, adding instrumentation code does result in increased execution time and code length.

The first way you should use code coverage is before augment the test cases you created before. So their test should always come from requirements because you should test what the program should do, and then code coverage as a way to document your test cases. And if you’re using the tool to see if you missed the test case, then code coverage becomes always relevant. The code coverage can be a nice guidance for you. This is the tip from guest of podcast. Don’t use code coverages, a number that you blindly try to achieve.

Conclusion

So this was a half part which I have explained to you ,In the podcast further they have covered about unit testing and in-depth about execution and test pyramid, integration testing and lot more , so If you liked my summary and want to get more knowledge about Software testing's head over to Software Engineering Unlocked Poadcast for complete episode.