Skip to content

Commit

Permalink
Version 7.0.0 (#188)
Browse files Browse the repository at this point in the history
* refactor multi-test-calling and set ParameterHandler logger.
* figured out how to get inner classes for a loaded script
* refactor test collector to parse base script using meta data instead of the text to address export/import issue created by parameterized tests.
* fixed import/export with tests that have parameters
* slightly better logging for paramaterized tests.
* consolidated logging logic into the logger and things are much more consistent now
* 'global' utils appears to be working from editor with new arrangement
* new control working and new printing working with formats
* added fonts
* display options
* animated "waiting..." on yield
* command line options for new gui features
* integrated file viewer, font settings, and fixed printer to keep out formatting when running from scene
* unstubbed output updated
* named_parameter helper
* copy on file viewer
* basic tracking of orphans implemented
* removed most of the GUT leaks
* moved version info so it was more accessible
* orphan as a logger type and better total orphan count at end
* assert_no_new_orphans
* show orphans option
* autofree working
* doubles are now autofreed via _init method
* add_child_autoqfree better freed assert messages
* remaining children after test finishes
* fixed leak when doubling native classes
* version bump
* fix maximize and some tests that started failing from cmd line
* elaborate some float/string tests
* added version check logic to command line and scene
* no crash when assert_no_new_orphans() is run before any test (#186)
* add test for orphan counter for missing name
* changed get_counter to return -1 when name not found
* documentation
* pr review.  removed commented out code, deprecated 3rd gut.p parameter, added space in all file headers'

Co-authored-by: hilfazer <az13337@gmail.com>
  • Loading branch information
bitwes and hilfazer committed Jun 24, 2020
1 parent 2b54bcf commit 080c5f0
Show file tree
Hide file tree
Showing 82 changed files with 4,001 additions and 1,152 deletions.
5 changes: 3 additions & 2 deletions .gutconfig.json
Expand Up @@ -3,9 +3,10 @@
"should_maximize":true,
"should_exit":false,
"ignore_pause":true,
"log_level": 2,
"log_level":2,
"opacity":100,
"double_strategy":"partial",
"include_subdirs":true,
"inner_class":""
"inner_class":"",
"disable_colors":false
}
38 changes: 38 additions & 0 deletions CHANGES.md
Expand Up @@ -2,6 +2,44 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

# 7.0.0
## Breaking Changes
* Requires Godot 3.2. Versions 3.1 and earlier are no longer supported.
* You must recreate the GUT node in your test runner scene.
* Take notes on your GUT settings in the editor.
* Delete GUT from the tree and add it back in.
* You may have to restart Godot after this change.
* Repopulate your settings.
* All Doubles and Partial Doubles are freed automatically after each test. Doubles and Partial Doubles created in `before_all` will no longer be around for all tests.
* A new signal `gut_ready` should be used instead of `_ready` when performing any actions on the GUT object in your test runner scene. You should avoid interacting with GUT until this signal has been emitted.
* `gut.p` no longer supports the 3rd optional parameter for indent level. The parameter still exists but does nothing and generates a deprecation warning.

### Potentially Breaking Changes
* The order the tests are run is no longer guaranteed. This has been the case with Inner Test cases but it's now true for all tests.
* The order that Inner Test classes are run is no longer guaranteed.


## Features
* __Issue 114__ By popular demand [Parameterized Tests](https:/github.com/bitwes/Gut/wiki/ParameterizedTests) have been added. You can now create a tests that will be run multiple times and fed a list of parameters. (This feature opened up a giant can of worms for logging which led to more cans and more worms.)
* Added [Memory Management](https:/github.com/bitwes/Gut/wiki/Memory-Management) tools.
* Logging of orphan counts.
* Warnings for children added to tests that are not freed.
* New assert: `assert_no_new_orphans`
* New utility methods: `autofree`, `autoqfree`, `add_child_autofree`, `add_child_autoqfree`.
* __Issue 168__ Added "user directory" file viewer to additional options for viewing logs on a device. See [Running on Devices](https://github.com/bitwes/Gut/wiki/Running-On-Devices#logging)
* __Issue 167__ Added more areas where filenames are printed when printing objects.
* Redesigned logging to be more consistent across the GUT control, terminal, and Godot console (here be the cans and worms).
* Can now set the font (from a few choices), font size, font color, and the background color!
* Some GUI tweaks.

## Bug Fixes
* Thanks to hilfazer for contributing a PR that addressed most of the memory leaks in GUT. This PR also inspired most of the new Memory Management features.

### Relevant Wiki Links
* Added a [Quick-Start wiki page](https:/github.com/bitwes/Gut/wiki/Quick-Start).
* [Memory Management page](https:/github.com/bitwes/Gut/wiki/Memory-Management) for all your memory management needs and questions.
* [Parameterized Tests](https:/github.com/bitwes/Gut/wiki/Parameterized-Tests).

# 6.8.3
## Features
* Added filename and inner class paths to "expected" and "got" values in asserts. For example you'll see `[Node:1234](my_script.gd)` now instead of just `[Node:1234]`. Types are also included where appropriate. For example `Color(1,1,1,1)` instead of `(1,1,1,1)` but a strings and numbers aren't changed.
Expand Down
41 changes: 21 additions & 20 deletions README.md
@@ -1,22 +1,29 @@
# Gut 6.8.3
# Gut 7.0.0
GUT (Godot Unit Test) is a utility for writing tests for your Godot Engine game. It allows you to write tests for your gdscript in gdscript.

## Features
* Godot 3.2, 3.1, and 3.0 compatible (There are some very minor issues with 3.1 [check them out here](https://github.com/bitwes/Gut/wiki/Godot-3.1-Issues)).
* [Simple install via the Asset Library.](https://github.com/bitwes/Gut/wiki/Install)
* [A plethora of asserts and utility methods to help make your tests simple and concise.](https://github.com/bitwes/Gut/wiki/Asserts-and-Methods)
* [Support for Inner Test Classes to give your tests some extra context and maintainability.](https://github.com/bitwes/Gut/wiki/Inner-Test-Classes)
* Doubling: [Full](https://github.com/bitwes/Gut/wiki/Doubles) and [Partial](https://github.com/bitwes/Gut/wiki/Partial-Doubles)
* [Stubbing](https://github.com/bitwes/Gut/wiki/Stubbing)
* [Spying](https://github.com/bitwes/Gut/wiki/Spies)
* [Export tests with your project and run them on any platform Godot supports.](https://github.com/bitwes/Gut/wiki/Exporting-Tests)
* [Command Line Interface (CLI)](https://github.com/bitwes/Gut/wiki/Command-Line)
* [Integration testing made easier with `yield`s](https://github.com/bitwes/Gut/wiki/Yielding)

# Features
* Godot 3.2 compatible, [6.8.3](https://github.com/bitwes/Gut/releases/tag/v6.8.3) is 3.1 compatible
* [Simple install](https://github.com/bitwes/Gut/wiki/Install) via the Asset Library.
* A plethora of [asserts and utility methods](https://github.com/bitwes/Gut/wiki/Asserts-and-Methods) to help make your tests simple and concise.
* Support for [Inner Test Classes](https://github.com/bitwes/Gut/wiki/Inner-Test-Classes) to give your tests some extra context and maintainability.
* Doubling: [Full](https://github.com/bitwes/Gut/wiki/Doubles) and [Partial](https://github.com/bitwes/Gut/wiki/Partial-Doubles), [Stubbing](https://github.com/bitwes/Gut/wiki/Stubbing), [Spies](https://github.com/bitwes/Gut/wiki/Spies)
* Command Line Interface [(CLI)](https://github.com/bitwes/Gut/wiki/Command-Line)
* [Parameterized Tests](https://github.com/bitwes/Gut/wiki/ParameterizedTests)
* [Export tests](https://github.com/bitwes/Gut/wiki/Exporting-Tests) with your project and run them on any platform Godot supports.

More info can be found in the [wiki](https://github.com/bitwes/Gut/wiki).

## VSCode Extension
Run your tests directly from the VSCode Editor. Search VSCode extensions for "gut-extension".

# Getting Started
* [Install](https://github.com/bitwes/Gut/wiki/Install)
* [Quick Start](https://github.com/bitwes/Gut/wiki/Quick-Start)
* [Creating Tests](https://github.com/bitwes/Gut/wiki/Creating-Tests)
* [Asserts and Methods](https://github.com/bitwes/Gut/wiki/Asserts-and-Methods)


# VSCode Extension
Run your tests directly from the VSCode Editor. Search VSCode extensions for "gut-extension". The plugin has commands to run your entire test suite, a single test script or a single test.
* [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=bitwes.gut-extension)
* [Github repo](https://github.com/bitwes/gut-extension)
* [Quick tutorial on setup and use](https://youtu.be/pqcA8A52CMs)
Expand All @@ -25,12 +32,6 @@ Run your tests directly from the VSCode Editor. Search VSCode extensions for "g
# License
Gut is provided under the MIT license. License is in `addons/gut/LICENSE.md`

# Getting Started

## [Wiki](https://github.com/bitwes/Gut/wiki)
* [Install](https://github.com/bitwes/Gut/wiki/Install)
* [Creating Tests](https://github.com/bitwes/Gut/wiki/Creating-Tests)
* [Asserts and Methods](https://github.com/bitwes/Gut/wiki/Asserts-and-Methods)

## [Tutorials](https://github.com/bitwes/Gut/wiki/Tutorials)
* [Here's a short setup tutorial provided by Rainware](https://www.youtube.com/watch?v=vBbqlfmcAlc)
Expand Down

0 comments on commit 080c5f0

Please sign in to comment.