DEV Community

Niaz-Ul-Haque
Niaz-Ul-Haque

Posted on

Finally done. Automated testing, and CI. Heavy Personal Updates

Hello there all. It's been a while since my last blog post. This is probably my last blog post regarding my CLI program. I will still be posting blogs on other programming work I will do so no worries. This latest update took a while as I had to add lots of new things that I never used before. Ofcourse, it took more time but thanks to my professor for the extension, I was able to complete it and upload it a bit late than the due date. I will talk about what functionality I added below.

First off, wanna start with saying thank you to the professor for the extension. I had personal issues that I did not expect to occur, due to that I got late with my coursework. I started the latest update with adding a testing framework for my program. I used mocha first, but changed to jest few moments late. This is mainly because I felt jest was more simpler to use. Both does the same work tho. After Installing, I wrote my first ever test. The test was simple as it was checking a single function. It worked perfectly after few errors.

Secondly, I added mock tests for the program, followed by code coverage analysis. the mock tests gave me a very good result on my CLI program regarding BAD and GOOD links. I did some research on conde coverage analysis, and I got the information I needed for the program. The mock tests part was a bit more fun than the other parts. well, it felt like that but I don't know the actual reason, why? Probably because of writing mock tests and getting it to work haha.

Thirdly, I added CI (Continuous Integration). What is CI you may ask, Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. It is for automated testing when ever you push you latest release. I used GitHub's own CI called GitHub Actions for my project. I added the GitHub actions through the GitHub UI for my repo. Then, I added few more tests and pushed to see if it was working fine or not. Yep, it is still working fine.

Finally, wanna come to an end to my "last update" part of the blog post. I added a test to one of the member from the opensource community. I was looking around and reading few people's source code, and planning to add any tests that were missing. I luckily found 1 real quick as hi mentioned "No member Found". So, I guessed that he is still looking for one, so I did a pull request to his CLI.

Ahhhh. That's it for my programming update. I will be uploading more post regarding my release 0.4 in the upcoming days, so keep you eyes open. Now, to talk about personal stuffs. early last week was wow. I had a water leakage from the 2nd floor (from the washroom), everyone in my house was sleeping/resting. From the 2nd floor, the 1st floor and the basement got flooded. Me and my uncle worked hard removing water. It took a lot of time than I expected. We called the insurance guys over, they came in the next day BUT, they destroyed the sleeping schedule I had and restricted access to some areas in the house. It got me delayed on lots of my school work for the week. But, luckily I got an extension for my CLI program, and my data structures assignment. It helped, and thanks to the professors for extending. Yep, that's what happened this past days. But, gotta be super prepared cause this current week and the next is full of final exams and tests. Need to study nd be on my best shape for the exams. Anyway, that's what I wanted to talk about on my personal life. I'll update you guys real soon regarding my release 0.4 update and plans. Till then, thank you for your time and take care.

(LINKS)

Actions

The Repo I added a test to

Top comments (0)