Questions tagged [unit-testing]
A method by which individual parts of code or modules together with associated control data, usage procedures, and operating procedures, are tested to determine if they are fit for use.
29 questions
1
vote
1
answer
297
views
Unit Testing start method of a MonoBehaviour
In Unity how can I unit test the start method?
I am not trying to test interaction between objects but the private methods are called by the Start method, so I figured I should call the start method ...
1
vote
1
answer
137
views
Unity PlayMode Tests - Lifecycle Events don't fire when running 21 or more tests together
I'm experiencing an issue with my PlayMode tests, where all tests pass individually, but when running 21 or more tests together (using Run Selected or Run All), the same 2 tests fail. From further ...
1
vote
2
answers
802
views
Testing Message-Based Events using Unity's New Input System and InputTestFixture, getting unhelpful error
My player has an Action in the Input System Move, that takes a Vector2 and moves the player based on that input. Straight-...
0
votes
1
answer
201
views
Unity3D Tests - Edit Mode vs Test Mode
I have been reading about Edit Mode vs Play Mode testing and I'm not seeing any real reasons of why I would use Play mode testing over Edit mode testing. My assumption is that edit mode is better for ...
0
votes
1
answer
714
views
How do I set up unit tests in Unity?
I have followed the Unity Test Framework documentation to create an EditMode test assembly and a test script. When I try to test a function like Utils.SomeMethod(), ...
0
votes
1
answer
277
views
How can i write automated tests for some SDL2 objects?
For eg having a class that is rendering something on the screen, could be even a point or a line if not an image or whatever.
How is possible to write some tests for that class only?
or just a small ...
2
votes
0
answers
394
views
Unity build trying to include Editor Scripts
I'm having a peculiar problem. I'm creating a 2D Unity game using Fungus for cutscenes and the Unity Test Tools for unit testing. The game runs fine in the editor, but when I try and build an ...
1
vote
0
answers
69
views
Unit testing graphics [duplicate]
What is the standard (if there is one) method which professional games developers use to unit test (or closest equivalent) graphics output?
I am developing with Corona SDK and I would like to test ...
4
votes
1
answer
3k
views
How to write a unit test in Unity? [duplicate]
is there a tutorial and patterns to write unit tests in Unity ?
Should we use the classical c# way and test the code or should we test the interactions in UI ? If so how?
6
votes
2
answers
7k
views
How to write testable MonoBehaviour and test scripts in Unity?
I had problems with decoupled scripts and exposing interfaces in Unity, and these answers helped me a lot. But now, since I don't have hard-coded references in my scripts, I wanted to write unit tests ...
1
vote
1
answer
765
views
Unit Testing with Cocos2D
How to implement Unit Testing with Cocos2D framework?
What are the good practices?
Is there any testing framework like JUnit Framework at Eclipse for Android?
2
votes
0
answers
461
views
UI Automation for Flash Games [closed]
has anyone used or heard of a good selenium-like toolset for doing automated UI testing with Flash? I would ideally like to have the ability to record and playback events against my game and integrate ...
22
votes
4
answers
10k
views
How can I unit test rendering output?
I've been embracing Test-Driven Development (TDD) recently and it's had wonderful impacts on my development output and the resiliency of my codebase. I would like to extend this approach to some of ...
5
votes
2
answers
2k
views
Best practices for UnitTesting heavy Flash game clients and libraries?
We have several quite heavy game clients completely written in AS3 (some also use Flex for UI). Some clients are built with PureMVC, others are a pile of spaghetti code that's grown over the years. We ...
13
votes
1
answer
3k
views
Unit Testing a C#/XNA Game Project
I have been dabling in game development since I started programming, but never very seriously. I work as a business app developer, but I'm working on some games in my spare time.
In the business ...