Refactor the code to extract the test result printing logic into a separate function, `print_result_line`, to improve readability and reduce code duplication. This change aims to enhance maintainability by consolidating similar print statements and ensuring consistent display of test results across the script.
Docker Test Harness for Minetest Mods
Overview
This mod provides an automated testing framework for Minetest mods by simulating player behavior on a Minetest server. It allows developers to create, register, and run tests to ensure the correct behavior of their mods in various scenarios.
Features
- Test Registration: Easily register custom tests for your mod.
- Player Behavior Simulation: Simulate player actions for automatic testing.
- Modular Structure: Each test is associated with a specific mod and can be customized.
- Area and Node Manipulation: Test areas can be defined, and node checks can be performed.
- Test Context and State Management: Manage and track the progress of tests across multiple mods.
Installation
- Clone or download the
docker-test-harness
mod. - Place the
test_harness
directory into themods
folder of your Minetest world. - Add the following setting in
minetest.conf
to enable automatic test execution:test_harness_run_tests = true
License
Licensed under the AGPL (Affero General Public License).
Funding
This mod is published with funding from the NLNet Foundation.
Description
Languages
Lua
61.1%
Dockerfile
20.1%
Shell
18.8%