Testing Applications on Windows Vista

  • Upload
    silkyc

  • View
    220

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 Testing Applications on Windows Vista

    1/18

    TestingTesting

    Applications onApplications on

    Windows VistaWindows VistaEdited By Michael ShawEdited By Michael Shaw

  • 8/14/2019 Testing Applications on Windows Vista

    2/18

    Guidance for ApplicationGuidance for Application

    TestersTesters

    Before TestingBefore Testing Remember: Windows Vista is still in Beta.Remember: Windows Vista is still in Beta. Ensure all tests pass on Windows XPEnsure all tests pass on Windows XP

    This helps to ensure only regression bugs are foundThis helps to ensure only regression bugs are found

    Test on XP as a non-Admin userTest on XP as a non-Admin user

    This will eliminate complexity if the application has issuesThis will eliminate complexity if the application has issues

    with non-Admin accountswith non-Admin accounts

    Bonus:Bonus: Certified for Windows Vista GuidelinesCertified for Windows Vista Guidelines

    http://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspxhttp://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspxhttp://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspx
  • 8/14/2019 Testing Applications on Windows Vista

    3/18

    Hardware ConfigurationHardware Configuration

    Windows Vista Minimum RequirementsWindows Vista Minimum Requirements Modern CPU (800+MHz), 512MB RAM, DX9 GPU w/128MBModern CPU (800+MHz), 512MB RAM, DX9 GPU w/128MB

    onboard, 40GB HD, DVDonboard, 40GB HD, DVD

    Recommended hardware for testing Windows Vista compatibilityRecommended hardware for testing Windows Vista compatibility

    Dual x64 CPU, 1GB RAM, WDDM GPU, 80GB HD, DVDDual x64 CPU, 1GB RAM, WDDM GPU, 80GB HD, DVD

    Using high end hardware for testing will help uncover more bugsUsing high end hardware for testing will help uncover more bugs Multi-proc specific issuesMulti-proc specific issues Painting issues with desktop compositing enabledPainting issues with desktop compositing enabled

    Can be used for both x86 and x64 testingCan be used for both x86 and x64 testing Data Execution Prevention (DEP) supportData Execution Prevention (DEP) support

  • 8/14/2019 Testing Applications on Windows Vista

    4/18

    OS ConfigurationOS Configuration

    Leave all functions enabledLeave all functions enabled Search Indexer, UAC, System Restore, Sidebar, etc.Search Indexer, UAC, System Restore, Sidebar, etc.

    Create multiple usersCreate multiple users 1x Administrator, 1x Non-Admin1x Administrator, 1x Non-Admin Do not rely on built-in AdministratorDo not rely on built-in Administrator

    Ensure WDDM video w/Glass is being usedEnsure WDDM video w/Glass is being used Test both x86 and x64 - clean installTest both x86 and x64 - clean install Test x86 upgrade from XP to Windows VistaTest x86 upgrade from XP to Windows Vista

    Install XP -> Install App -> Upgrade to Windows Vista -> Test AppInstall XP -> Install App -> Upgrade to Windows Vista -> Test App

    Bonus:Bonus: Enable NX protection. Enable AppVerifier. Enable 120 DPI.Enable NX protection. Enable AppVerifier. Enable 120 DPI.

  • 8/14/2019 Testing Applications on Windows Vista

    5/18

    Test CasesTest Cases

    Non-Admin Install/UpdateNon-Admin Install/Update Should prompt for administrative credentialsShould prompt for administrative credentials Shortcuts should appear for all usersShortcuts should appear for all users

    Explorer thumbnail previewsExplorer thumbnail previews Content previews in explorer windowsContent previews in explorer windows Rich preview handlersRich preview handlers

    Search indexingSearch indexing Extend the indexer to include the contents of yourExtend the indexer to include the contents of your

    data filesdata files Property HandlersProperty Handlers

    Default Programs / File ExtensionsDefault Programs / File Extensions Per user defaultsPer user defaults

    http://windowssdk.msdn.microsoft.com/library/en-us/SDKintro/html/d26a1b4a-4087-4c2c-b30a-aa9f6c86bb9a.asphttp://windowssdk.msdn.microsoft.com/library/en-us/SDKintro/html/d26a1b4a-4087-4c2c-b30a-aa9f6c86bb9a.asphttp://windowssdk.msdn.microsoft.com/en-us/library/ms649535(VS.80).aspxhttp://windowssdk.msdn.microsoft.com/en-us/library/ms649535(VS.80).aspxhttp://windowssdk.msdn.microsoft.com/en-us/library/ms649535(VS.80).aspxhttp://windowssdk.msdn.microsoft.com/library/en-us/SDKintro/html/d26a1b4a-4087-4c2c-b30a-aa9f6c86bb9a.asp
  • 8/14/2019 Testing Applications on Windows Vista

    6/18

    Guidance for ApplicationGuidance for Application

    TestersTesters Test how your installation and update is doneTest how your installation and update is done

    Use MSI 3.1 for Install and UpdateUse MSI 3.1 for Install and Update Alternate to MSI3.1 call Update.exe marked as admin toAlternate to MSI3.1 call Update.exe marked as admin to

    do the updatedo the update

    Self Updating Code DONT DO ITSelf Updating Code DONT DO ITThis is the LARGEST Application Compatibility problem withThis is the LARGEST Application Compatibility problem with

    home consumer user applicationshome consumer user applications

    Use MSI 3.1 updating procedures for this functionalityUse MSI 3.1 updating procedures for this functionality

    Examples of what not to do:Examples of what not to do: Do not assume the user is an administratorDo not assume the user is an administrator

    Run Custom Actions in right contextRun Custom Actions in right context

  • 8/14/2019 Testing Applications on Windows Vista

    7/18

    Guidance for ApplicationGuidance for Application

    Testers (cont.)Testers (cont.)

    Test where the application data is storedTest where the application data is storedThe apps per user setup is performed at first runThe apps per user setup is performed at first run

    Place per-user data into %LOCALAPPDATA%Place per-user data into %LOCALAPPDATA% Roaming into %APPDATA%Roaming into %APPDATA%

    Place Per-Machine (Shared) data into %ALLUSERPROFILE%Place Per-Machine (Shared) data into %ALLUSERPROFILE%

    Examples of what not to do:Examples of what not to do: Do not perform admin configuration at first run.Do not perform admin configuration at first run.

    Do your admin operations during setupDo your admin operations during setup

    Do not perform explicit Admin checks for Standard UserDo not perform explicit Admin checks for Standard Userapplicationsapplications

    C lU A t C t l

  • 8/14/2019 Testing Applications on Windows Vista

    8/18

    User Account ControlsUser Account Controls

    (UAC) Guidance for(UAC) Guidance for

    Application TestersApplication Testers Split-TokenSplit-Token By default, all users are running with a standard tokenBy default, all users are running with a standard token

    Admin accounts will fail when performing privilegedAdmin accounts will fail when performing privileged

    operations even though they worked in the pastoperations even though they worked in the past

    Credential/Consent UICredential/Consent UI

    This UI is not automatable from aThis UI is not automatable from a standard userstandard user

    process.process. There must be an elevated process or serviceThere must be an elevated process or service

    to help drive the elevation UI.to help drive the elevation UI.

  • 8/14/2019 Testing Applications on Windows Vista

    9/18

    UAC Guidance forUAC Guidance for

    Application TestersApplication Testers Process IsolationProcess Isolation

    Integrity level is assigned to each processIntegrity level is assigned to each process

    Lower integrity processes are blocked from writing toLower integrity processes are blocked from writing to

    & reading from higher integrity processes& reading from higher integrity processes

    Lower integrity processes are blocked from sendingLower integrity processes are blocked from sending

    Windows messages to higher integrity processesWindows messages to higher integrity processes See UIPISee UIPIsection in the app compat cookbooksection in the app compat cookbook

    UAC is the default configuration for WindowsUAC is the default configuration for Windows

    Vista (and beyond)Vista (and beyond)

    http://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asphttp://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asphttp://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asp
  • 8/14/2019 Testing Applications on Windows Vista

    10/18

    UAC Test Impact (cont.)UAC Test Impact (cont.)

    File and Registry Virtualization/Data RedirectionFile and Registry Virtualization/Data Redirection A list of protected system files, directories, registryA list of protected system files, directories, registry

    locations when written to by a standard user will belocations when written to by a standard user will be

    virtualized to a per-user location.virtualized to a per-user location.

    Each standard user will have a virtualized view of the FSEach standard user will have a virtualized view of the FSand Registryand Registry

    Processes running elevated will not see virtualized FS &Processes running elevated will not see virtualized FS &

    RegistryRegistry

    Changing system setting from standard user processChanging system setting from standard user process

    may succeed due to virtualization, but it doesnt affectmay succeed due to virtualization, but it doesnt affectthe systemthe system

  • 8/14/2019 Testing Applications on Windows Vista

    11/18

    UAC Test GuidanceUAC Test Guidance

    Test under the default OS environmentTest under the default OS environment

    Dont turn UAC offDont turn UAC off

    Move away from testing as the built-in administratorMove away from testing as the built-in administrator

    Test application for UACTest application for UAC

    Test component or application as standard userTest component or application as standard user

    Make sure all application functionalities are workingMake sure all application functionalities are working

    Pay attention to update and anything that is disabled due to adminPay attention to update and anything that is disabled due to admin

    check.check.

  • 8/14/2019 Testing Applications on Windows Vista

    12/18

    UAC Testing SupportUAC Testing Support

    (cont.)(cont.) UAC User Level LibraryUAC User Level Library

    Identify the level of the user tokenIdentify the level of the user token

    Allow easy query of well-known groupsAllow easy query of well-known groups

    and privilegesand privileges

    Allow easy query and set of UAC policyAllow easy query and set of UAC policy

    Allow easy test case selection &Allow easy test case selection &

    pass/failure determinationpass/failure determination Available in native and managed codeAvailable in native and managed code

  • 8/14/2019 Testing Applications on Windows Vista

    13/18

    Common IssuesCommon Issues

    Dependencies on deprecated binaries/APIsDependencies on deprecated binaries/APIs Kernel mode printer drivers, HLP filesKernel mode printer drivers, HLP files

    Assuming administrative rightsAssuming administrative rights

    Windows Resource ProtectionWindows Resource Protection Do not attempt to modify system binariesDo not attempt to modify system binaries Registry protection for system keysRegistry protection for system keys

    Rendering / Painting / DPI scaling issuesRendering / Painting / DPI scaling issues Black areas when not painting the entire hwndBlack areas when not painting the entire hwnd Glass self-disable when a process attempts toGlass self-disable when a process attempts to

    paint outside its client areapaint outside its client area Clipped TextClipped Text

  • 8/14/2019 Testing Applications on Windows Vista

    14/18

    Common Issues Cont.Common Issues Cont.

    Per user vs. per machine settingsPer user vs. per machine settings Do not configure system settings on first launchDo not configure system settings on first launch

    IE7+ Compatibility Low Rights IEIE7+ Compatibility Low Rights IE

    Doing work inDoing work in DLLMainDLLMain User Interface Privilege Isolation (UIPI)User Interface Privilege Isolation (UIPI)

    Lower privilege processes cannot sendLower privilege processes cannot sendmessages to higher privileged processesmessages to higher privileged processes

    SendMessage will still return successSendMessage will still return success OS version checksOS version checks

    http://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspxhttp://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspxhttp://www.microsoft.com/whdc/driver/kernel/DLL_bestprac.mspx
  • 8/14/2019 Testing Applications on Windows Vista

    15/18

    x64 Specific Issuesx64 Specific Issues

    No 16-Bit binary supportNo 16-Bit binary support

    No 32-Bit kernel mode driver supportNo 32-Bit kernel mode driver support

    64-Bit kernel mode drives must be64-Bit kernel mode drives must besignedsigned

    Side by side application installSide by side application install

    conflictsconflicts Hardware architecture checksHardware architecture checks

  • 8/14/2019 Testing Applications on Windows Vista

    16/18

    UAC FAQUAC FAQ

    If I mark my app as admin, can I skip the elevation consent dialog?If I mark my app as admin, can I skip the elevation consent dialog? NoNo

    Can you modify the privilege of a running application?Can you modify the privilege of a running application? - No- No Will LUA elevate whenever a privileged API is used?Will LUA elevate whenever a privileged API is used? No, the entire No, the entire

    process is either elevated or notprocess is either elevated or not How long does the elevated process last? Can it time out?How long does the elevated process last? Can it time out? Life of Life of

    the processthe process Can I enable which users will use UAC?Can I enable which users will use UAC? Currently this is a per Currently this is a permachine settingmachine setting

    Does UAC apply to all processes and services?Does UAC apply to all processes and services? Interactive Interactiveprocesses onlyprocesses only

    What areas of the Registry and File system get redirected?What areas of the Registry and File system get redirected? HKLM\Software, %SystemRoot%, %ProgramFiles%HKLM\Software, %SystemRoot%, %ProgramFiles%

    Wont Redirection de-motivate developers to fix their code?Wont Redirection de-motivate developers to fix their code? Yes, it is Yes, it isa short term mitigation, not in 64bita short term mitigation, not in 64bit What happens when installer detection fails?What happens when installer detection fails? The app runs as non- The app runs as non-

    adminadmin Will UAC be going down-level?Will UAC be going down-level? - No- No

  • 8/14/2019 Testing Applications on Windows Vista

    17/18

    Standard User AnalyzerStandard User Analyzer

    (SUA)(SUA) Intended to predict whether an applicationIntended to predict whether an application

    would work correctly as a standard user.would work correctly as a standard user. Identifies API calls that would fail if attempted byIdentifies API calls that would fail if attempted by

    a usera user Identifies all access requiring elevated privilegesIdentifies all access requiring elevated privileges

    Example of Standard User Analyzer test pass:Example of Standard User Analyzer test pass: Use SUA to launch your application as elevatedUse SUA to launch your application as elevatedTest applicationTest application Analyze the log for API calls that will fail forAnalyze the log for API calls that will fail for

    standard userstandard user http://www.microsoft.com/downloads/details.aspx?FamilyID=df59b474-c0b7-442http://www.microsoft.com/downloads/details.aspx?FamilyID=df59b474-c0b7-442

    http://www.microsoft.com/downloads/details.aspx?FamilyID=df59b474-c0b7-4422-8c70-b0d9d3d2f575&DisplayLang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyID=df59b474-c0b7-4422-8c70-b0d9d3d2f575&DisplayLang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyID=df59b474-c0b7-4422-8c70-b0d9d3d2f575&DisplayLang=en
  • 8/14/2019 Testing Applications on Windows Vista

    18/18

    Windows Vista Application Compatibility CookbookWindows Vista Application Compatibility Cookbook Windows Vista Compatibility Troubleshooting GuideWindows Vista Compatibility Troubleshooting Guide Certified for Windows Vista GuidelinesCertified for Windows Vista Guidelines Microsoft Application Verifier ToolMicrosoft Application Verifier Tool Understanding UAC in Windows Vista Beta 2Understanding UAC in Windows Vista Beta 2

    DevReadiness.orgDevReadiness.org Windows Vista ISV Jumpstart ToolkitWindows Vista ISV Jumpstart Toolkit

    Technology Overview: Internet Explorer 7 Beta 3Technology Overview: Internet Explorer 7 Beta 3 Windows Vista User Experience GuidelinesWindows Vista User Experience Guidelines Windows Vista Application CompatibilityWindows Vista Application Compatibility Top 10 ways to light up your Windows Vista appsTop 10 ways to light up your Windows Vista apps http://blogs.msdn.com/uachttp://blogs.msdn.com/uac

    UAC Dev and Test information will be provided on the blogUAC Dev and Test information will be provided on the blogfrequently.frequently.

    http://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asphttp://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asphttp://devreadiness.org/files/5/white_papers/entry125.aspxhttp://devreadiness.org/files/5/white_papers/entry125.aspxhttp://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspxhttp://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspxhttp://www.microsoft.com/downloads/details.aspx?FamilyID=bd02c19c-1250-433c-8c1b-2619bd93b3a2&DisplayLang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyID=bd02c19c-1250-433c-8c1b-2619bd93b3a2&DisplayLang=enhttp://www.microsoft.com/technet/WindowsVista/library/00d04415-2b2f-422c-b70e-b18ff918c281.mspxhttp://www.microsoft.com/technet/WindowsVista/library/00d04415-2b2f-422c-b70e-b18ff918c281.mspxhttp://devreadiness.org/http://devreadiness.org/http://devreadiness.org/blogs/works_with_windows_vista/archive/2006/05/17/8.aspxhttp://devreadiness.org/blogs/works_with_windows_vista/archive/2006/05/17/8.aspxhttp://www.microsoft.com/downloads/details.aspx?FamilyId=2717A8CB-0FAA-4A8E-B5D3-987DC654ACBB&displaylang=enhttp://www.microsoft.com/downloads/details.aspx?FamilyId=2717A8CB-0FAA-4A8E-B5D3-987DC654ACBB&displaylang=enhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/uxguide/uxguide/home.asphttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/uxguide/uxguide/home.asphttp://www.microsoft.com/technet/windowsvista/appcompat/default.mspxhttp://www.microsoft.com/technet/windowsvista/appcompat/default.mspxhttp://msdn.microsoft.com/windowsvista/prodinfo/top10/default.aspxhttp://msdn.microsoft.com/windowsvista/prodinfo/top10/default.aspxhttp://blogs.msdn.com/uachttp://blogs.msdn.com/uachttp://blogs.msdn.com/uachttp://msdn.microsoft.com/windowsvista/prodinfo/top10/default.aspxhttp://www.microsoft.com/technet/windowsvista/appcompat/default.mspxhttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/uxguide/uxguide/home.asphttp://www.microsoft.com/downloads/details.aspx?FamilyId=2717A8CB-0FAA-4A8E-B5D3-987DC654ACBB&displaylang=enhttp://devreadiness.org/blogs/works_with_windows_vista/archive/2006/05/17/8.aspxhttp://devreadiness.org/http://www.microsoft.com/technet/WindowsVista/library/00d04415-2b2f-422c-b70e-b18ff918c281.mspxhttp://www.microsoft.com/downloads/details.aspx?FamilyID=bd02c19c-1250-433c-8c1b-2619bd93b3a2&DisplayLang=enhttp://microsoft.mrmpslc.com/VistaPlatformAdoption/Overview/CertifiedFor.aspxhttp://devreadiness.org/files/5/white_papers/entry125.aspxhttp://msdn.microsoft.com/windowsvista/default.aspx?pull=/library/en-us/dnlong/html/AppComp.asp