Tuesday, March 17, 2020

cst438 software engineering


In your own words, what is TDD about? 
Test-Driven Development (TDD) is done in order to use tests to develop code. It results in code that is well tested and easier to read than other methods, so better. The tests used should be Fast, Independent, Repeatable, Self-checking, and Timely (FIRST). Learning how to use the testing suite should save more time in the long run and you should have all the testing done by the end. In it, we do the three steps of Red, Green, and Refactor. First, write and run a test to make sure it fails, then write the minimum code to pass the test, then refactor the code to make it less redundant while passing the tests, then repeat the 3 steps.
What is a MOCK and how does it help in unit testing?
A mock is used for testing. It has all of the information needed to run the test but isn’t the actual object you are testing. If it needs to be as complex as an object, use an object by using a factory or fixture. This helps isolate issues with testing functions but not the implementation of the object.



No comments:

Post a Comment

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...