SES Test Case

by Solistra

SES Test Case results.

Summary

This script provides a simple unit testing framework for RPG Maker VX Ace with very simple expectation-style formatting for test cases. Essentially, this script allows you to use test-driven development from within RPG Maker VX Ace without depending on an external Ruby installation. This is primarily a scripter’s tool.

Features

  • Unit testing capabilities for RPG Maker VX Ace.
  • Tests may be written externally or within the Ace Script Editor.
  • Supports both assertion- and expectation-style tests.
  • Assertions and expectations may be mixed freely.
  • Support for simple mock objects.
  • Method stubbing, allowing tests for unpredictable methods.
  • Capturing of standard output as a string.

Script

This script is available from the SES source repository. The specific file to download is ‘lib/test-case.rb’.

Tests for the framework are available from ‘test/’ in the source repository. The tests for SES Test Case may be placed under the core framework script in the VX Ace editor, or may be stored as external tests in ‘System/Tests’ (relative to your project’s root directory).

Installation

Place this script below the SES Core (v2.0) script (if you are using it) or the Materials header, but above all other custom scripts. This script does not require the SES Core (v2.0), but it is recommended.

Place this script above the SES Console if you are using it.

License

This script is made available under the terms of the MIT Expat license.