Testing and Verification
Table of Contents
Testing and verification prove that a project works the way it is supposed to work. Testing checks individual features, while verification connects those checks to real project evidence, such as a live demo, successful backend response, or code review.
Gameplay Testing
Gameplay testing checks whether the player can complete the level without critical bugs. The main assessment method is a live playthrough using GameLevel3.js: move through Crater Falls, test jumping, platform collision, moving platforms, coin collection, spike/fall failure states, and the goal flag.
Integration Testing
Integration testing checks how different parts of an application work together. It combines individual code modules to find bugs in how they communicate and share data. This ensures that separately written pieces of software function properly as a cohesive unit.
This code creates an interactive chat window that pauses game controls while a player types and sends their message, along with the NPC’s specific background knowledge, to a backend powered by the Gemini AI. When the AI responds, the system saves the text to a chat history log and types out the reply on screen using an animated letter-by-letter effect.
API Error Handling
API error handling verifies that the game does not break when a backend request fails. The assessment method is code review plus failure testing: inspect the fetch call, confirm it uses try/catch, check response.ok, and test what happens when the network request fails or the server returns an error.
Step 1 - in the network tab after using inspect you can see that fetch calls failing because the backend server is not running.
Step 2 - This error will be in the console tab - Error fetching dynamic leaderboard: TypeError: Failed to fetch. This message was printed by the .catch() block — the error was caught, the game did not crash