DocumentProperties Test (ANSI & UniCode)

Note  This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.

Type: Automated Test

Overview

The Document Properties Test exercises the DocumentProperties API.

PrintSpy is enabled for this test. For more information, please go to PrintSpy.

Details

The Document Properties Test exercises a printer driver's user interface (UI) by calling the DocumentProperties API with various well-formed and mal-formed parameters and validating the results.

For each test case, the parameters that are used are printed in the log file. The following code example shows a sample log file.

<StartTest 
                Title="DocumentPropertiesTEST" 
                TUID="" CA="259184628680" LA="259190331028" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</StartTest>
<Msg 
                UserText="Testing Parameters permutation:" CA="259184695528" LA="259191739244" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="ParentWindow handle = NULL" CA="259187152000" LA="259197116980" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="PrinterHandle   = 0008B13C" CA="259187274076" LA="259198369668" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="DevName                                         = BadPrinterName" CA="259189194348" LA="259202784116" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="OutDevMode                   = 00000000" CA="259194212632" LA="259205347188" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="InDevMode                      = 0026D838" CA="259194365944" LA="259207533880" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="fMode == 0x5E" CA="259195053008" LA="259208248332" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="DM_COPY | DM_PROMPT | DM_MODIFY | DM_ADVANCED | DM_USER_DEFAULT" CA="259199944896" LA="259209030276" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="Checking return from DocumentProperties():" CA="259578756012" LA="259579142928" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<Msg 
                UserText="No Errors found" CA="259581819836" LA="259585130656" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</Msg>
<EndTest 
                Title="DocumentPropertiesTEST" 
                TUID="" 
                Result="Pass" 
                Repro="SUCCESS: Variation: 0" CA="259582037324" LA="259586679184" >
                <rti id="2701157395" />
                <ctx id="4071736938" />
</EndTest>

The difference between the Document Properties Test and the Document Properties Test Unicode is that the buffers in Document Properties Test are based on ANSI CHARs and the buffers in the Document Properties Test Unicode are based on Unicode WCHARs.

This test will "pass" if the log file contains no (zero) failures.

This test will "fail" if the log file shows one or more test cases failed.

Run Time: 5 minutes

**Log File:**docpropapi.log

System Restart Required: No

Test Category:

Supported operating systems for Logo or Signature testing:

  • Windows 7

  • Windows Server 2008 R2

  • Windows Vista

  • Windows Server 2003

  • Windows XP

Program:

Requirements

Software Requirements

The test tool requires the following software:

  • Supported operating system (see list above)

  • Software components included with the device that is being tested

Hardware Requirements

The test tool requires the following hardware:

  • Device to be tested

  • Computer that meets the minimum software requirements

  • Windows keyboard

  • Two-button pointing device

  • Color display monitor capable of at least 1024 by 768 resolution, 32-bits per pixel, 60 Hz

  • Hard drive with a minimum of 20 GB available on partition C:

Processor

  • x86

  • x64

  • Itanium

Command Syntax

Command option Description

/p=<Printer Name>

The name of the printer to test.

/l=<Log File Name>

The name of the log file.

/s=<Server Name>

The name of the print server if the printer is remote.

/umdh

Run under memory leak detection.

/r=<Number>

The number of times to run the test.

 

Test Assertions

Windows Logo Program: IMAGING-0030 Printer drivers must be correctly implemented based on the content of the WDK

 

 

Build date: 9/14/2012