Skip to content

Question about using gdUnit as an API #96

Answered by MikeSchulze
Xananax asked this question in FAQ
Discussion options

You must be logged in to vote

Ok, this means in GdUnit terms that you will have a test suite that will test a scene. A test case will test if a player jumps when a custom button is pressed.

It is still unclear to me when the tests should be executed. According to your example the tests run independently from the actual scene run or?
So the input is not tested in real time?
Which Godot version do you use for the export?

The code to execute a test suite is very simple.

class_name ExecutorExample
extends Node

var _executor :GdUnitExecutor
var _test_suites :Array = Array()

func _ready():
	_executor = GdUnitExecutor.new()
	add_child(_executor)
	# needs to disable the default yielding, it is only need when run in client/s…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Xananax
Comment options

Comment options

You must be logged in to vote
1 reply
@Xananax
Comment options

Answer selected by MikeSchulze
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
FAQ
Labels
question Further information is requested clarified
2 participants
Converted from issue

This discussion was converted from issue #95 on June 16, 2021 17:46.