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:
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.