This past week I dived deep in to testing and test driven development. I felt that I had a surface level understanding of testing and I hoped to deepen my understanding while also developing useful skills for my development process. I also brushed up on middleware, endpoint filters, and input validation in controllers (finished out the Microsoft backend for beginners video playlist).

For testing, I initally watched some videos and read online articles, I reviewed my notes from software methods and tools course. I started getting good traction in the testing section in the book Tools and Skills. This was a great idea since it targeted beginners and was very comprehensive. There is a ton of variety in testing and it was helpful to understand how it all works together. The first tutorial I completed was on the xUnit testing framework, the open source go to testing framework for C#. Next I looked at tutorials covering unit tests, integration tests, testing a sqlite database in memory, and testing routes in an API.

Tutorials completed:

  • xUnit tutorial
  • Videos - Middleware, Endpoint Filters, Dependency Injection
  • Tools and Skills Book - Testing Section
  • I jumped around some of the tutorials in the docs as well. If I have time I will paste links to those as well.

For this week’s miniproject I started with building an API similar to my previous miniprojects and testing the routes and logic along the way. I tested status codes. I also practiced putting a sqlite db in to memory for running tests.

This week will be all about user authentication and authorization. It plays a big role in my project since there are clients and contractors who will have different permissions. After that I plan to build out my api with the project management module and user authentication before moving to the second half of my structured learning which leans more to dev ops and best practices.

There are no impediments in my way. I just need an extra day in the week but it’s good to be busy.

Upon reflecting this past week, I think testing finally clicked for me. I am so used to writing some code, see if it works (by hand) and then moving on. I just need that phase of “see if it works” to be automated. With this mindset testing makes a bit more sense. I look forward to revisiting testing in CI/CD pipelines as well.

Also, sometimes reading a beginner friendly book is better than google or documentation.