Skip to content

Running The Project

Daniel Cleaton edited this page Feb 5, 2025 · 1 revision

This project is written in pure GML and should work on all available exports.

From the IDE

Note

When running the project from the IDE, there are limitations on tests that require external servers to function. These servers are initialized and managed by the command line launcher, and you'll need to initialize them manually.

python .\launcher.py runserver --proj-config-file 'E:\Source\GM-TestFramework\projects\xUnit\datafiles\config.json'

The command line above will start the servers and keep them running until "SPACE" is pressed. The project config file parameter should be the path to a config.json this file is created automatically if it doesn't exist and is used by the TestFramework internally.

To utilize the project within the IDE, simply select the desired platform and press the 'Run' button.

Tip

If you wish to run a single test you can do so by:

  • Double clicking the objRunner and going to it's [Create Event]
  • Setting the macro SINGLE_TEST_MODE to true at the top of the file
  • Setting the variable single_test_path to the path to the test you want to run (ie.: <TestSuiteName>@<TestName> or <TestSuiteName>)

From the Command Line

Important

The command line framework launcher tool is only compatible with Windows OS and is available exclusively for Enterprise users. You'll need to obtain an Access Key from the following link.

To run the launcher from the command line, you need to have Python installed. Then, follow these steps:

  1. Run the setup.bat script, which will install all Python dependencies.
  2. Run python launcher.py igorRunTests --config-file 'E:\Source\GM-TestFramework.configs\config_windows.json' script with the following arguments:
  • --config-file : path to a config file (ie.: 'E:\Source\GM-TestFramework.configs\config_windows.json')
{
    "access-key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "user-folder": "E:\\Source\\GM-TestFramework.configs\\userFolder\\",

    "runners": "vm,yyc",
    "targets": "windows|Local",
    "feed": "https://gms.yoyogames.com/Zeus-Runtime-NuBeta-I.rss",
    "project-path": "projects\\xUnit\\xUnit.yyp",

    "Logger.level": 20
}

Note

The command line parameters listed below are optional and can be omitted if they are already specified in the configuration file, and vice versa. However, if provided, they will overwrite the corresponding values in the configuration file.

  • -ak followed by your Access Key
  • -uf followed by the a GameMaker's user folder path (ex: C:\Users\<User>\AppData\Roaming\GameMakerStudio2\<username>)
  • -t followed by a comma separated list of platform|device pairs (valid platforms: [windows mac linux android ios tvos HTML5 ps4 ps5])
  • -r followed by a comma separated list of runners (valid runners: [vm yyc])
  • -f followed by the RSS feed to be used for retrieving the runtime (defaults to BETA)
  • -rv followed by the version of the runtime to be tested (defaults to latest)
  • -h5r followed by the path to the HTML5 scripts folder (defaults to selected runtime)

Clone this wiki locally