Skip to content

KVMAutotest GetStartedClient

adereis edited this page Jan 3, 2012 · 6 revisions

Getting started with the autotest client kvm test

Pre-requisites

  • A supported host platform: Debian, Ubuntu, Red Hat Enterprise Linux (RHEL) or Fedora.
  • At least 50GB free disk space available on /tmp (by default) prior to testing.
  • Installation media images (or network access) for guest OSes under test.
  • Root access for setup and running tests
  • Software packages
  • A copy of the autotest source

For the impatient

You'll run our get_started.py script. Please refer to the get started reference page.

As you can see, the test copied the sample config files (.cfg.sample) to actual config files (.cfg). If you want to check out all the dictionaries with test params generated (1 dict per test that will be actually executed), execute:

[lmr@freedom kvm]$ ../../common_lib/cartesian_config.py tests.cfg
dict    1:  smp2.Fedora.14.64.unattended_install.cdrom
dict    2:  smp2.Fedora.14.64.boot
dict    3:  smp2.Fedora.14.64.shutdown

If you want to check out the contents of the produced dicts, you can provide the flag -c:

[lmr@freedom kvm]$ ../../common_lib/cartesian_config.py -c tests.cfg
... lots of output ...

And watch all the dictionaries produced. Each dictionary is a set of parameters for one particular kvm test instance. Note that the parser can parse any config file that is valid and follows its syntax:

../../common_lib/cartesian_config.py --verbose /path/to/cfgfile

Running the test

The autotest client parses a control file and executes the tests and operations defined on a control file, so calling it is as easy as executing

/path/to/autotest /path/to/control_file

You might want to include the --verbose flag to print out more debug information about the test:

/path/to/autotest --verbose /path/to/control_file

The output of get_started.py will give you the full command for your convenience, with absolute paths. The control files present on each client test directory are usually sample control files, but for the KVM test we can use the shipped control file to perform testing, since most of the test data is located on the config files.

Checking the results

You will see a wealth of messages during your test execution. Don't worry with all of the output for now. When the kvm tests are being executed, the test harness will indicate so. If you want to perform further log checking, remember:

  • Test results are written to client/results/default*
  • A very nice HTML report is generated in client/results/default/job_report. You really might want to open it with your browser
  • You can parse the results and see a nice textual output from your current test execution by executing
[lmr@freedom kvm]$ ../../tools/scan_results.py
Test                                          Status     Seconds  Info
----                                          ------     -------  ----
        (Result file: ../../results/default/status)
smp2.Fedora.14.64.unattended_install.cdrom    GOOD       549      completed successfully
----                                          GOOD       569
  • The log files can be found usually at client/results/default/testname/debug, you will see one file for each debugging level, so jumping right to testname.DEBUG might be a good idea.

More about setup - windows testing

Windows testing needs an auxiliary CD (winutils.iso) in order to perform setup steps and assisting with some tests. The iso contains:

You can download winutils here:

http://people.redhat.com/mrodrigu/kvm/winutils.iso

Test structure

You are strongly advised to read our test structure documentation to learn more about kvm autotest, so it's easier to troubleshoot problems.

Clone this wiki locally