Skip to content

How to Run Test Suites with Docker

chenlu0616 edited this page Jan 5, 2021 · 10 revisions

Prerequisites

You need to install docker on your platform, go to the Get Docker for help.

Featured Tags

  • fileserver: The fileserver test suite image.
    • Ubuntu 20.04 for Linux
    • docker pull mcr.microsoft.com/windowsprotocoltestsuites:fileserver
  • rdpserver: The rdpserver test suite image.
    • Ubuntu 20.04 for Linux
    • docker pull mcr.microsoft.com/windowsprotocoltestsuites:rdpserver
  • rdpclient: The rdpclient test suite image.
    • Ubuntu 20.04 for Linux
    • docker pull mcr.microsoft.com/windowsprotocoltestsuites:rdpclient

About the Image

Windows Protocol Test Suites provide interoperability testing against the implementation of Windows open specifications including File Services, Remote Desktop Services. If you are new to Windows Protocol Test Suites and want to learn more, go to the windows protocol test suites to get started.

How to Use the Image

To run the fileserver image, you need to mount a folder with fileserver ptfconfig files included and pre-configured. You may need to update some fields in the *.deployment.ptfconfig files like "SutComputerName", "SutIPAddress", etc.

  • --hostname: Required. The host name of the running container, for example: FS-CLI
  • --network: Required. The network the running container will use, using host as default. While using host, please make sure that the connection between the host which the container is runnning and the server is valid.
  • -v: Required. The /path/of/ptfconfig should include all the ptfconfig files with pre-configured, and mount this path to the fixed path /data/fileserver in the container
  • -i: Required. The image name, for example: windowsprotocoltestsuites:fileserver
  • $filter: Optional. The expression used to filter test cases. For example, "TestCategory=BVT&TestCategory=SMB311" will filter out test cases with test category BVT and SMB311.
  • $dryRun: Optional. If set as "y", just list all the test cases match the filter string instead of running them. If it's null or empty, the filtered test cases will be executed directly

To run the windows protocol test suites image for fileserver:

docker run \
  --hostname <hostname> \
  --network host \
  -v /path/of/ptfconfig:/data/fileserver \
  -i mcr.microsoft.com/windowsprotocoltestsuites:fileserver \
  [optional]$filter \
  [optional]$dryRun

To run the rdpserver or rdpclient image, you need to mount a folder with rdpserver ptfconfig or rdpclient ptfconfig files included and pre-configured. You may need to update some fields in the *.deployment.ptfconfig files like "RDP.ServerUserName", "RDP.ServerUserPassword", etc.

  • --hostname: Required. The host name of the running container, for example: RDPClient.

    Note: If you are running rdpclient image, you have to use the ip address here as the hostname.

  • --network: Required. The network the running container will use, using host as default. While using host, please make sure that the connection between the host which the container is runnning and the server is valid.

  • -v: Required. The /path/of/ptfconfig should include all the ptfconfig files with pre-configured, and mount this path to the fixed path /data/rdpserver in the container.

    Note: If you are running rdpclient image, you need to create a self-signed certificate named "RDPServer.pfx" and put it together with the ptfconfig files, and update the related ptfconfig value. You can also use the default certificate and settings contained in the rdpclient-docker-ptfconfig.tar.gz

  • -i: Required. The image name, for example: windowsprotocoltestsuites:rdpserver or windowsprotocoltestsuites:rdpclient

  • Filter: Optional environment variable. The expression used to filter test cases. For example, "'TestCategory=BVT&TestCategory=RDPBCGR'" will filter out test cases with test category BVT and RDPBCGR.

  • DryRun: Optional environment variable. Default is "y", which will just list all the test cases match the filter string instead of running them. If it's null or empty, the filtered test cases will be executed directly.

To run the windows protocol test suites image for rdpserver:

docker run \
  --hostname <hostname> \
  --network host \
  -v /path/of/ptfconfig:/data/rdpserver \
  -e Filter="'TestCategory=BVT&TestCategory=RDPBCGR'" \
  -e DryRun="" \
  -i mcr.microsoft.com/windowsprotocoltestsuites:rdpserver

To run the windows protocol test suites image for rdpclient:

docker run \
  --hostname <hostIPAddress> \
  --network host \
  -v /path/of/ptfconfigAndcert:/data/rdpclient \
  -e Filter="'TestCategory=BVT&TestCategory=RDPBCGR'" \
  -e DryRun="" \
  -i mcr.microsoft.com/windowsprotocoltestsuites:rdpclient

When the test suites run finished, the result file with trx format will be generated under the location /path/of/ptfconfig

Feedback

If you have any issues or concerns, reach out to us through a GitHub issue.

License

Clone this wiki locally