Getting Started
IntroductionGetting startedOverviewRunning TestoTests running policyTesto for Hyper-V Guides
Guide 1. The very first testGuide 2. Ubuntu Server InstallationGuide 3. Internet access in virtual machinesTesto for QEMU Guides
Guide 1. The very first testGuide 2. Ubuntu Server InstallationGuide 3. Guest AdditionsGuide 4. ParamsGuide 5. CachingGuide 6. Internet access in virtual machinesGuide 7. Linking up virtual machinesGuide 8. Flash DrivesGuide 9. MacrosGuide 10. If clauseGuide 11. No snapshotsGuide 12. Mouse controlGuide 13. Importing disk imagesGuide 14. JS-selectorsGuide 15. CyclesGuide 16. Macros with declarationsReference
Test scripts general overviewTesto lang basic syntaxVirtual Machine declarationVirtual flash drive declarationVirtual network declarationParamsTests declarationMacrosVirtual Machines ActionsMouse actionsDetecting images on the screenVirtual Flash Drives ActionsConditionsCyclesPossible keyboard key IDsJavascript selectors
Main conceptsBuilt-in global functionsExceptionsClass TextTensorClass ImgTensorClass PointVirtual Flash Drives Actions
Action with virtual flash drives are not available for Hyper-V
copyto
Copies a file or a directory from the Host to a virtual flash drive.
copyto <from> <to> [timeout timeout_time_spec]
Arguments:
from
- Type: string. Path to the file or directory on the Host. The path must exist.to
- Type: string. Full destination path on the virtual flash drive.nocheck
- Type: identifier with fixed value. The presence of this specifier disables the semantic checking of the file existence on the host. This way you can run tests withcopyto
actions even if thefrom
file doesn't exist on the host at the moment of running. It is assumed that the file will be there at the actual moment ofcopyto
execution.timeout_time_spec
- Type: time interval or string. Timeout for the copying to complete. Default value:10m
. If the string type is used, the value inside the string must be convertible to a time interval. Inside the string param referencing is available. Default value may be changed with theTESTO_COPY_DEFAULT_TIMEOUT
param. See here for more information.
You must specify the full destination path in the
to
argument. For example, if you need to copy the file/home/user/some_file.txt
into the virtual machine with the final destination/path/on/vm/some_file.txt
, you should callcopyto
like this:copyto /home/user/some_file.txt /path/on/vm/some_file.txt
. Copying directories falls under the same rules.
Copying links is not allowed.
The flash drive must not be plugged in any virtual machine when calling this action.
You should remember that with the
nocheck
specifier thefrom
files' integrity is not included in the test cache. Which means that changing thefrom
files won't lead to the test cache invalidation.
copyfrom
Copies a file or a directory from a virtual flash drive to the Host.
copyfrom <from> <to> [timeout timeout_time_spec]
Arguments:
from
- Type: string. Path to the file or directory on the virtual flash drive. The path must exist.to
- Type: string. Full destination path on the Host.timeout_time_spec
- Type: time interval or string. Timeout for copying to complete. Default value:10m
. If the string type is used, the value inside the string must be convertible to a time interval. Inside the string param referencing is available. Default value may be changed with theTESTO_COPY_DEFAULT_TIMEOUT
param. See here for more information.
You must specify the full destination path in the
to
argument (seecopyto
action notes).
Copying links is not allowed.
The flash drive must not be plugged in any virtual machine when calling this action.
abort
Abort the current test running with an error message. The test is considered failed.
abort <error_message>
Arguments:
error_message
- Type: string. Abort (error) message.
Prints a message to the Testo stdout.
print <message>
Arguments:
message
- Type: string. Message to print.
Macro call
Call the macro_name
macro. The macro must be declared before the calling. The macro must consist of actions applicable to flash drives.
Macro calls are described here