SmarteSoft Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

SmarteSoft Forums is now live!

Author Topic: Calling a script within a script (modular testing) with the Execute command  (Read 737 times)

SmarteSupport

  • Administrator
  • Jr. Member
  • *****
  • Posts: 171
Calling a script within a script (modular testing) with the Execute command

Purpose:
Creating a Master script to run specific Child scripts. The child scripts are small scripts designed to execute each module of the Application Under Test.

Benefits:
Variables can be passed from script to script. If modules scripts are planned correctly, the user can test each module with different combinations.

Things to know before running this example:
1)When extracting to the folder the scripts must reside in the C: drive with exact following paths:

C:\ScriptWithinScript\ChildScripts\Client Server 01 Login\
C:\ScriptWithinScript\MasterScript\MasterScript.ses

2)SmarteScript 5.5 or higher is installed.
Logged

SmarteSupport

  • Administrator
  • Jr. Member
  • *****
  • Posts: 171
The above example is for the execute command.

As requested please see the attached script which will pass a variable from the child script to the master script.

Extract the contents into your C:\ drive so the path will be:

C:\PassVariable\MainScript\MainScript.ses

Run the MainScript.
In order to pass a variable, that variable should be defined on both scripts.
The Child script will grab the Caption with the use of the Info command and place the string into the variable named textVar.

You can check the variable after the script is executed by clicking on Arguments List tab on the bottom of the screen.

« Last Edit: July 12, 2010, 01:43:32 PM by SmarteSupport »
Logged