0 Shares 1689 Views 6 Comments

TestComplete Command Line

Dec 31, 2012
1689 Views 6

Command Line Interfaces are often preferred by many users, as they provide a more concise and powerful means to control a system or application. Also the applications with command-line interfaces are often much easier to automate via scripting.

command-line copy

A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to a program in the form of successive lines of text (command lines).

Automating TestComplete becomes very easy via its Command-line interface. This is very simple and below are the ways to run it

file_name : Launches TestComplete and loads the specified project

/run (/r) – Commands TestComplete to execute tests provided by the project specified by the file_name argument.

/project (/p):project_name – Project_name is the name of the project. This will execute only those test items that are selected on the Test Items page. The unselected items are not run.

 

TestComplete will run test(s) provided by the specified project item. Project_name specifies the name of the project that holds the desired project item (use the same name as the name shown in the Project Explorer panel). Item_name is the name of the desired project item. only those project items that have the Run item in their context menu can be run in this case.

Note : Test items are those which are displayed on the Test Items page of the project editor. Project items are project elements that are shown in the Project Explorer panel.

 

TestComplete will run the specified test. This can be any element that TestComplete can execute: a keyword test, a script routine, a low-level procedure, a manual test, a network suite, and so on.

Test_name is the full name of the needed test. The full name of a test includes the test name, the name of the parent project item and, for scripts, the name of the unit, which are separated by the pipe character ( | ) and enclosed in quotation marks. For example, “KeywordTests|Test1”, “LLCollection1|LLP1” or “Script|Unit1|Main”.

 

TestComplete will run the specified script routine. Project_name specifies the name of the project to which the routine belongs. Unit_name specifies the name of the unit holding the desired routine. Routine_name is the name of the script routine to be called. The routine to be called must not use parameters or return any values. Project_name and unit_name should be the same as the project and unit names shown in the Project Explorer.

No /project, /unit or /routine arguments specified. TestComplete will run the tests provided by the opened project suite.

 

/exit ( /e) – TestComplete will close after the project (or project suite) run is over, should be used with /run argument.

This will execute all the projects that are enabled, waits until the execution is over and then TestComplete gets closed.

/SilentMode – If this argument is specified, TestComplete works in Silent mode, that is, it neither displays dialogs, nor informs you about errors or warnings.

/exportlog:File_name (or /el:File_name) – Exports the test run results to the .mht file specified by the File_name parameter.

/ForceConversion – If this argument is specified and TestComplete is running in Silent mode, TestComplete automatically converts projects created in earlier versions of the tool to the new format when they are opened.

/ns – Opens TestComplete without displaying the splash screen.

You may be interested

UFT Patch Updates – UFT 14.03
Unified Functional Testing
960 views1
Unified Functional Testing
960 views1

UFT Patch Updates – UFT 14.03

Saket - Mar 11, 2018

Post the launch of UFT 14.0, there are three patch updates has been released including a number of features and enhancement. Recently Micro Focus unveiled third patch…

Setting up Web Service Automation Project
Katalon Studio
1124 views
Katalon Studio
1124 views

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

Setting up Mobile Automation Project in MacOS
Katalon Studio
996 views1
Katalon Studio
996 views1

Setting up Mobile Automation Project in MacOS

Saket - Oct 09, 2017

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators. This tutorial explains how…

6 Comments

  1. can i pass complete project path here “TestComplete.exe file_name /run /project:project_name /projectitem:item_name” because by projects are stored in a seperate folder in the project suite

    Reply
    • You will need to read the files in the folder, check for the ‘pjs’ files and use any of the option above to execute in TestComplete. below is the code snippet you can use in VBS to read the files

      hope this is what you are looking for, if not please elaborate.

      Reply
  2. Pingback: Automation Object Model : TestComplete | Automated-360

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...