Add command line script

This commit is contained in:
JeremyStar™ 2024-03-28 17:38:57 +01:00
parent 239bd24ec8
commit b0ee910326
3 changed files with 18 additions and 1 deletions

View file

@ -77,6 +77,18 @@ var test_directory: String = "res://tests"
This is the default configuration. If you want to keep a config key to it's default simply comment it out.
## Command line
Use this command to test your project in the command line:
```bash
/bin/to/godot.binary --headless -d -v -s --path "." addons/besseretests/src/cmd.gd
# │ │ │ │ │ │ └───────── Path to Bessere Tests' command line script
# │ │ │ │ └──────┴──────────── Tells Godot where your project is located
# │ │ │ └───────────────────── Tells Godot to operate in script mode
# │ │ └─────────────────────── Makes the output verbose, omit if it prints too much irrelevant output
# │ └───────────────────────── Starts the engine in debug mode, helps debugging issues in your tests
# └─────────────────────────────────── Tells Godot to not display a window. Omit if you strictly need a window.
```
## File structure
Here's a file structure for this project:
```plain

View file

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://addons/besseretests/src/runtimescene.gd" id="1_icwe0"]
[node name="TestingScene" type="Control"]
[node name="RuntimeScene" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0

View file

@ -0,0 +1,5 @@
extends SceneTree
var scene: Node = load("res://addons/besseretests/scenesrc/runtimescene.tscn").instantiate()
func _initialize() -> void: root.add_child(scene)