I found a test framework that can be run in RPG Maker and decided let's just go with that.
It is basically the Test::Unit framework. Documentation can be found here
http://ruby-doc.org/stdlib-1.8.7/libdoc/test/unit/rdoc/Test/Unit.html
I downloaded the gem version
http://test-unit.rubyforge.org/
Why Testing?
The ultimate purpose of this testing framework is
-to allow scripters to write better, bug-free code
-reduce development time by saving the amount of time required to test your own scripts
-to identify script incompatibilities quickly for both scripters and script-users.
There may have been existing testing initiatives that I am unaware of, and they would be nice to know. But for the most part, testing in RM? Haven't seen much.
Setting up your project
There are two ways to get the framework.
Git repository
The project is set up on github You can get it at https://github.com/HimeWorks/RMUnit
I have structured it so that you should check it out in the System folder. It will create a folder called "RMUnit" which will contain all of the files required to run the framework out-of-the-box.
The repository contains all of the test suites as well (currently there is not much)
Manual download
You can also install the framework manually.
1. Download the framework and extract it to your project's System folder
2. Get this script and place it below Materials and above Main
Show your console when you playtest and you should see the default tests I've written executed and the results shown.
Moving forward
How do we make it better?
I would like there to be a full set of test cases for the default engine. This way, all we have to do is write our own scripts and then run the test code and see if anything crashes.
I would like to then write test cases for our own classes if we have any custom methods that might be nice to know about.
I would like sort of repository where anyone can add tests suites to, and we can place all of those test suites in a folder and have the test framework load up all of the test suites. This is pretty easy to do for the most part.
Ideally, the test suites written for this framework can be used in any framework if anyone else wants to write their own testing framework.
What you do
There are two parts to this, depending on what you prefer to do.
First, is to improve the framework.
Second, is to write test cases. Come up with various unit tests for all of the different parts of the engine. If you've ever come across some situation that you think would be nice for others to know about, submit that as a test case.
It is basically the Test::Unit framework. Documentation can be found here
http://ruby-doc.org/stdlib-1.8.7/libdoc/test/unit/rdoc/Test/Unit.html
I downloaded the gem version
http://test-unit.rubyforge.org/
Why Testing?
The ultimate purpose of this testing framework is
-to allow scripters to write better, bug-free code
-reduce development time by saving the amount of time required to test your own scripts
-to identify script incompatibilities quickly for both scripters and script-users.
There may have been existing testing initiatives that I am unaware of, and they would be nice to know. But for the most part, testing in RM? Haven't seen much.
Setting up your project
There are two ways to get the framework.
Git repository
The project is set up on github You can get it at https://github.com/HimeWorks/RMUnit
I have structured it so that you should check it out in the System folder. It will create a folder called "RMUnit" which will contain all of the files required to run the framework out-of-the-box.
The repository contains all of the test suites as well (currently there is not much)
Manual download
You can also install the framework manually.
1. Download the framework and extract it to your project's System folder
2. Get this script and place it below Materials and above Main
Show your console when you playtest and you should see the default tests I've written executed and the results shown.
Moving forward
How do we make it better?
I would like there to be a full set of test cases for the default engine. This way, all we have to do is write our own scripts and then run the test code and see if anything crashes.
I would like to then write test cases for our own classes if we have any custom methods that might be nice to know about.
I would like sort of repository where anyone can add tests suites to, and we can place all of those test suites in a folder and have the test framework load up all of the test suites. This is pretty easy to do for the most part.
Ideally, the test suites written for this framework can be used in any framework if anyone else wants to write their own testing framework.
What you do
There are two parts to this, depending on what you prefer to do.
First, is to improve the framework.
Second, is to write test cases. Come up with various unit tests for all of the different parts of the engine. If you've ever come across some situation that you think would be nice for others to know about, submit that as a test case.
Last edited by a moderator:

