You are on page 1of 9

TestComplete, Interview Question ans Answer

Que 1 - What is TestComplete ?


Ans TestComplete is a Software automation tool, Developed by Smart bear, we can
Automate the software testing process using it. TestComplete supports various types of
automation testing like unit testing, Smoke testing, Regression testing, Functional,
Distributed testing and load testing.
Que 2- what is Latest Version of TestComplete?
Ans Most Recent Version of TestComplete is (TestComplete 9.3), at the end of Dec 2013
Smartbear going to launch TestCompete 10 for Mobile app Testing.
Que 3 - Which Technology is supported by TestComplete
Ans TestComplete Supports Wide range of Application and Technologies like Windows,
.NET, WPF, Visual C++ Visual Basic, Java Web Applications, and Web Services.
Que 4- Which Scripting language that can be used in TestCompete ?
Ans -Test Complete Supports VBScript, Jscript, C# Script, c++, Delphi.
Que 5- What is the purpose of TestedApp in TestComplete?
Ans - In TestedApp, we can list out the number of Applications, We can add multiple Tested
Application and there attributes like Command line arguments, number of instance and so
on.
Que 6- How can we call any application that has been added to TestedApps in your scripts?
Ans - Using the TestedApps object we can call our application. To get a TestedApp object as
an item of from the list, use the TestedApps.Items property (if no. of Apps is added in list)
Que 7- Is it possible to perform record and play mechanism in TestComplete ?
Ans Yes, TestComplete Supports Record and Payback mechanism there are two
mechanisms in TestComplete Recording.
1 - Record - Starts test recording or resumes recording after pause. Default, SHIFT-F1.
2 - Low Level- Record - Starts recording a new low-level procedure based on screen
coordinates. Default, SHIFT-F4
Que 8- Cross Browser Testing is possible for using TestComplete? If yes then how is it?
Ans Yes, We can do the Cross Browser testing in TestComplete. TestComplete 9.x is
specially developed for cross browser testing. (Before cross browser testing we need to do
some browser level setting .
Que 9- Which Browsers supported by TestComplete till date?
Ans - TestComplete supports the number of browsers.
1) Internet Explorer, 2) Mozilla Firefox, 3) Google Chrome, 4) Safari, 5) Opera Browser
Que 10- Different ways of capturing objects in TestComplete.
Ans There are three different way for capturing the Object in TestComplete1 - Recording
2 - Object Spy
3 - Find, FindAll, FindChild, FindAllChildren
Que 11- What is the difference between Find and FindAll Method in TestComlete ?
Ans Find -Find Method is used to search desire object from the object hierarchy, (only
single object). Find Method searches the Object on the basis of Specified value of the
Specified property.

1 /9

FindAll FindAll method is used to search desire object from the object hierarchy. FindAll
Method searches the entire object that have Specified value of the Specified properties.
FindAll methods are stored entire object list into an Array.
Que 12- What is the difference between Find and FindAll Method in TestComlete?
Ans - FindChild Find Child method is also same as FIND method (as mention above) it will
search only Child object.
FindAllChildren Find All Children method is same as FINDALL method (as mention above),
it will be search all the children and store them into an Array.
Que 13- What is Child Method?
Ans - Objects may have the children, Page is the children of Process, Process is the children
of Sys object etc...
{Sys.Process (iexplorer, 1).page (google.com)}
Que 14- Can we get, how much Number of Childs having an Object?
Ans Yes, We can get the number of child of the Object by using ChildCount Property of the
object
Ex- count = Object.ChildCount
Que 15- How descriptive programming can be done in TestComplete?
Ans Using Find, FindAll, FindChild, FindAllChildren method we can do the descriptive
programming in TestComplete.
Que 16- What is mean open application and how you will come to it is open or not?
Ans An application which is expose their internal Object Properties and methods to
TestComplete are called Open Application for TC.
(Application which is provide the information on how to get access to internal objects that is
call Open Application)
Que 17- How many check points you know in TestComplete
Ans TestComplete has the number of Check points like
1- Create File Checkpoint
2- Create Object Checkpoint
3- Create Property Checkpoint
4- Create Web Service Checkpoint
5- Create Database table checkpoint and so on.
Que 18- What is NameMapping in TestComplete?
Ans NameMapping in most important feature in TestComplete, using Name Mapping, we
can provide the Custom Name of the object. Normally when we get the Object in
TestComplete its shows like belowSys.Process (Iexplorer, 1).page (www.google.com).form (google).Panel
(Container).Table (lnkDatails).cells (1, 1)
Its very difficult and hard to remember and manage; hence we can provide the custom
name for each item using some unique values like
Sys.IE.PageName.Form.linkDetails.linkName
Que 19- What is a shortcut key to stop recoding?
Ans Using SHIFT-F11 we can stop the recording
Que 20- What is Data Driven Testing in TestComplete?

2 /9

Ans Run our Test with different set of input data to ensure the application works as
expected for various input values. This testing approach is called data-driven testing. We can
preformed data driven testing using CSV file, Text File, Excel and Database Table.
Que 21- How to handle exception in TestComplete ?
Ans Using On Error Resume Next statement we can handle the exception it TestComplete.
On Error Resume Next Statement skip the Exception window and go for the next operation.
Que 22- How to recognize Objects in TestComplete ?
Ans - There are different way to recognize the Object in TestComplete Like 1- Recording
2- Object Spy
3- Find, FindAll, FindChild, FindAllChildren
Que 23 What Happen? If your computer resolution will be change, your same script will be
run or it will get fail?
Ans There are two possibilities 1- Yes! Our script gets fail in case if we implement Record and Playback methodology.
2- Yes! Our Script will be run successfully If we Implement Name mapping or Descriptive
programming methodology.
Que 24 How to recognize similar object in your application?
Ans We can use object ID for each or we can assigned a unique identity for similar object
by using Name Mapping Concept.
Que 25 How to Test your application on different Node or on different workstation?
Ans We can run our same script on different Node /different workstation by implementing
the concept of Network Suite (But in this case entire client machine should be a part of
Network)
Que 26 Which Framework you are using for automation in TestComplete ?
Ans We are using customize framework for automation. It is a combination of Keyword
driven and Data Driven framework.
Que 27 Is it possible to compared strings in TestComplete ?
Ans Yes we can do it by using aqString object like below aqString.Compare(String1, String2, Case Sensitive)
Que 28 what is USEUNIT in TestComplete ?
Ans - To call routines, variables or constants declared from one unit to another unit, we use
USEUNIT statement in TestComplete.
Que 29 What are the challenges you are facing in TestComplete ?
Ans There are few challenges we are face in TestComplete
1 - Cross Browser Testing - for a cross browser testing we need to do browser level
setting, if we try run our script on client machine then we need to check all browser setting.
2 - Working with Window Popup while you are trying to Upload or download file from
the application some time it may get fail.
3 - Working With Dynamic Object handling such a object which is change every time or
occurred suddenly.
4 - Page Loading - Unable to predict page load time
5 - Technical Support There is no more support/Help available for TestComplete.

3 /9

Que 30 Tell me about this yourself?


Ans Explain your profile details..

------------------------------What is TestComplete?

TestComplete is an automation tool which is developed by SmartBear Software. Using


TestComplete, testers will create software quality tests. Using this tool, we can record the
scripts, we can write the scripts manually and we can manually write with keyword operation.
This tool can be used for various applications including Web, Desktop.
Name Mapping:
Though the object name format used in TestComplete lets you uniquely identify an object in the
system, it has at least two inconveniences:
1. The object name depends on object properties that are not persistent. For instance,
window and control identification attributes (class name and caption) can change from
one application build to another. To run your tests successfully, you may need to replace
the old object names with new ones in the entire project before running the tests.
2. Quite often, the object names are long and unreadable.
To solve these problems, TestComplete offers the Name Mapping project item. Using this item
you can assign custom names to objects
We can map the objects in two ways
Map Object from Screen ( ) Point to Fix
Object Spy (glyph icon( )) Drag the Target to the point
Map Object from Screen:
The procedure is as follows:
1. Click Point and fix. When you do that, the TestComplete window gets minimized down
so you can view the entire desktop.
2. Move the mouse pointer to the window or object you want to select. As you move the
mouse pointer over objects, a red selection frame appears around the object under it.
Tip: You can interact with applications during the process, for example:
Click or right-click objects to bring up popup menus
Move and rearrange windows to activate the desired window and make it fully visible
minimize, maximize and restore windows
And so on
Once the desired object is highlighted with the red selection frame, press Ctrl+Shift+A. (The
shortcut can be customized in the Global Shortcuts dialog.)
Object Spy:
The procedure is as follows:1. Click the target glyph () and keep the mouse button pressed. When
you do this, the

4 /9

mouse pointer turns into and the TestComplete window gets minimized down so you can
view the entire desktop.
2. Drag the glyph onto the window or object that you want to select. As you move the glyph
over objects, a red selection frame will appear around the object under the glyph.
3. Release the mouse button once the desired object is highlighted with the red selection
frame.
4. TestComplete will capture the specified object and display its information.
Note: Applications can contain objects that are displayed only after you perform a specific action
in the application (for example, a right-click or mouse hovering). You cannot select such objects
using the target glyph because the glyph does not allow interacting with applications during the
object selection process
USEUNIT method in TestComplete:
By default, a script can call routines declared within the same unit. To call routines in another
unit, the current one must be linked to it using the keyword USEUNIT
In VBScript projects place the cursor at the beginning of the unit and add the following string:
VBScript
'USEUNIT Unit_Name
Be sure you specify the apostrophe () before USEUNIT Keyword.
To link to several units, use the following syntax:
VBScript
'USEUNIT Unit1_Name
'USEUNIT Unit2_Name
Descriptive programming can be done in TestComplete:
Creating a test without using the object repository is known as descriptive programming since
you describe the objects as part of the script.
1st Step: Click on Map Object icon -> Drag the Target Point to the Object -> Save a whole Page
Object in Name Mapping.
Ex: Map Name: pageGmailLogin
After Saving the Page Object then Name Mapping shows Tree Model. like--> sysIEXPLOREpageGmailLoginSub
GmailLogin()
Set iexplore = Aliases.IEXPLORE
Set Page = iexplore.pageGmailLogin
Page.Wait
' Enter User Name
NameProperty = Array("ObjectType", "ObjectIdentifier")
ValueProperty = Array("Textbox", "Email")

5 /9

UserName = Page.FindAllChildren(NameProperty, ValueProperty, 7)


UserName (0).SetText ("prakash")
End Sub
'For Finding Objects, we need to click on object spy, and pass the Unique Name Properties and
Value Properties
'7 = Depth of the User Name
Object Identification in TestComplete Descriptive Way:
The Object Identification in TestComplete is based on the properties and values of the object
stored in Name Mapping. Sometimes, the properties and the value of the application objects get
changed at run-time, which results in failure of the object identification by TestComplete. To
overcome this problem, we use descriptive approach for the identification of the object on
Application Under Test (AUT).
TestComplete provides several methods for the same. Some of them are :
Find
FindAll
FindChild
Find
Find method is used to search the object in the desired hierarchy. Searching is based on the set of
values of the specified properties.
Syntax
TestObj.Find (PropName, PropValues, Depth, Refresh)
Where
TestObj: Refers to a reference (object) from where the search for the desired object will begin
PropName: Set of unique properties of object for identification.
PropValue: Set of values of the properties used for object identification.
Depth: Refers to the level till what the TestComplete needs to drill down to find the object.Refresh: It
instructs TestComplete what to do if the object we are searching is not present in the
TestComplete Object cache. This is an optional field.
Output: Object
For example we need to perform click operation on a web button whose text changes at run
time.
Approach:
First we need to identify some properties which will uniquely identify the object on webpage.
Here we chooses the class and text property of the button. After the identification of the
properties we need to store all the properties and relevant values in two separate array.
VarA=array ("Class, Text")
Varb=array ("WebButton, Click Here")

6 /9

Once we have defined the array, next we need to find the object for which we are searching
Set obj=testObj.Find(VarA,VarB,10)
In this statement testObj refers to the reference node from where the search will began and
search for the object that has the properties that of properties stored in VarA and values equal to
values stored in VarB. And 10 tell the TestComplete to search for the object till the 10th level of
the reference node and not more than that and store the result in an object.
To determine whether the search was successful or not, we can use Exists method on obj object.
If the Exists method return false, it implies that search was unsuccessful else if it returns true,
search was successful and we can perform the click operation
If obj.Exists then
obj.click
else
msgbox "No object found"
End if
FindAll
FindAll method is used to search the object in the desired hierarchy i.e. in both objects and child
objects. Searching is based on the set of values of the specified properties. The output is in the
form of the set of collection of the object which matches the criteria.
Syntax
TestObj.FindAll(PropName,PropValues,Depth,Refresh)
Where
TestObj: Refers to an reference (object) from where the search for the desired object will begin
PropName: Set of unique properties of object for identification.PropValue: Set of values of the
properties used for object identification.
Depth: Refers to the level till what the TestComplete needs to drill down to find the object.
Refresh: It instructs TestComplete what to do if the object we are searching is not present in the
TestComplete Object cache. This is an optional field.
Output: An array consisting of all the objects of specified values of specified properties.
For example we need to count the number of buttons on a page.
Approach:
First we need to identify some properties which will uniquely identify the object on webpage.
Here we choose the class property of the button. After the identification of the properties we
need to store all the properties and relevant values in two separate arrays.
VarA=array ("Class")
Varb=array ("WebButton")
Once we have defined the array, next we need to find the object for which we are searching
NoOfTextbox=testObj.FindAll (VarA, VarB, 10)

7 /9

In this statement testObj refers to the reference node from where the search will began and
search for the object that has the properties that of properties stored in VarA and values equal to
values stored in VarB. And 10 tell the TestComplete to search for the object till the 10th level of
the reference node and not more than that. And store the result in an array.
Once we get an array we can tell the no of button on the webpage as following:
msgbox ubound(NoOfTextbox)
FindChild
FindChild method is used to search the object in the desired hierarchy i.e., in the child object only.
Searching is based on the set of values of the specified properties.
Syntax
TestObj.FindChild(PropName,PropValues,Depth,Refresh)
Where
TestObj:Refers to an reference (object) from where the search for the desired object will begin
PropName: Set of unique properties of object for identification.
PropValue: Set of values of the properties used for object identification.
Depth: Refers to the level till what the TestComplete needs to drill down to find the object.
Refresh: It instructs TestComplete what to do if the object we are searching is not present in the
TestComplete Object cache. This is an optional field.Output: Object
For example we need to perform click operation on a web button containing text as Login on a
webpage
Approach:
As we know the web button is a child element of the page. So we can use FindChild method here.
For that firstly, we need to identify some properties which will uniquely identify the object on
webpage. Here we chooses the class and text property of the button. After the identification of
the properties we need to store all the properties and relevant values in two separate array.
VarA=array ("Class","Text")
Varb=array ("WebButton","Login")
Once we have defined the array, next we need to find the object for which we are searching
Set obj=testObj.Find(VarA,VarB,10)
In this statement testObj refers to the reference node from where the search will began and
search for the object that has the properties that of properties stored in VarA and values equal to
values stored in VarB. And 10 tell the TestComplete to search for the object till the 10th level of
the reference node and not more than that and store the result in an object.
To determine whether the search was successful or not ,we can use Exists method on obj object
.If the Exists method return false, it implies that search was unsuccessful else if it returns True,
search was successful and we can perform the click operation
If obj.Exists then

8 /9

obj.click
else
msgbox "No object found"
End if
So, these are the some other ways by which we can identify the dynamic objects in
TestComplete.
Scripting languages used in TestComplete:
VB Script, JScript, Delphi Script, C++Script, C# Script.
TestedApps in TestComplete:
TestedApps holds a list of TestedApp objects, each of which corresponds to a tested application.
The TestedApps object is available only if your project contains the Tested Applications project
item
We will use the TestedApps by calling as shown in below

9 /9

You might also like