Unity Test Automation in 3 Minutes
Вставка
- Опубліковано 26 сер 2024
- Expect the next video in a couple days.
Get Unity Automation up in 3 minutes, its easy and super valuable. Practicing this helps you develop a strong sense of understanding how to measure code complexity, which is hard to define.
Please join Patreon / danvioletsagmiller
Discord Link: / discord
#unity #unity3d #tutorial #videogamedev #gamedev #architecture
Thank you for this quick short guide how to set up Test Automation. I'm currently working on a software development project and this is exactly what i needed!
I'm glad you found it helpful! :)
Favor [Tests] instead of [UnityTests], tests that are decoupled from unity, they'll be faster to write, run and more useful overall
(edit: well that's not necessarily true you can write terrible code and tests using [Tests] but if you write decoupled code it's neat)
That seems generally accurate, though for me I don't care too much about the difference of [Test] vs [UnityTest] as much as state logic vs effect logic. I'll be bringing it up in a different video, but state logic seldom depends on frame changes. And so [UnityTest] would seldom be as useful. Effect code is typically update driven, with visuals, physics, random and audio effects, all of which tend to be very difficult to automate, change more often and so contain a larger expense to digitally validate. I.e. effect code is generally better for manual tests.
But I would call out that there are times when it really is valuable. Generally speaking, a smoke test that actually loads scenes/prefabs and tries to run a few things, looking for error conditions in 'play' is incredibly valuable. This can capture a huge range of potential viability bugs to go investigate in a matter of seconds when used well. But I would not be surprised that some games would actually benefit more from [UnityTest] though I have not seen it. Specifically in the case that the logic might be more time and physics based. While some mechanics typically live there, it is seldom that the state logic does, though not unheard of.
But overall, @captainnoyaux, I agree with your first line, I think it speaks truth, though more by chance of impact than rule.
Your second line I absolutely agree with and have no separate opinion. :D
Also very true about decoupling. I'll be covering that in the MOQ video, as you need MOQ/RHINO or similar to really see the value of it. :)
@@dvsdev Wow thanks a lot for the detailed reply, lot of valuable insight.
I'm looking forward the MOQ video (even though I like to "mock" classes myself most of the time !)