
In the Unit Testing course I learned a lot of key important concepts such as the difference between unit testing/test-driven development, the different types of software testing such as manual/automated, how to use Visual Studio’s Test Explorer, how to use runners and test suites for automated testing, the seven testing principles, and other important software testing concepts.
Course reflection
Knowing how and why you need to test your code is a very important skill to when it comes to software development. How do you know if a function is working as intended, or if a calculation is producing the correct results? Well, that’s where testing comes into play.
In this course I learned how to produce test cases (tables) of valid data, edge data (tests that fall close to the range of valid data), and incorrect data that could be used to verify a program is producing correct results. In addition to test cases, I learned how to utilize Microsoft’s Test Projects in Visual Studio to test expected results against actual results through the Assert function.
The first function I learned how to use was the Assert.AreEqual function. This function takes the result value, and checks to see if it matches the actual value (which would call a function in the main class and returning the value for comparison) and if it does the test passes. You also have a delta as an option parameter that is used for comparing doubles (the amount of places after the decimal).
Finally, I learned how to automate the test cases using the DataTestMethod tag and DataRows instead of creating multiple Asserts for testing. This made testing so much easier, efficient, and expandable.
Overall, I feel like everything I learned in this course will be a very vital skill/knowledge to have when making my way through the software development industry. Testing is so important and I know in the future it will be a something I’ll be doing a lot of.