Games for Windows Test Cases: Best Practices for Games on Windows XP, Windows Vista, Windows 7, and Windows 8
This article provides test cases for games for Windows.
How to Use This Article
There are three main sections to this article:
-
Test Requirements
-
Each test requirement in this document has four main sections: a title and a table with three notable sections (left column, right top, right bottom).
-
Title
-
Name of the test case.
-
Box, far left column
-
Names of the operating systems to which the test case applies.
-
Box, right top
-
Brief summary of the test case.
-
Box, right bottom
-
Details of the actual test case.
-
-
Sample Test Script
-
This section is a sample of the sequence that a typical test pass would follow if using the test requirements as a guide.
-
Test Tool Notes
-
This section contains detailed notes on each of the test tools used to verify pass or fail conditions in the test requirements.
Test Requirements
1. Game Requirements
1.1 Windows Games Explorer
Windows 7 Windows Vista |
The game must be visible within the Games Explorer on Windows Vista and Windows 7. When selected, the game must also display correct metadata. The installation must not create a shortcut to launch the game on the desktop, in the Start menu, or in any other location. Tasks and shortcuts for removal must not be created. |
|
1.2 Windows Family Safety / Parental Controls
Windows 7 Windows Vista |
Game must execute within the context of a "Standard User". Parental Controls must be able to block the game. Verify that the GDF has EXE names. |
|
1.3 Windows Vista Rich Saved Games
This requirement has been retired.
1.4 Xbox 360 Common Controller for Windows [Conditional Requirement]
Windows 7 Windows Vista Windows XP |
Games that support gamepad controllers must support the Xbox 360 Controller for Windows using the XInput API. All references to common controller triggers and buttons must use the Xbox 360 names. |
Note:
|
1.5 Multiple Aspect Ratios and Resolutions
Windows 7 Windows Vista Windows XP |
The game must support at least the following aspect ratios and associated screen resolutions:
|
Locate the Video Options for the game (this may be in our out of game). Note:
|
1.6 Windows Media Center
This requirement has been retired.
1.7 Direct3D [Conditional Requirement]
OS | Requirement |
---|---|
Windows 7 Windows Vista Windows XP |
If the game uses Direct3D, the minimum version supported must be Direct3D 9, and Direct3D must be the default for any display configuration option. |
|
1.8 Enable High-DPI Aware
Windows 7 Windows Vista |
Games and their installers must run correctly without visual problems when DPI scaling is enabled. |
|
2. Security and Compatibility
2.1 Follow User Account Control Guidelines
Windows 7 Windows Vista |
Every executable file (.EXE extension) included with an application must have an embedded manifest that defines its execution level:
|
|
2.2 Support x64 Versions of Windows
Windows 7 Windows Vista |
To maintain compatibility with x64 versions of Windows:
Note: |
Manual Test
|
2.3 Sign Files
Windows 7 Windows Vista Windows XP |
All executable code files (for example, .exe and .dll extensions) must be signed with an Authenticode certificate. If you are using Windows Installer, the installer's package files (.msi files) must be signed. |
Manual Test
|
2.4 Sign Drivers
Windows 7 Windows Vista Windows XP |
Any kernel-mode driver that is installed by the game must be signed with a publicly valid Authenticode certificate. Any kernel-mode hardware device driver that is installed by the game must have a Microsoft signature obtained through the Windows Hardware Quality Labs (WHQL) or Driver Reliability Signature (DRS) program. |
Manual Test
|
2.5 Perform Version Checking Properly
Windows 7 Windows Vista Windows XP |
Games must not fail to run on future operating systems as indicated by changes in the Windows version number, unless the End User License Agreement prohibits use on future operating systems. If the game is supposed to fail, it must do so gracefully by displaying a message to the user. |
|
2.6 Support Concurrent User Sessions
Windows 7 Windows Vista Windows XP |
Games must support standard Windows multitasking scenarios. |
Create a Standard User account in Windows Vista or Windows 7 called Toby. Start -> Control Panel -> Add or Remove User Accounts -> Create New Account
|
2.7 Support Long Names
Windows 7 Windows Vista Windows XP |
If a game supports saving files, it must be able to save files that have long names and paths. The game must properly handle special file system characters, such as \ / : * ? " < or > in any user input fields used to create file names or paths. |
|
3. Installation
3.1 Easy Install
Windows 7 Windows Vista Windows XP |
Games with a traditional installation must provide a simplified path in their setup user interface. |
|
3.2 Support User Account Control for Installation
Windows 7 Windows Vista |
The game installer must not assume it is running in the same context as the user. Games must therefore perform per-user tasks on first-run separately from the installation. |
|
3.3 Install to Correct Folders
Windows 7 Windows Vista Windows XP |
Games must be installed to the Program Files folder by default. User data must be written at first run and not during the installation. |
Note: |
3.4 Install Windows Resources Properly
Windows 7 Windows Vista Windows XP |
Applications must not attempt to install files or registry keys that are protected by Windows Resource Protection (WRP). |
|
3.5 Avoid Reboots During Installation
Windows 7 Windows Vista Windows XP |
The game installer should not assume that installation of Windows components from redistribution packages requires a reboot, unless the reboot is indicated by a return result or by Microsoft documentation. |
Note: |
3.6 Use File Versioning Correctly
Windows 7 Windows Vista Windows XP |
The game installation program must properly check to ensure that the latest file versions are installed. Installing a game must never regress any files that you do not produce or that are shared by applications that you do not produce. |
|
3.7 Support Autorun [Conditional Requirement]
Windows 7 Windows Vista Windows XP |
For games distributed on CD, DVD, or other removable media that support Autorun, when the disc is inserted for the first time, the application must automatically run or prompt the user to install the game. Note:
|
|
4. Reliability
4.1 Eliminate Unnecessary Reboots
OS | Requirement |
---|---|
Windows 7 Windows Vista |
All application installers must take advantage of the Restart Manager APIs to avoid system reboots (see requirement 3.5). |
4.2 Eliminate Application Verifier Failures
Windows 7 Windows Vista Windows XP |
The game must generate no failures running under Microsoft Application Verifier (AppVerifier), version 4.0 or later, in the following tests:
|
Use Tool: AppVerifier 4.0 (or later)
Note: |
4.3 Support Windows Error Reporting
Windows 7 Windows Vista Windows XP |
Games must handle only exceptions that are known and expected, and Windows Error Reporting must not be disabled. If a fault (such as an Access Violation) is injected into a game, it must allow Windows Error Reporting to report the crash. |
Use Tool: Thread Hijacker
|
Windows 7 Windows Vista Windows XP |
All executable files (for example, .exe or .dll files) must contain an accurate Product Name, Company Name, and File Version. |
|
Windows 7 Windows Vista Windows XP |
Normal exit of the game must not result in an unknown exception fault. |
|
5. Sample Test Script
This is an example of a typical test pass using the preceding test requirements as a guide.
5.1 Tools
- 32-bit edition of Windows Vista SP1 and/or Windows 7 on an AMD CPU
- 32-bit edition of Windows Vista SP1 and/or Windows 7 on an Intel CPU
- 64-bit edition of Windows Vista SP1 and/or Windows 7 on an AMD CPU
- 64-bit edition of Windows Vista SP1 and/or Windows 7 on an Intel CPU
- 32-bit edition Windows XP SP2 on an AMD CPU
- 32-bit edition Windows XP SP2 on an Intel CPU
- Wide Screen Monitor that supports 1680 1050
- Xbox 360 Controller for Windows
5.2 Pre-Install
Windows Vista and Windows 7: Create two Standard Users: Jane and Toby
Windows Vista and Windows 7: Ensure User Account Control is enabled
Create a pre-install snapshot of System32
- Make a directory called G4Wtest
- Bring up a command Window (Start -> Run -> cmd)
- Navigate to c:\windows\system32
- Type dir /o:-g /o:-d >> c:\G4Wtest\pregame.txt
Windows Vista and Windows 7: Set to 150% DPI [1.8]
Proceed to Install
5.3 Install
- Log on as User Jane
- Insert the game disc into the CD/DVD drive, verify that the install / run dialog box comes up automatically [3.7]
- Verify that the game installation process prompts User Jane to elevate Administrator Credentials [3.2]
- Verify that the game Autorun program itself does not prompt User Jane to elevate through Administrator Credentials [3.7]
- Verify that the game does not display more than one End-User License Agreement (EULA) [3.1]
- Verify that the game displays Default/Easy and Custom/Advanced installation options [3.1]
- Verify that the Default/Easy installation option bypasses all user input selections for the install process (selection of installation folder, components selection, and so on.) [3.1]
- Verify that the game installation process does not prompt for OS component setup (DirectX setup, C Run-Time libraries, and so on.) [3.1]
- Verify that the game installation process does not prompt for firewall interaction [3.1]
- Verify that the game installation process does not encounter an error regarding OS Version [2.5] [4.2]
- Verify that the game installation process does not display unsigned driver dialog(s) [2.4]
- Verify that no Windows Resource Protection (WRP) dialogs appear during the install process [3.4]
- Verify that re-inserting the disc in the drive after installation does not cause installation to automatically begin again
- Verify that the game does not require the system to be rebooted after installation [3.5]
- Verify that you can install the game as User Jane [3.2]
- Verify that the game automatically runs or that a launcher menu is present at the end of the installation process [3.1]
- If the game does auto-run after installation, skip to Runtime
- If the game left a launch menu up, or failed to uninstall see section Post-Install
5.4 Post-Install
Verify that the game does not place launch shortcuts on user desktop [1.1]
Verify that the game does not place launch shortcuts in the Start Menu [1.1]
Verify that the game icon displays in Windows Games Explorer [1.1]
Verify that the metadata (publisher, developer, genre, release date, version) at the bottom displays and is correct [1.1]
Verify that the game icon displays Windows Experience Index (WEI) information in Windows Games Explorer [1.1]
Verify that game hyperlinks for metadata work correctly in Windows Games Explorer [1.1]
Verify that the game displays accurate parental control rating in Windows Games Explorer [1.1]
Create a post-install snapshot of System32
- Bring up a command Window (Start -> Run -> cmd)
- Navigate to c:\windows\system32
- Type dir /o:-g /o:-d >> c:\G4Wtest\postgame.txt
- Verify that the game does not regress any file versions of files listed in the two documents by comparing pregame.txt to postgame.txt [3.6]
Proceed to Runtime
5.5 Runtime
RUNTIME 1: If the launch menu is present, launch the game from there. If the game auto-ran or was launched from the game launcher menu after install, perform the following; if not, skip to RUNTIME 2:
- Create a profile (if the game allows)
- Start a new game
- Save the game
- Exit the game
- Launch the game from Games Explorer
- Verify that the game launches from the Games Explorer icon [1.2]
- Verify that the game does not prompt for Administrator Credentials on launch [1.2]
- Verify that User Profiles and Save Games can be accessed by User Jane account [3.2]
- Proceed to RUNTIME 3
RUNTIME 2: If the game did not auto-run or display a launch from the game launcher menu, this is a failure of [3.1]; however, testing can continue normally:
- Launch the game from Games Explorer
- Verify that the game launches from the Games Explorer icon [1.2]
- Verify that the game does not prompt for Administrator Credentials on launch [1.2]
- Proceed to RUNTIME 3
RUNTIME 3: If the game supports a game pad, verify that the game recognizes Xbox 360 Controller for Windows as an input device [1.4]
- If needed, enable the controller via the options menu
- Verify that the game refers to the controller buttons and triggers using Xbox 360 names
- Verify that the game and menu system are controllable with the Xbox 360 Controller for Windows
- Verify that the Xbox 360 Controller for Windows behaves according to accepted standards
Set the video to [1.5]:
- Verify that the game runs at a 4:3 Aspect Ratio resolution (800 600 or 1024 768)
- Verify that the game runs at a 16:9 Aspect Ratio resolution (1280 720)
- Verify that the game runs at a 16:10 Aspect Ratio resolution (1680 1050, 800 480, or 1152 720)
- Verify that the game prompts the user when a change is made to the resolution
- Verify that the display reverts to the previous setting if you do not accept within 15 seconds
- Verify that the game does not stretch the picture and in turn presents a wider area of view
- Verify that the game does not add black bars to the left and right of the game play area
If available in the video settings, verify that the game render options default to Direct3D [1.7]; otherwise, proceed to Automated Tests
If prompted or if the option is available, create a user profile. Verify that the game does not encounter errors when using long file names [2.7]
Start a new game, create a game save, and verify that the game does not encounter errors when handling unsupported file system characters [2.7]
Verify that the game properly ALT+TABs to the Windows desktop [2.6]
- Switch users with the game running by clicking Start -> Switch User
- Log on as Toby
- Verify that the game launches as User Toby while still running as User Jane [2.6]
- Verify that the game does not encounter errors for User Toby or User Jane during User Switch process [2.6]
- Verify that you cannot hear audio from the original game session [2.6]
- Exit the game
- Log off Toby
- Switch back to the original user where the game is running
- ALT+TAB back into the game
Exit the game
Proceed to Post-Runtime
5.6 Post-Runtime
- Verify that the game does not generate errors on exit [4.3]
- Verify that the game installed to Program Files [3.3]
- Proceed to Parental Controls
5.7 Parental Controls
Open Parental Controls in Control Panel
Verify that the game displays accurate Parental Control Rating below the game title in Parental Controls Control Panel [1.2]
See Test Case [1.2] for the following tests:
After setting Parental Controls to "On", verify that the game runs with these settings as User Jane [1.2]
Log off and log on as Toby
Verify that the game runs with these settings as User Toby [1.2]
Log off and log on as Jane
In the Parental Control section, block User Toby from seeing games one ESRB level up and higher from the game that you just installed
Example: If the game is rated E, set it so Toby can only play games that are rated C
Verify that the game runs with these settings as User Jane [1.2]
Log off and log on as user Toby
Verify that the game does not launch on User Toby when ESRB is blocked by User Jane [1.2]
Log off as user Toby and back on as user Jane
If changed previously, restore the ESRB settings
If there are no ESRB settings, then select "Block or Allow Specific Games" and select the game by name
Log off as Jane and on as Toby
Verify that the game does not launch on User Toby when EXE/Name is blocked by User Jane [1.2]
Log off as Toby and back on as Jane
As Jane, open User Controls -> Application Restrictions
Click "Toby can only use the programs I allow", and then click OK (i.e. allow no exes)
Click the Uncheck All box, and then click OK
Go to User Controls | Games Controls and allow the specific game using the ESRB rating
Log off as Jane and log on as Toby and try to play the game
Verify that the game is NOT blocked and that Toby can play it when "allow no exes" is set [1.2]
Log off as user Toby and back on as user Jane
Go to Parental Controls in Control Panel and remove the restrictions
Verify that both users can now play the game
Proceed to Automated Tests
5.8 Automated Tests
- Verify that the game does not generate failures when run under Application Verifier - See Branding Test Tool Documentation [4.2]
- Verify that the game executable files contain manifests - see Branding Test Tool Documentation [2.1]
- Verify that the game executable file manifest requestedExecutionLevel is "AsInvoker" - see Branding Test Tool Documentation [2.1]
- Proceed to Other Tests
5.9 Other Tests
Verify that the game executable files contain a digital signature [2.3]
Verify that the game installation process runs normally on 64-bit editions of Windows Vista and/or Windows 7 [2.3]
Verify that the game does not encounter an error as a result of 16-bit executables on 64-bit editions of Windows Vista and/or Windows 7 [2.3]
Force the application to crash while testing, and verify that the game displays Windows Error Reporting properly and collects crash data [4.3]
Ensure proper file summaries [4.3]
Click Start -> Computer
Navigate to the game directory
In the search window, type *.dll
For each file: Right-click the file and click Properties
- In Windows XP: Click the Version tab. Verify that the Product Name, Company Name, and File Version fields are properly populated. [4.3]
- In Windows Vista and Windows 7: Click the Details tab. Verify that the Product name and File Version fields are properly populated. Company Name is not visible in the Windows Vista or Windows 7 properties page [4.3]
Repeat this check for .exe files
Launch the game.
- Press CTRL+ALT+DEL
- Click the "Shutdown Options" arrow
- Click Restart
- Verify game does not block shutdown [3.1]
Proceed to Uninstall
5.10 Uninstall
Verify that the game uninstallation process removes all installed, non-redistributed operating system component files and clears all settings [3.1]
- Verify in Windows Vista or Windows 7 that Control Panel is the only way to remove the program [1.1]
Test Tool Notes
These are notes for each of the test tools listed in the above test requirements.
6.1 Appverifier 4.0 (or higher)
Test Case: 2.5, 4.2
Note
Some applications fail to run with AppVerifier running, because of copy protection. This can be resolved by running with an unprotected release version of the game executable.
Install AppVerifier 4.0 (or higher) on a computer running Windows XP
Launch AppVerifier and click File -> Add Application
Locate the game executable, select it and click Open
In the "Applications" section, select the game executable
Select the following tests in the "Basics" section:
- Handles
- Heaps
- Locks
- Memory
- TLS
Select the following tests in the "Miscellaneous" section:
- DangerousAPIs
- DirtyStacks
Ensure all other tests are not selected
Launch the game
Play the game
Close the game
In AppVerifier select View -> Logs
In the "Applications" section select the app .exe file
In the "Logs" section, select the log file and observe the error count. If there are no errors, then end AppVerifier tests. If there are errors, click the View button
Search the document (CTRL+F) for Severity="Error
Create bugs based on the LayerName= portion of the failure
6.2 Manifest Test - mt.exe
Test Case: 1.8, 2.1
This tool is run from a command prompt where MT.exe is located.
Example:
mt.exe -inputresource:"c:\yourdir\YourGame.exe";#1 -out:yourgame.manifest
Click Start -> Run -> type cmd and click the OK button
Run the mt.exe tool to generate a .manifest file for each .exe file that installs with the game
Open the generated .manifest file
Ensure that each .exe file contains the following (requested:
<description>Example Game Name</description> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker"></requestedExecutionLevel> </requestedPrivileges> </security> </trustInfo> <asmv3:windowsSettings xmlns=http://schemas.microsoft.com/SMI/2005/WindowsSettings> <dpiAware>true<dpiAware> </asmv3:windowsSettings> </asmv3:application>
Note
Requested execution level should be present for every file, and dpiAware should be present for at least the game s executable file.
6.3 Thread Hijacker - threadhijacker.exe
This tool is run from a command prompt where threadhijacker.exe is located.
Example:
threadhijacker.exe /process:str
Where str is the name_of_program.exe
- Bring up Task Manager, click the Processes tab, and locate the name of the game executable.
- Open a command prompt in Admin mode
- Navigate to the directory where threadhijacker.exe is
- Type: **threadhijacker.exe /process:**str, where str is the name of the executable that you want to hit
6.4 Microsoft Games for Windows Test Tool
This tool is located in the DirectX SDK. Once the SDK is installed on a computer, the installer for the Games for Windows Test Tool can be placed on the test computer and installed.
Locate the Microsoft Games for Windows Test Tool installer on the development computer where the DirectX SDK is installed. By default, it is placed in the following location:
%SystemDrive%\Program Files (x86)\Microsoft DirectX SDK (Date)\Utilities\bin\x86\Microsoft Games for Windows Test Tools\
Copy the installer (MicrosoftGFWTestTool.msi / setup.exe) to the test computer.
Run the installer.
Launch the Microsoft Games for Windows Test Tool.
In the Project List field replace Create New Project with your title name and click Create New.
Wait for the Baseline to complete.
Fill in any information that you may have in the Game Information section, and click Update Game Information.
Click on Test Cases tab.
Starting at the top, proceed through the test cases, clicking Pass or Fail as appropriate.
See "Writing a Bug", later in this section, for details on including a bug in the report.
Return to the Projects tab after reviewing the report (by checking the Report and Bug Edit tabs).
Click Compile Report.
A window will open when the report is finished compiling. Here you will find a .ZIP file names ProjectName_report.zip. This file contains all of the logs and results collected during the test pass.
Writing a Bug
There are two ways to write a bug report: you can go through the test cases and click Fail when the title fails a test case, or you can click the Bug Edit tab and manually add a bug report.
Clicking Fail on a test case
- When you click Fail on a test case, the Issue Type drop-down list will automatically be set to the test case type.
- Add a short description to the Title field that briefly describes the issue.
- Add a detailed description of the issue to the Observed Behavior field.
- As appropriate, add what was expected (as opposed to a description of the issue) to the Expected Behavior field.
- Add a detailed description of how to reproduce the issue to the Repro-Steps field.
- When done, click the Save button.
Manually Adding a Bug
This process is the same as clicking Fail, with the exception of the auto-populated drop-down list. In this case, either select the appropriate TCR failure type or select ** Non-TR Issue ** for bugs that fall outside of the TR range but should still be reported.
Resources
-
Games for Windows: Technical Requirements
-
Windows SDK
-
User Account Control Guidelines
-
Windows Vista Application Development Requirements for User Account Control Compatibility
-
Windows Installer Information
-
DirectX Developer Portal
-
Games for Windows and DirectX SDK Blog
-
Additional DirectX Articles