-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GD-655: Add ability to take screenshots during tests #655
Comments
We should provide two new functions to the
|
And provide new assert to compare screenshots. A test could look like
|
An idea that just came to me, but is not necessary for my present use case... the ability to append screenshot(s?) to the report. Ideally, this would be attached to the test case where the screenshot was taken. If possible, this leads to a bunch of ideas about screenshots on failed assertions, etc. |
Sounds good. |
What |
Only the image from the current view window will be grabbed. |
The ability to take screenshots during tests is useful in a number of ways.
Describe the solution you'd like
Trying the normal approach to capturing the viewport in gdUnit4 returns an empty texture. It would be ideal if Godot's standard
get_viewport().get_texture()
returned the expected rendered view. It would be very acceptable for scene runner to have a method likescene_runner.get_viewport_texture()
that emulates the behavior ofget_viewport().get_texture()
when running scenes normally.Describe alternatives you've considered
This is an activity that can be performed less frequently than automated unit or functional testing, so having a special scene or an editor script to gather screenshots is sufficient, if not ideal.
The text was updated successfully, but these errors were encountered: