This week in OSD600 (Open Source development) at Seneca, Lab8 required us to set up testing framework for our Link Checker, write the test and include a test for 200 and 404 Responses for a given URL. We had to add code coverage analysis and then merge the testing into our project. Then we had to add continuous integration and add a test to someone else's project.
Since my project is in node.js I needed to do the necessary reading to figure out how I was going to create this test. I created an index.test.js file that runs the test and then added code that supported the test in my Link Checker. After I ran the test I saved, commit my changes to the testing branch and created the PR and merged testing.
The next thing I had to do was supposed to be simple. I had a file path issue when I tried to create the PR to Test my CI. As a student, our knowledge only goes so far. I tried to move the packages.json and that didn't work. I consulted some friends in and out of the class. Seemed like I ran in full circle ending up back with the same issue. I tried so many things that I have a very long list of commits to the branch. After 4 hours of not being able to figure out what to do, our awesome professor came to my rescue. Something I need to pay attention to when creating a project. File path is important and obviously I need more practice. After I created the node.js.yml and made the PR, the file path was fixed and merged to my project.
I will admit, I was a little hesitant creating a test for my friend's Link Checker. I added more to his test and then noticed he had some minor errors. I fixed the errors and then tested his project. All was good so I proceeded to create the PR. My friend happy with the test and the fixes, he merged this PR.
Now that I've learned more about testing, I feel that it is important to learn more. I need way more practice of course and I'm sure that these mistakes I've made along the way won't be the last. I also feel like I have barely scraped surface of the knowledge on how to use git. When I'm finished, I will get to reading that git book I purchased!
Top comments (0)