Skip to content

Inner Test classes, doubles, stubs, and more.

Compare
Choose a tag to compare
@bitwes bitwes released this 24 Apr 23:15
8b6a765

6.3.0

Wiki

First, the Readme has been broken up into a Github wiki. I think this will make consuming the help easier. There is probably some room for improvement in the documentation and organization. Create issues for anything that could be done better.

Inner Test Classes

You can now create "Inner Classes" that run tests. This allows you to breakup your tests and create multiple setup/teardown scopes in a single script.

Example:

extends "res://addons/gut/test.gd"

class TestInnerClass:
  extends "res://addons/gut/test.gd"

  func setup():
    pass

class TestInnerClass2:
  extends "res://addons/gut/test.gd"

  func setup():
    pass

Command line config file

There is now support for a config file for the command line tool. It only supports some options right now, but that will be expanded in the future.

{
  "dirs":["res://test/unit/", "res://test/integration/"],
  "should_exit":true,
  "ignore_pause":true,
  "log": 3
}

Experimental Doubles and Stubs

There are also two new experimental features in this release. Doubling and Stubbing. These are experimental because their implementation could change a lot. I hope not, but they might. I fought with how these should work a lot, and honestly, I might have gotten it wrong. So I'm going to put it out there and see how they get used in the wild. I'm dedicated to keeping these features and improving on them, but they might be a little rough around the edges.

You can find out more about Stubbing and Doubling in the Wiki.