Lab 8



    This week our task was to add tests to our Command Line Interface repository we have been working on this semester. The first thing I did was to read my README.md. This was the first thing I did because it has been a while since I have worked on this repository. Reading this document helps me remember where I left off and remind me off. In addition, I try my best to make small updates to the README file every time I read it. This helps keep the documentation up to date while refreshening my memory on how to use my program. 

    The framework that I chose to set up for my testing was Unittest. I chose unit test because, while I was researching, I read that developers use unit test since it is easy to read, write, and reliable. The tutorials and steps given on the document were very straightforward and allowed me to start writing my test with little effort. Although, this was my first time writing tests, by reading the documentation I was able to create two tests that checked the response codes from Google.


    For me, the hardest part about this lab was adding continuous integration onto my Github repository. I had a difficult time configuring the YAML file. The problem was that I had created the fixes on the Master branch to resolve the issues on the new branch with the Continuous Integration workflow. This resulted in me creating multiple workflows in order to get it to work, however, It was all worth it at the end. I had a beautiful workflow program running. This brought us back full circle to the documentation, since I had updated the documentation before I had started, It didn't take much effort on updating the README.md. I simply demonstrated how to run the tests.


    Creating test on someone else’s repository was surprisingly simple. This was due to the fact that the repository owner and myself both used Jest. This made the testing very simple to understand since I have already built test using Jest. It was interesting to see someone else’s code and how I could try and break it. A good example of this would be how I tested for an empty object or an empty array. I’m not exactly sure how you would send in an object on the rate as an argument however I thought it would be still worth checking. It seems like I will be building tests for the rest of my life. It's time to get comfortable writing tests.



Comments

Popular posts from this blog

Working with others

We are off! V0.1

The Progress