💾 Archived View for jsreed5.org › log › 2022 › 202209 › 20220920-capsule-testing-pains.gmi captured on 2024-08-18 at 17:51:12. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
---
Like the rest of Geminispace, I run my capsule as a hobby project. I'm also not a developer by trade. As a result, the processes I use to design and update my capsule are rather ad-hoc and purpose-built. Perhaps most crucially, I don't have a test capsule to develop on--I build everything on the live server.
That has come back to bite me a few times. When I originally developed the chess service, one script contained a bug that prevented invitations from appearing on the home page. I didn't catch the bug for almost a month, and in that time, no-one played any chess matches. Similar issues plagued the weather forecast CGI in its early days, when flaky connections and CSV parsing errors caused the script to fail more than half of the time.
Even after migrating my capsule from gmnisrv to Jetforce yesterday, I discovered that differences between the servers led to a series of problems. When setting environment variables for CGI scripts, if a request does not contain a query string, gmnisrv will not set a QUERY_STRING variable. Jetforce always sets this variable but leaves it empty if no query is included. I had written my scripts to check for the existence of the variable and perform actions based on the result, but with Jetforce, I needed to change the check to see if the variable was empty.
Creating a development environment and doing thorough testing would have caught issues like this. Fortunately, now that I serve my capsule using a virtual machine, I can clone that machine to create an identical test environment. Once the month's travels are over, that will likely be my next project.
---
[Last updated: 2022-09-20]