Logic World Wednesdays: The Automatically Tested Edition

by @MouseHatGamesDeveloper10 months ago (edited10 months ago)

Multi-Undo - Jimmy

I’ve integrated the undo-redo mechanic with the multi-build features I’ve been developing recently! You can now undo and redo multiple actions simultaneously.

I knew when I decided to add undo and redo that it would be a lot of work, but I had no idea just how a lot of work it would be. I’m pleased with how the feature is working, and I am glad that most of the work is behind me now.

Website integration tests - Felipe

The logicworld.net website has been steadily growing in complexity, and some seemingly innocuous changes may affect some functionality that I had not considered. For this reason I decided to set up some end to end tests using the Cypress framework, which allows me to write tests as if I was interacting with the website using a very simple API. Here’s an example:

it("loads forums", () => {
    cy.contains("Forums index");
    cy.get(".container > div").children().should("have.length", 4);

When this test is run, Cypress will fire up a headless browser and execute each of the instructions one by one, verifying that the site responds correctly to all inputs. It’s pretty entertaining to watch:

These tests will help me quickly spot when something breaks, so I can fix it before it ever gets deployed to the public website.

Automatic website builds - Felipe

More than a year ago I talked about how I set up a build pipeline using Jenkins on a server (which later would be moved to Bob). This pipeline takes care of compiling all of the game’s client and server code (for all three operating systems), packaging it and uploading it to Steam.

This week I’ve been working on a similar pipline, but this time for the logicworld.net website. This pipeline will take care of building all the changes to services I have done, then it will deploy them to our Kubernetes cluster. Additionally, if any changes to the web frontend have been made, all of the integrations tests I talked about in the previous section must succeed before the changes can be deployed.

We’ll keep releasing these weekly updates right up until the game comes out. To make sure you don’t miss them, you can sign up for our newsletter. Be sure also to wishlist Logic World on Steam and join the official Discord.

See you next Wednesday!

More Logic World Wednesdays

@Ecconia10 months ago

“Noice!” - Nothing more to say.