# Smoke Testing Guide ## Overview Smoke testing (Build Verification Testing) validates that a build's critical functionality works before investing time in detailed testing. A failed smoke test means "stop, this build is broken." ## Purpose | Goal | Description | | ------------------- | ---------------------------------------------- | | Fast feedback | Know within minutes if build is viable | | Block bad builds | Prevent broken builds from reaching QA/players | | Critical path focus | Test only what matters most | | CI/CD integration | Automated gate before deployment | ## Smoke Test Principles ### What Makes a Good Smoke Test - **Fast**: Complete in 5-15 minutes - **Critical**: Tests only essential functionality - **Deterministic**: Same result every run - **Automated**: No human intervention required - **Clear**: Pass/fail with actionable feedback ### What to Include | Category | Examples | | ----------------- | ------------------------------ | | Boot sequence | Game launches without crash | | Core loop | Player can perform main action | | Save/Load | Data persists correctly | | Critical UI | Menus are navigable | | Platform services | Connects to required services | ### What NOT to Include - Edge cases and boundary conditions - Performance benchmarks (separate tests) - Full feature coverage - Content verification - Balance testing ## Smoke Test Scenarios ### Boot and Load ``` TEST: Game Launches WHEN game executable is started THEN main menu appears within 60 seconds AND no crashes occur AND required services connect TEST: New Game Start GIVEN game at main menu WHEN "New Game" is selected THEN gameplay loads within 30 seconds AND player can control character TEST: Continue Game GIVEN existing save file WHEN "Continue" is selected THEN correct save loads AND game state matches saved state ``` ### Core Gameplay ``` TEST: Player Movement GIVEN player in game world WHEN movement input applied THEN player moves in expected direction AND no physics glitches occur TEST: Core Action (Game-Specific) GIVEN player can perform primary action WHEN action is triggered THEN action executes correctly AND expected results occur Examples: - Shooter: Can fire weapon, bullets hit targets - RPG: Can attack enemy, damage is applied - Puzzle: Can interact with puzzle elements - Platformer: Can jump, platforms are solid ``` ### Save System ``` TEST: Save Creates File GIVEN player makes progress WHEN save is triggered THEN save file is created AND save completes without error TEST: Load Restores State GIVEN valid save file exists WHEN load is triggered THEN saved state is restored AND gameplay can continue ``` ### Critical UI ``` TEST: Menu Navigation GIVEN main menu is displayed WHEN each menu option is selected THEN correct screen/action occurs AND navigation back works TEST: Settings Persist GIVEN settings are changed WHEN game is restarted THEN settings remain changed ``` ## Automated Smoke Test Examples ### Unity ```csharp using System.Collections; using NUnit.Framework; using UnityEngine; using UnityEngine.UI; using UnityEngine.TestTools; using UnityEngine.SceneManagement; [TestFixture] public class SmokeTests { [UnityTest, Timeout(60000)] public IEnumerator Game_Launches_ToMainMenu() { // Load main menu scene SceneManager.LoadScene("MainMenu"); yield return new WaitForSeconds(5f); // Verify menu is active var mainMenu = GameObject.Find("MainMenuCanvas"); Assert.IsNotNull(mainMenu, "Main menu should be present"); Assert.IsTrue(mainMenu.activeInHierarchy, "Main menu should be active"); } [UnityTest, Timeout(120000)] public IEnumerator NewGame_LoadsGameplay() { // Start from main menu SceneManager.LoadScene("MainMenu"); yield return new WaitForSeconds(2f); // Click new game var newGameButton = GameObject.Find("NewGameButton") .GetComponent