help or ? |
Provides the list of possible commands |
exit |
Closes the current TC-Shell session. This is only relevant for the interactive mode. If there are unsaved modifications, the user will be asked whether they should be saved or discarded. |
save |
Saves all previously conducted modifications. |
saveAndUnloadAll |
Saves all modifications that were made up to this time and releases used memory. |
adminModusOn |
Enables the administrator mode |
adminModusOff |
Disables the administrator mode |
|
Provides all known information on the current object (attributes and all objects in direct relation) |
set |
set <attributeName> = <Value> In the current object it sets the attribute with the specified value, as far as the attribute can be modified (i.e. if it is not a readonly attribute and is allowed to be modified). The symbol = as symbol of assignment is optional. |
get |
<attributeName> Returns the attribute value of the active object |
getAllOptions |
Displays all current values of all within the TC-Shell settable options (see chapter "Starting TC-Shell"). |
getBranches |
Prints all branches that are available within the common repository. |
getOption |
<optionName> Displays a value of a given option |
setOption |
<optionName> ["="] <optionValue>
Sets a given option to the stated value. This change applies only to the current session. The symbol = as symbol of assignment is optional. |
saveOptions |
Saves all option values for use beyond the current session |
setproperty |
SetProperty <PropertyName> ["="] <Value> Creates an individual customized property for the current object. If a property of the same name exists already, only the value is transferred. The symbol = as symbol of assignment is optional. |
settcparam |
settcparam <Name of test configuration param> = <Value> Creates a test configuration param for the current object with the specified value. The symbol = as symbol of assignment is optional. |
compactworkspace |
Deallocates unused storage in the local repository of a workspace and thus improves the performance. Considerable improvement in the performance can only be seen with extensive database files in a workspace. |
createdbbackup |
createdbbackup <backup directory> Creates a backup of the repository in the defined directory. In script mode, add yes or no after <backup directory> depending on whether you want to include versioning history in the backup. In interactive mode, decide whether to include versioning history in the backup in the subsequent dialog. |
Modify commands
The values of all object properties can be modified in the TC-Shell via modify commands (which are available in the context menu of Tosca Commander™). It is also possible to use regular expressions (UseRegularExpression).
|
|
Current object
In the TC-Shell there is always a current object. If either a workspace is opened or if an object is deleted, the project object will automatically be the current object.
The following commands are available in order to jump to other objects:
'JumpToProject' |
The project object becomes the new current object. |
'JumpToNode <NodePath>’ |
All objects have a NodePath, which contains the name including the hierarchical positions (can be seen in the Properties view in Tosca Commander™). If this command is specified along with the NodePath, the system jumps to a specific object. Example: > JumpToNode "/TestCaseFolder/SampleTestCases/ This selects a folder and converts it into the next current object. |
'JumpTo<uniqueQueryString>' |
<uniqueQueryString> is an arbitrary TQL query string which returns exactly one object. To search a TestCase of a specific name, starting from the project: "=>Items:TestCase[Name==\"TC1\"]" or to switch from a TestStepValue to the parent TestStep: "->Test Step" After entering this command the search result is the new current object. |
‘ChangeNode <NodePath>’ or ‘cn <NodePath>’ |
In contrast to JumpToNode this supports relative paths. Example: > cn "TestCases" > cn "Folder" Based on the project root element, the first cn command turns the "/TestCases" folder into the current object, and the second cn command the "/TestCases/Folder" folder. In addition you can use cn to access the superordinate object more quickly. > cn .. |
'Search <queryString> <resultNum>' |
This command is mainly intended for the interactive mode and enables to navigate via various search results even if several objects are returned as search results. <queryString> is a TQL query string <resultNum> is the index of the object in the result list to which the system should jump, or '0' if the current object should not be changed. |
Marked objects and drag & drop tasks
For certain operations (e.g. drop tasks) you can use any number of objects as arguments, e.g. to move a set of TestCases into another folder.
These actions and the creation of new TestSteps on the basis of Modules would usually be performed in Tosca Commander™ by using drag & drop.
To provide these options also in the TC-Shell, there are following commands available to mark and dropmark objects or for activating drop tasks:
'Mark' |
The current object is added to the list of the marked objects. |
'ClearMarked' |
The list of the marked objects is cleared (is empty afterwards). |
'DropMarked' |
The relevant drop task that arises from the context of the current object and all marked objects, is performed, and the list of the marked elements will be cleared. Example: Creation of TestSteps on the basis of three existing Modules: > JumpToNode "/ModuleFolder/T car tariff calculator" > Mark > JumpToNode "/ModuleFolder/T vehicle data" > Mark > JumpToNode "/ModuleFolder/T person data" > Mark > JumpToNode "/TestCaseFolder/Tutorial/Automated TestCases/MyTestCase" > DropMarked |
'DropMarkedWithCtrl' |
The action 'DropMarked' is performed with the Ctrl key pressed (copy==True). |
Executing tasks
Actions in Tosca Commander™ are called and performed depending on the environment you are working in. The available options are those, which are possible for the selected elements.
In the TC-Shell these context-based operations are called tasks. They can be performed with the command task.
Command |
Description |
task |
Provides a numbered list of all available actions. The names of the actions correspond to the context menu entries in Tosca Commander™. |
task <taskNum> |
This calls an action by using its number. Run the task command to view a list of valid numbers. |
task <taskName> |
This calls an action by using its name. Run the task command to view a list of valid names. Example: >task "Create TemplateInstance" |
According to their flow, tasks require additional entries from the user, e.g. file or directory paths, the entry of strings, the confirmation of actions, etc. The user has to provide all required information.
In the interactive mode the required information is written to the prompt (command line). In the script mode, the corresponding information must be indicated in the script file.
Example
Create a TemplateInstance to a TestCaseTemplate:
jumpToNode "/TestCaseFolder/SampleTestCases/Generated
TestCases/CheckCarInsur"
task "Create TemplateInstance"
// *** Input to "Create TemplateInstance"-Task
// DataSourcePath including Sheet =
"C:\\Projects\\ToscaTutorial\\BO_TC\\TC_catalog_web.xls\\TC_RS"
// Instantiation Selector =
"The first 10 hits"
// *** End of Input to "Create TemplateInstance" Task
Call other scripts
In the interactive mode and the script mode, script files can be accessed by using the Call command.
Iterations on objects
In order to perform operations on a large number of objects the following commands exist:
Multiuser mode
In multiuser environments objects must be checked out prior to modifying them. To do this, the task Check out can be activated at the particular object.
To check all modifications into the common repository, or to transfer the latest state from there into the local workspace, the following commands are available: