Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
298 views

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 ...
WVrock's user avatar
  • 111
0 votes
1 answer
341 views

I'm trying to simulate user input in my Unity PlayMode tests. I've been reading this guide on the Unity website about adding input simulation into my tests. Specifically, it mentions I need to add the ...
Samuel Slade's user avatar
1 vote
1 answer
138 views

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 ...
Samuel Slade's user avatar
0 votes
1 answer
145 views

I've just started adding tests to my game project in Unity. I know the difference between EditMode and PlayMode tests. I've written a PlayMode test that triggers a change to the Animator internally, ...
Samuel Slade's user avatar
1 vote
2 answers
803 views

My player has an Action in the Input System Move, that takes a Vector2 and moves the player based on that input. Straight-...
JShoe's user avatar
  • 75
3 votes
1 answer
316 views

GitHub actions attempt to upload my coverage reports to CodeCov, but I get an error. Below is my most recent GitHub Action code, and the error I'm receiving from CodeCov. Please let me know if there ...
JShoe's user avatar
  • 75
0 votes
1 answer
202 views

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 ...
Jacksonkr's user avatar
  • 259
4 votes
0 answers
811 views

I am trying to write unit tests in Unity that assert that logs, errors, and exceptions are raised as expected in my code, but I'm getting inconsistent results. I'm using ...
Just_Alex's user avatar
  • 141
0 votes
1 answer
716 views

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(), ...
Matt's user avatar
  • 405
2 votes
1 answer
682 views

I've run into the same problem multiple times that is begging for a solution. I try to write a lot of decoupled code to make my MonoBehaviour scripts as reusable as possible. This means that I end up ...
Adam B's user avatar
  • 800
0 votes
1 answer
277 views

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 ...
Raffaello's user avatar
  • 125
2 votes
1 answer
461 views

Bit of a noob question, but I'm having trouble getting unit testing working in Unity. I created a PlayMode test assembly, I toggled "Enable playmode tests for all assemblies" as directed in the manual,...
Skatche's user avatar
  • 141
2 votes
0 answers
395 views

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 ...
Ben Partridge's user avatar
1 vote
1 answer
977 views

I'm currently creating a 2d game in C++ using visual studio and utilizing gtest/gmock for my testing framework. The problem I'm having is I'm not sure what my best option is for testing. I'm using SDL ...
Jason's user avatar
  • 423
1 vote
0 answers
69 views

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 ...
Matt W's user avatar
  • 203
1 vote
1 answer
901 views

I made a Blender 3D model with animations. Then I used the Animator Controller, and attached it to the model. The Animator Controller has a few Boolean parameter variables like ...
Mack's user avatar
  • 11
4 votes
1 answer
3k views

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?
Rıfat Erdem Sahin's user avatar
2 votes
2 answers
1k views

I need to create some tests for a bunch of variables that are initialized via the editor, So in the script they are always null and can't be set publicly. Usually using the tag is a good way to ...
user3797758's user avatar
  • 3,661
6 votes
2 answers
7k views

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 ...
K.L.'s user avatar
  • 795
2 votes
2 answers
1k views

I read some articles on why I should separate game logic and UI code: That makes it possible to test game logic code can be independently of the rest. However, I am having trouble implementing this in ...
ductran's user avatar
  • 73
1 vote
1 answer
766 views

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?
Md Mahbubur Rahman's user avatar
13 votes
3 answers
3k views

How to implement Unit Test at Unity3D. I wonder if it would be possible to extend the Unity editor to have some sort of testing framework in it. Is there any guideline to implement it? Any ...
Md Mahbubur Rahman's user avatar
2 votes
0 answers
462 views

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 ...
j03m's user avatar
  • 149
25 votes
3 answers
10k views

Much to my shame, I have never written a proper unit test, only small unorganized test programs that I would then dispose of after the test succeeded. I don't really have a clear idea of how unit ...
Paul Manta's user avatar
  • 3,197
22 votes
4 answers
10k views

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 ...
notlesh's user avatar
  • 3,897
37 votes
7 answers
25k views

Do gamers developers use to write unit and integration tests? How common is it among puzzle developers? And among developers of MMORPGs and FPSes? (I have no background in game development neither am ...
brandizzi's user avatar
  • 473
5 votes
2 answers
2k views

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 ...
Baelnorn's user avatar
  • 153
26 votes
4 answers
4k views

Is it practical to use a testing framework like JUnit in a game development situation? What sort of design considerations can you follow in order to make your game more testable? What parts of a game ...
Ricket's user avatar
  • 14.9k
13 votes
1 answer
3k views

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 ...
Nate's user avatar
  • 5,064