次の方法で共有


WPD Compliance Tests - Services

This test is designed to validate Windows Portable Device (WPD) scenarios at the WPD API level. The supported scenarios and device services validated in this test are defined in the MTP Device Services for Windows specification. The MTP Device Services Extension specification defines the required interactions between the device and the MTP driver.

Test details

Associated requirements

Device.Portable.Core.CustomDeviceServices Device.Portable.Core.DeviceServices

See the device hardware requirements.

Platforms

Windows 7 (x64) Windows 7 (x86) Windows RT (ARM-based) Windows 8 (x64) Windows 8 (x86) Windows RT 8.1 Windows 8.1 x64 Windows 8.1 x86

Expected run time

~2 minutes

Categories

Certification Functional

Type

Automated

 

Running the test

Before you run the test, complete the test setup as described in the test requirements: Device.Portable Testing Prerequisites.

Note  

You may need additional hardware if the test device provides bus-specific support. To determine whether you need additional hardware, see the description for each bus-specific test.

 

Troubleshooting

For troubleshooting information, see Troubleshooting Device.Portable Testing.

The test might return SKIP if the device does not support specific device services. To review test details, review the test log from Driver Test Manager (DTM) Studio.

When troubleshooting this test, note the following:

  • This test supports verbose logging when in manual test case selection mode. When the application is running, in Options > Logging Options, click Destination: Window, Level: 10.

  • If no test cases are available from the tree for test-case selection, make sure that the device is plugged in.

More information

The Media Transfer Protocol (MTP) Device Services for Windows Specification defines the supported scenarios and device services that this test validates. The MTP Device Services Extension Specification defines the required interactions between the device and the MTP driver. For more information, see MTP Device Services Extension Specification.

The compliance test maintains a configuration file for each service that the MTP Device Services for Windows Specification defines. Each configuration file defines the inherited services, properties, formats, format attributes, and format object properties for its corresponding service. Various test cases use the settings in the configuration file to validate whether each service that's supported by the device complies with Windows 7 or Windows 8. In addition to the test-case descriptions in this section, all strings (like service, format, and property names) are validated to be scriptable according to the MTP Device Services Extension Specification.

Device services are optional. For all services that the device supports, the WPD Compliance Test - ALL SERVICES test will run. This test case tries to validate the services that the device exposes against the definition in the MTP Device Services for Windows Specification. The test case reads the target services' definition from the configuration files that are packaged with the compliance test. The test case validates the actual service characteristics that are exposed from the device against these predefined settings.

Validating service static definitions

  1. Load the Service definition from configuration for target service

  2. Validate inheritance settings

    Get the expected inheritance setting (NoInheritance, Optional, Required, AtLeastOne)

    Get the actual service inherited services (IPortableDeviceServiceCapabilities::GetInheritedServices)

    IF no service inherited service but inheritance is expected

    Log error and exit

    ENDIFFOR each expected inherited Service (H)

    IF the service inherits H

    Save H's GUID to use for validation later

    ELSE

    IF H is required

    Log error and exit

    ENDIF

    ENDIF

    ENDFOR

  3. Validate service properties

    Generate list of expected supported properties

    Including inherited properties (queried by the actual inherited services saved above)

    FOR each expected property P

    IF the service does not supports P and P is required

    Log fatal error

    Continue FOR

    ENDIF

    Validate P's expected attributes (below) against the corresponding property

    WPD_PROPERTY_ATTRIBUTE_NAME

    WPD_PROPERTY_ATTRIBUTE_VARTYPE

    WPD_PROPERTY_ATTRIBUTE_CAN_WRITE

    WPD_PROPERTY_ATTRIBUTE_CAN_READ

    ENDFOR

  4. Validate supported formats

    Generate list of expected formats

    Including inherited formats (queried by the actual inherited services saved above)

    FOR each expected format F

    IF the service does not supports F and F is required

    Log fatal error

    Continue FOR

    ENDIF

    FOR each expected property P in F

    IF the service does not supports P and P is required

    Log fatal error

    Continue FOR

    ENDIF

    Validate P's expected attributes (below) against the corresponding property

    WPD_PROPERTY_ATTRIBUTE_NAME

    WPD_PROPERTY_ATTRIBUTE_VARTYPE

    WPD_PROPERTY_ATTRIBUTE_CAN_WRITE

    WPD_PROPERTY_ATTRIBUTE_CAN_READ

  5. Validate service supported methods

    Generate list of expected methods

    Including inherited methods (queried by the actual inherited services saved above)

    FOR each expected format M

    IF the service does not supports M and M is required

    Log fatal error

    Continue FOR

    ENDIF

    FOR each expected parameter P in M

    IF the service does not supports P and P is required

    Log fatal error

    Continue FOR

    ENDIF

    Validate P's expected attributes (below) against the corresponding property

    WPD_PARAMETER_ATTRIBUTE_NAME

    WPD_PARAMETER_ATTRIBUTE_VARTYPE

    WPD_PARAMETER_ATTRIBUTE_ORDER

    WPD_PARAMETER_ATTRIBUTE_USAGE

    WPD_PROPERTY_ATTRIBUTE_CAN_READ

Command syntax

Command option Description

te.exe wpdcompliance.dll /select:”@name='*Service*' and @TestClassification:Type='HCK'”

Runs the test.

 

Note  

For command-line help for this test binary, type /h.

 

File list

File Location

WPDCompliance.dll

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\wdk\

test.mp3

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Audio\

test.wma

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Audio\

test.html

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Document\

test.txt

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Document\

test.bmp

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.GIF

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.ico

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.jp2

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.jpg

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.jpx

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.png

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.tif

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Image\

test.wmv

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Video\

TestFile.avi

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\Content\Video\

Devcon.exe

[OSBinRoot]\idw\

CalendarSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

ContactsSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

ContentTransferApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

GeneralSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

HintsSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

MetadataSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

NotesSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

RingtoneSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

StatusSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

TasksSvcApp.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

WpdUploadFile.exe

[TestBinRoot]\NTTEST\MULTIMEDIATEST\wpd\WpdCompliance\

 

 

 

Send comments about this topic to Microsoft