Preparing PowerShell Test Packages

To use the PowerShell framework:

  1. Provide test content to QDC.

    • Include your test content in a zip file and upload it to QDC during job creation.
    • QDC will download and extract the zip content to C:\Temp\TestContent.
  2. Start the test by executing a command from PowerShell.

    • Provide the syntax of the command to be run (for example, C:\temp\TestContent\PowerShellTestExample\ScriptToRun.ps1 –test -params).
    • The command will be run after test content is extracted
    • The command does not necessarily have to be a PowerShell script, it could be an executable
    • If the command reports an error ExitCode (non-zero), QDC will terminate the job and report an error
    • If the command ends without an error, QDC will allow the job to continue. This allows commands to restart the device or do other operations in the background.
  3. Notify QDC that the test is complete, and optionally communicate results.

    • When the test is complete, notify QDC by creating a file at C:\Temp\QDCTestDone.txt
  4. Collect and upload logs to QDC after test is complete.

    • Any logs or test artifacts you wish to access can be put in C:\Temp\QDC_Logs\
    • These will be available in the QDC portal after the job completes, along with a recording of the screen