Skip to main content

Command Line Script Type Reference

AppvanceUse IQthis isarticle when a platformscenario thator supportsservice runningworkflow any Command-Line commands. Here are the steps that we need to followneeds to run the command line command from Appvance IQ.

    Running a Command-Line Functional Test

    Running a Command-Line Performance Test

    Command-Line Resource

    Running a Command-Line Functional Test

    Please follow the below steps.

      In AIQ navigate to Scenario Editor.

      Click File and select New to create a new scenario

      Select Functional Test in the Scenario Test Type dropdown.

      Click the Test Management tab and check: "Repeat scenario's test cases 1 time"

      Click the Test Cases tab and click Add Testcase to add an execution.

      Enter the Test Case Name and Script Name.

      Select Command Line from the Script Type dropdown

      Type the command that needs to be executed, Following are some of the commands that can be run, but anyapproved command-line commandscript can be used.

      For example

      • ls
      • mkdir "C:/Users/User1/FolderName"
      • ipconfig
      • ping http://www.google.com
      • taskkill /f /im firefox.exe
      • taskkill /f /im java.exe
      • dir
      • Tasklist
      • Powercfg

      Navigate to the Options tab and select the Scenario section.

      Make sure that Enable logging, and Always save logs (failures only) are selected.

      Click File > Save to save the new scenario.

      Click Play Scenario.

      The Controller window will opentype in a newcontrolled tab,AIQ execution environment.

      What changed in this article

      • Scoped command-line script execution as a controlled capability, not a generic shell-execution recommendation.
      • Added checks for script ownership, execution host, working directory, arguments, environment variables, timeout, exit code, stdout, stderr, and displayleast privilege.
      • Added warnings to avoid secrets in command arguments or output logs.

      Validation workflow

      1. Confirm the testscommand-line whilescript theyis areapproved running.and Thesafe pass / fail status offor the teststarget willexecution behost.
      2. Validate displayedpath, uponarguments, testpermissions, completion.timeout,

        Theexpected left part shows the stepsoutput, and thefailure duration in milliseconds and the right side shows the test run status under the Output tab.

      Navigate to the Test Case(s) Execution tab and click the test case result. Then click the Output tab below to see the output.

      On the Transactions tab, you can find the request/response. Click on the Error tab to drill down further into the results.

      Additional Example - ping command

      Additional Example - tracert command


      Running a Command-Line Performance Test

      Please follow the below steps:

        In AIQ navigate to Scenario Editor.

        Click File and select New to create a new scenario

        Select Performance Test in the Scenario Test Type dropdown.

        Click the Test Management tab.

        Enter an Iteration name and then select Executions Per User from the Completion Type dropdown.

        Click the Test Cases tab and click Add Testcase to add an execution.

        Enter the Test Case Name and the Script Name.

        Provide the command line command. Click Save.

        Enter 5 in the Users field and 5 in the Executions field.

        Navigate to the Options tab and select the Scenario section.

        Make sure that Enable logging, and Always save logs (failures only) are selected.

        Click File > Save to save the new scenario.

        Click Play Scenario.

        The Controller window will openbehavior in a newsmall tab,run.

        Review exit code, stdout, stderr, and displayAIQ logs before using the testsscript whilein theya areshared running.or Thescheduled passworkflow. /

        Review failnote: statusThis ofpage now aligns with the testsService willSuite becommand-execution displayed upon test completion.

        The left part shows the steps and the duration in milliseconds and the right side shows the test run status under the Output tab.

        Navigate to the Test Case(s) Execution tab and click the test case result. Then click the Output tab below to see the output.

        Command-Line Resource

        Command-Line Resource is another Script Type that requires the resource to be browsed.

        Files with .cmd, .sh extension can be used with this Script type just like designer scripts (.ds) etc. This file will be added as a resource file in the Resources Panel of the Scenario Builder.

        An example could be to open a swing or JavaFX applicationcleanup from aearlier shell or command script.batches.

          cd /opt/utp/MyScripts/SwingSet2

          sh Swing.sh


          Last updated: DecemberOctober 13,5, 20232026

          If you have any feedback on this topic, please contact us at documentation@appvance.ai.