Tuesday, 7 January 2014

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 TestComplete-
1 - 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.

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 FindChild and FindAllChildren 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 below-

Sys.Process (Iexplorer, 1).page (“www.google.com”).form (‘’google”).Panel (“Container”).Table (“lnkDatails”).cells (1, 1)……

It’s 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?
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.

Que 30 – Tell me about this yourself?
Ans – Explain your profile details..
                                                                                                                                                                                                                                                                                                                                           

                                                                                                                                                                                         

Wednesday, 25 December 2013

TestComplete, Step by Step tutorial

Dear All,

In this blog I am trying to give you step by step tutorial for Automation using TestComplete. I am covering below items in this blog -
1- Adding New Project
2- Adding New Unit
3- Scripting
4- Run and Result

Before Going to add New Project in TestComplete, You Need to Launch TestComplete First -
* Go To Start → All Program Automated QA TestComplete  or Double click on TestComplete Shortcut. When You launch TestComplete below page will display. This page is called Start page for TestComplete.


On a Start page you will get the details about your Recent Projects, You can Open Your Existing Projects, You can Create/Add  new Project too.

1- Adding New Project :→ Before start Automation in TestComplete you need to create a project in it. Follow the instruction to create a new Project in TC - 

* File → New →New Project 


When you click on "New Project", Create New Project dialog box will display, here you need to Specify, Your Project Name and Location where you want to store your project
 


 Project Name Text Box Enter Your Project Name.
Location →  Browse your Folder/Location where you want to store your script. 

Once you Specify Project Name and Location, You Need to Click on "Next" Button, on Click of Next Button Tested Application Type dialog box will display.
In Tested Application type dialog box, You can Select your application type - 
1- Web Application
2- Window Application
3- Java
4- Adobe AIR etc..





























(Here I am going to Test Web based Application, hence I have select "Web")

Select Your application type and Click on "Next" Button. on Click of Next Button - Web Application Setting dialog box will display, In this dialog box you can select -


1- Functional Testing of Web Page
2- Load Testing of Web Server
3- Web Service Testing

(Here I am going to Test Functionality of Web Page Hence I have Selected   Functional Testing of Web Page)

Select your Setting and Click on Next Button, on Click of Next Button - Tested Web Pages dialog box will display. This dialog box is optional you can click on Next  Button without adding any details


If you want to add your Tested Web Pages, You Need to Click on Add Button, When  you Click on Add Button below dialog box will display.

In this dialog box you need to specify - Name, Browser and URL of your page and Click on Next Button, Once you click on Next Button - Test Visualizer Setting pop-up will appear


 Test Visualizer is most important feature in TestComplete, It will captures all your details into a Pictorial format, so it will be help you to understand your script. You may checked Test Visualizer Setting or unchecked and click on Next Button, If you unchecked Test Visualizer Setting It won't be capture image of your script.
 Once you Click on Next Button  - Scripting Language dialog box will display, here you can select any scripting language from below - 


1- VBScript
2- Jscript
3- DelphiScript
4- ConnectedApp Script (under ConnectedApp Scripting language we can select C# or C++)

 Select Your Scripting language and Click on Finish button or Double click on your Scripting language. When you click on Finish Button, your project has been created Successfully and It will be show you Project workspace/Explorer screen -







In Project workspace/Explorer you can prepared your script using either recording or any of the scripting language like -

1- VBScript
2- Jscript
3- DelphiScript
4- ConnectedApp Script (under ConnectedApp Scripting language we can select C# or C++).

2- Adding New Unit :Before going to to automate your project you need to Add Scripting unit in your project. Follow the instruction to add script unit in your project -
 
* Go on Project Workspace/Explorer → Select Your Project Name → Double Click on Advance → Right click on “Script” → Add → Click on New Item


On click of New ItemItem Type dialog box will appear, here you need to specify your script name and location, where you want to store your script




Name Text Box -  BrowserLaunching   (My Script name)
Location - D:\Demo\Demo\Script\     (Location where I want to store my Script)


Now Click on OK Button , when you click on OK button your Script unit has been added Successfully.



 here you can write your script by using your selected scripting language as above.


3- Scripting :here I am going to demonstrate writing a script which is writing in VBScript, In this script I am going to create a Sub Routine named as Browser here I have Created a Object IE for Internet Explorer and made it visible, once browser is launched successfully it will be navigate on Google web page

Sub Browser 
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate"http://google.com"
Delay(1000)
End Sub 

4 - Run Script - Once your script has been completed you need to  run it. There are different ways to run your script-
1- Select Your Script Right Click on it Click on Run Current Routine 

2-  Go on Project Explorer Select your script Right Click on it Run (your Script) Routine

3 - Select Run Option in your Tool bar. 

Once your execution is done it will show you the result like below 


Thanks All, This may help you to start automation testing in TestComplete.