User`s guide
Using the Test Suite Functions and Properties
8-17
This example shows the basic workflow of creating and running a test using some of the
functions outlined in the previous section.
Get installed hardware information recognizable using the winvideo adaptor.
info = imaqhwinfo('winvideo');
Identify the Device IDs.
info.DeviceIDs
Get information about available formats for the camera under test identified in the last
step. If it is the first camera, use DeviceId of 1.
info.DeviceInfo(1).SupportedFormats
Choose a format, for example MJPG_800x600, and create the test object, with an
estimated frame rate of 15.
testObj = imaqkit.AdaptorTest.createTest('winvideo', 1, 'MJPG_800x600', 15);
By default, tests create verbose logs. To run tests with concise logs set the ConciseLog
property to true and then run tests.
testObj.ConciseLog = true;
To run individual tests, call specific test functions, such as:
testObj.runObjectCreationAndPreviewTest;
testObj.runInteractiveDevicePropertiesTest;
Run all automated tests.
testObj.runAllAutomatedTests;