We utilize swagger (https://swagger.io/docs) to generate documentation for the API endpoints, this allowed Patrick to easily understand how the API is used without me putting too much effort into writing extensive documentation.
Integration testing proved to take up a lot of my time this week as I constructed test cases which helped me realize my API's logic needed reworking, I can see why people talk a lot about test-driven development wherein developers write the unit/integration tests before writing the code themselves. My tests were testing the entire API using a test model database so that it was not dependent on a live database.
Pictures above is some integration testing code, I tried to cover as many edge cases as possible but I think I'll find myself iterating on this in the future.
Not a whole lot to report for this week, I spent a large amount of time reading code haha.
No comments:
Post a Comment