Unit tests

July 1, 2026 ยท View on GitHub

More than 400 automated tests for Foundation runtime APIs. Tests live under Test/ in per-feature assemblies that reference FronkonGames.GameWork.Foundation only (never the Editor assembly).


Requirements

RequirementVersion / notes
Unity Editor6000.0 or higher (same as the package)
Universal RP14.0.11 or higher (project dependency)
Test Framework1.1.31 or higher (com.unity.test-framework)
PlatformEditor only, test assemblies use includePlatforms: ["Editor"]
FrameworksNUnit.Framework, UnityEngine.TestTools

There is no CLI or batch test runner configured for this package. Run tests inside the Unity Editor with the Test Runner window.

Install or update the Test Framework from Window > Package Manager if the Test Runner is missing.


Layout

Tests mirror runtime folders. Each area has its own .asmdef with optionalUnityReferences: ["TestAssemblies"].

FolderAssemblyCovers
AlgorithmsFronkonGames.GameWork.Foundation.Algorithms.testData structures (e.g. FastList, ArrayList)
CheckFronkonGames.GameWork.Foundation.Check.TestAssert extensions
ComponentsFronkonGames.GameWork.Foundation.Components.TestCachedMonoBehaviour, etc.
DataFronkonGames.GameWork.Foundation.Data.TestSerialization types
Data/HoldersFronkonGames.GameWork.Foundation.Data.Holders.TestOption, holders
DevelopmentFronkonGames.GameWork.Foundation.Development.TestProfiling utilities
ExtensionsFronkonGames.GameWork.Foundation.Extensions.TestSystem and Unity extensions
MathFronkonGames.GameWork.Foundation.Math.testRand, MathUtils, constants
PatternsFronkonGames.GameWork.Foundation.Patterns.TestDesign patterns
UnityFronkonGames.GameWork.Foundation.Unity.TestUnity-specific helpers

Naming, test files follow {Feature}.{Method}.Test.cs (e.g. Patterns.Singleton.Test.cs). Test methods use [Test] or [UnityTest] (coroutine / play-mode style checks that still run in the Editor).


How to run tests

  1. Open the project in Unity 6000.0+ with the Test Framework package installed.
  2. Open Window > General > Test Runner (or Window > Testing > Test Runner).
  3. Select the EditMode tab. All Foundation tests are Edit Mode tests.
  4. Optionally filter by assembly or search for a feature name (e.g. Extensions, Patterns).
  5. Click Run All to execute the full suite, or Run Selected for individual fixtures.

Green results mean the suite passed. Failed tests show the assertion message and stack trace in the Test Runner; expand the entry for details.

Some tests create temporary GameObjects or textures; they clean up in the test body or via DestroyOnDispose patterns. You do not need to enter Play mode for the default suite.


Reporting failures

If any test fails on your machine, please send an email to fronkongames@gmail.com with:

  • Unity version and platform (e.g. Windows 11, macOS 14)
  • Test Runner mode (EditMode)
  • Failed test name(s) and the error message from the Test Runner
  • Steps to reproduce, if you know what triggered the failure

That helps fix environment-specific or regression issues quickly.


ItemLocation
Package requisitesREADME.md
Runtime APIs under testRuntime/ folder READMEs
AGENTS.md test conventionsAGENTS.md