-
Notifications
You must be signed in to change notification settings - Fork 9
Running The Project
You have the choice of running tests via the IDE, just like a regular GM project, or via the command line. This page describes how to achieve both routes.
Note
The project is written in pure GML and therefore should work on all available GMS2 targets. Full GMRT support is forthcoming.
When running the project from the IDE the vast majority of tests will run fine if you simply open the project and click run; however, be aware tests that require external servers to function (like HTTP tests) will not work without the additional step described in the "Launching The External Servers" section below.
Tip
If you wish to only run a single test you can do so by:
- Double-clicking the
objRunnerand then opening its Create event - Setting the macro
SINGLE_TEST_MODEat the top of the file to betrue - Setting the variable
single_test_pathto the path to the test you want to run (e.g.:\<TestSuiteName\>@\<TestName\>or\<TestSuiteName\>)
These servers are usually initialised and managed by the command line launcher route, and so if you want to test these areas you'll need to initialise the servers manually using the command below and then run the project in GameMaker:
python .\launcher.py runServer --proj-config-file "[YOUR CONFIG FILEPATH]"
Replace the [YOUR CONFIG FILEPATH] bit (keep the double-quotes!) with the path you want to use for your .json config file - and if no config file exists already, then one will be written for you.
E.g.: python .\launcher.py runServer --proj-config-file "C:\tf_config.json"
This will start the servers and keep them running until the terminal window is focussed again and the spacebar is pressed.
Important
The command line framework launcher tool is compatible with x64 versions of Windows OS only and is available for Enterprise users only
You'll also need to obtain an Access Key from this access keys page on your account panel
To run the launcher from the command line you need to have Python installed, then follow these steps:
- Run the
setup.batscript, which will install all Python dependencies - Open Terminal and type
python launcher.py igorRunTests --config-file '[YOUR CONFIG FILEPATH]', then run that command
The .json file you need to create should contain the following keys, but with the xxxxx values changed to however you need them to be set so the files are found on your PC.
{
"access-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user-folder": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"runners": "vm,yyc",
"targets": "windows|Local",
"feed": "https://gms.yoyogames.com/Zeus-Runtime-NuBeta.rss",
"project-path": "projects\\xUnit\\xUnit.yyp",
"Logger.level": 20
}- Valid names for the Runners key are "vm" and "yyc"
- Valid names for the Targets key are as follows (ensure you use the correct casing!): windows, mac, linux, android, ios, tvos, HTML5, ps4, ps5
The command line parameters listed below are optional and can be omitted if they are already specified in the configuration file; however, if provided again on the command line, be aware they will overwrite the corresponding values used in your configuration file.
-
-akfollowed by your Access Key -
-uffollowed by a GameMaker user's folder path (e.g:C:\Users\<User>\AppData\Roaming\GameMakerStudio2\<username>) -
-tfollowed by a comma-separated list of target|device name pairs -
-rfollowed by a comma-separated list of runner names -
-ffollowed by the RSS feed to be used for retrieving the runtime (defaults to Betas) -
-rvfollowed by the version of the runtime to be tested (defaults to the latest release in the feed) -
-h5rfollowed by a path to your custom HTML5 scripts folder (defaults to the selected runtime's default HTML5 install)