VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/docs/VBoxAudioValidationKitReadMe.txt@ 92474

Last change on this file since 92474 was 92474, checked in by vboxsync, 3 years ago

Audio/Validation Kit: Added initial documentation which now lives under "ValidationKit/docs". bugref:10008

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.4 KB
Line 
1Audio Testing via Validation Kit
2================================
3
4
5Overview / Goal
6---------------
7
8The goal was to create a testing framework which utilizes the
9VirtualBox Validation Kit to test the VirtualBox audio stack.
10
11That framework must be runnable on all host/guest combinations together with all
12audio drivers ("backends") and device emulations being offered. This makes it a
13rather big testing matrix which therefore has to be processed in an automated
14fashion.
15
16Additionally it should be flexible enough to add more (custom) tests lateron.
17
18
19Current status / limitations
20----------------------------
21
22- The following test types are currently implemented:
23 * Test tone (sine wave) playback from the guest
24 * Test tone (sine wave) recording by the guest (injected from the host)
25- Only the HDA device emulation has been verified so far.
26- Only the ALSA audio stack on Debian 10 has been verified so far.
27 Note: This is different from PulseAudio using the ALSA plugin!
28
29
30Operation
31---------
32
33The framework consists of several components which try to make use as much of
34the existing audio stack code as possible. This allows the following
35operation modes:
36
37- Standalone: Playing back / recording audio data (test tones / .WAV files) in a
38 standalone scenario, i.e. no VirtualBox / VMs required). This mode is using
39 the audio (mixing) stack and available backend drivers without the need of
40 VirtualBox being installed.
41
42- Manual: Performing single / multiple tests manually on a local machine.
43 Requires a running and set up test VM.
44
45- Automated: Performs single / multiple tests via the Validation Kit audio test
46 driver and can be triggered via the Validation Kit Test Manager. The test
47 driver can be found at [1].
48
49- (Re-)validation of previously ran tests: This takes two test sets and runs
50 the validation / analysis on them. See VKAT's "verify" sub command for more.
51
52- Self testing mode: Performs standalone self tests to verify / debug the
53 involved components. See VKAT's "selftest" sub command for more.
54
55
56[1] src/VBox/ValidationKit/tests/audio/tdAudioTest.py
57
58
59Components and Terminology
60--------------------------
61
62The following components are in charge for performing the audio tests
63(depends on the operation mode, see above):
64
65- VKAT ("Validation Kit Audio Test", also known as VBoxAudioTest):
66 A binary which can perform the standalone audio tests mentioned above, as well
67 as acting as the guest and host service(s) when performing manual or automated
68 tests. It also includes the analysis / verification of audio test sets.
69 VKAT also is included in host installations and Guest Additions since
70 VirtualBox 7.0 to give customers and end users the opportunity to test and
71 verify the audio stack.
72
73 Additional features include:
74 * Automatic probing of audio backends ("--probe-backends")
75 * Manual playback of test tones ("play -t")
76 * Manual playback of .WAV files ("play <WAV-File>")
77 * Manual recording to .WAV files ("recording <WAV-File>")
78 * Manual device enumeration (sub command "enum")
79 * Manual (re-)verification of test sets (sub command "verify")
80 * Self-contained self tests (sub command "selftest")
81
82 See the syntax help ("--help") for more.
83
84- ATS ("Audio Testing Service"): Component which is being used by VKAT and the
85 Validation Kit audio driver (backend) to communicate across guest and host
86 boundaries. Currently using a TCP/IP transport layer. Also works with VMs
87 which are configured with NAT networking ("reverse connection").
88
89- Validation Kit audio test driver (tdAudioTest.py): Used for integrating and
90 invoking VKAT for manual and automated tests via the Validation Kit framework
91 (Test Manager). Optional.
92
93- Validation Kit audio driver (backend): A dedicated audio backend which
94 communicates with VKAT running on the same host to perform the actual audio
95 tests on a VirtualBox installation. This makes it possible to test the full
96 audio stack on a running VM without any additional / external tools.
97
98 On guest playback, data will be recorded, on guest recording, data will be
99 injected from the host into the audio stack.
100
101- Test sets contain
102 - a test manifest with all information required (vkat_manifest.ini)
103 - the generated / captured audio data (as raw PCM)
104
105 and are either packed as .tar.gz archives or consist of a dedicated directory
106 per test set.
107
108 There always must be at least two test sets - one from the host side and one
109 from the guest side - to perform a verification.
110
111 Each test set contains a test tag so that matching test sets can be
112 identified.
113
114The above components are also included in VirtualBox release builds and can be
115optionally enabled (disabled by default).
116
117
118Workflow for a single test
119--------------------------
120
121When a single test is being executed on a running VM, the following (simplified)
122workflow applies:
123
124- VKAT on the host connects to VKAT running on the guest (via ATS, also can be a
125 remote machine in theory).
126- VKAT on the host connects to Validation Kit audio driver on the host
127 (via ATS, also can be a remote machine in theory).
128- For example, when doing playback tests, VKAT on the host ...
129 * ... tells the Validation Kit audio driver to start recording
130 guest playback.
131 * ... tells the VKAT on the guest to start playing back audio data.
132 * ... gathers all test data (generated from/by the guest and recorded from
133 the host) as separate test sets.
134 * ... starts verification / analysis of the test sets.
135
136
137Setup instructions
138------------------
139
140- VM needs to be configured to have audio emulation and audio testing enabled
141 (via extra-data, set "VBoxInternal2/Audio/Debug/Enabled" to "true").
142- Audio input / output for the VM needs to be enabled (depending on the test).
143- VKAT needs to be running on the guest and be able to connect to the host via
144 TCP/IP.
145
146 Note: Depending on the VM's networking configuration there might be further
147 steps necessary in order to be able to reach the host from the guest.
148 See the VirtualBox manual for more information.
149
150
151Performing a manual test
152------------------------
153
154- Follow "Setup instructions".
155- Start VKAT on the guest (in "guest mode", e.g. "test --mode guest").
156- Start VKAT on the host (in "host mode", e.g. "test --mode host") with
157 selected test(s).
158- By default the test verification will be done automatically after running the
159 tests.
160
161
162Performing manual verification
163------------------------------
164
165VKAT can manually be used with the "verify" sub command in order to (re-)verify
166previously generated test sets. It then will return different exit codes based
167on the verification result.
168
169
170Performing an automated test
171----------------------------
172
173- TxS (Test E[x]ecution Service) has to be up and running (part of the
174 Validation Kit) on the guest.
175- Invoke the tdAudioTest.py test driver, either manually or fully automated
176 via Test Manager.
177
178
179Troubleshooting
180---------------
181
182- Make sure that audio device emulation is enabled and can be used within the
183 guest. Also, audio input / output has to be enabled, depending on the tests.
184- Make sure that the guest's VKAT instance can reach the host via the selected
185 transport lay (TCP/IP by default).
186- Increase the hosts audio logging level
187 (via extra-data, set "VBoxInternal2/Audio/Debug/Level" to "5").
188- Increase VKAT's verbosity level (add "-v", can be specified multiple times).
189- Check if the the VBox release log contains any warnings / errors with the
190 "ValKit:" prefix.
191
192
193:Status: $Id: VBoxAudioValidationKitReadMe.txt 92474 2021-11-17 10:44:11Z vboxsync $
194:Copyright: Copyright (C) 2021 Oracle Corporation.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette