2025-07-11 MyCmd and MyProject Weekly Progress Report: 2025 Week 28

MyCmd and MyProject Weekly Progress Report: 2025 Week 28

This week’s demoable goal was to get a snapshot testing framework up and going so I could test CLI execution and compare output to a known good state. I was able to do this.

To implement a snapshot test, I build upon my shunit2 based testing. Each snapshot test consists of three functions, each with the same suffix for the test case name:

Here is an example test case: list tasks invalid project test case.

In the assert function, the filtered output from the test execution is compared against the stored expected snapshot from the testing/snapshots directory.

Demo

Now, I have the command update-all-snapshots to update the expected snapshot files in testing/snapshots. This will verify that the command snapshot command exits with the expected exit code and then stores the filtered output.

And now, executing the full project build:

With this, I am now at 100% code coverage for MyProject, including the run and list-tasks command files that were not tested before.

Over on the MyCmd side, I am at 59.45% code coverage. This is actually down from the 68.94% code coverage from last week, despite increasing the number of lines covered by new snapshot tests, because I have updated my coverage reporting to take into account all implementation files, and not just those that were tested, so it now includes the commands from the logging and project command groups. I will go back and address those later.

I’m actually pretty happy the core mechanisms for executing snapshot tests, capturing snapshots, and processing them was all in less than 200 lines of code. It’s great when simple code can accomplish so much.

This Week’s MyCmd Updates

This week I pushed 21 commits to MyCmd, including the following changes:

I also published a new snapshot snapshot-r8-2025-07-10 that I am using locally as my MyCmd build that has these new features available.

This Week’s MyProject Updates

This week I pushed 11 commits to MyProject, including the following changes:

Next Week

Now that I’ve taken a three week detour to improve my testing, including adding instrumentation and reporting of code coverage of tests and adding snapshot testing support, next week I am going to get back into MyProject development in earnest and add support for file sets. My hope is that I can start migrating the large single-file myproject file for MyProject itself into a myproject task definition directory, with separate files and start to use it to build itself.


All of my MyCmd and MyProject Weekly Progress reports will be linked from here.