WinTest

From SambaWiki
Revision as of 23:35, 1 December 2010 by AndrewTridgell (talk | contribs)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Testing against Windows with wintest

wintest is a framework for testing Samba against Windows virtual machines. It aims to provide a reliable, repeatable test system that any Samba developer can setup.

The core of wintest is based on pexpect, a python expect system that provides a flexible way of controlling command line tools.

Some background information on wintest is available in this blog post

Setting up your environment for wintest

To run wintest you need a Linux host that can control Windows VMs. Any scriptable VM system that supports snapshots should work. There are two example config files for wintest, one of them is setup for using VirtualBox, while the other is setup for using virsh to control KVM]. If you build a config for a different VM system, please contribute an example config file.

The current test script can use and test the following VMs:

  • Windows7
  • WindowsXP
  • Windows2003
  • Windows2008
  • Windows2008R2

You don't need to setup all of these VMs to run the test. The script will look for what VMs you have defined in your config file and will only run tests against those VMs.

Setting up a VM

Each of the VMs needs to be setup with the following properties:

  • the telnet server needs to be enabled
  • for VMs that will join Samba as a workstation, netdom.exe needs to be installed
  • for VMs that are DCs, dcdiag.exe needs to be installed
  • the machine needs to have a snapshot with it fully booted

It is also a good idea to do the following:

  • ensure that in the snapshot the machine is activated, and windows update is disabled
  • it is a good idea to disable the firewall, although the script will try to do that if telnet is working

Make sure you test that telnet into the machine works. You may need to add "Authenticated Users" to the TelnetClients group.