Here is a Comprehensive TestComplete Guide (Part-I):
As a part of our Software Testing Tools tutorial series, today we are covering a new GUI testing tool – TestComplete. This will be a comprehensive 3-part tutorial series.
Tutorials in this series:
- TestComplete tutorial 1: TestComplete Introduction
- TestComplete tutorial 2: How To Perform Data Driven Testing
- TestComplete tutorial 3: How to Automate Android Applications
Test Automation plays a vital role in the testing of any software. Some test cases are laborious, time-consuming and repetitive.
Automating such test cases can save a lot of time, which makes automation inevitable to the success of continuous delivery and testing models of software development.
Table of Contents:
- TestComplete Tutorial
- Introduction
- Why use this tool?
- Installation of TestComplete
- Creating your first project in TestComplete
- TestComplete’s User Interface
- Creating our first test on a Web Based Project
- Recording a Test for the Web Application
- Analyzing test results
- Creating Tests on Desktop Based Applications
- Recording test for Desktop based Application
- Analyzing recorded tests
- Conclusion
- Was this helpful?
- Recommended Reading
TestComplete Tutorial
Introduction
TestComplete, developed by SmartBear Software, offers support to a wide range of technologies such as .Net, Delphi, C++Builder, Java, Visual Basic, HTML5, Flash, Flex, Silverlight Desktop, The Web and Mobile systems.
TestComplete helps testers develop their test cases in various scripting languages like JavaScript, Python, VBScript, Delphi Script, JavaScript. It is available with two licenses and a free trial version valid for 30 days.
Why use this tool?
TestComplete offers a wide range of test automation capabilities. Some of them are listed below
- Keyword Testing: Using the built-in keyword driven test editor testers can develop Keyword driven frameworks with ease
- Scripted Testing: Testers can write test scripts from scratch or modify recorded ones in a built-in editor
- Test Record and Playback: Provides the basic mechanism of record and playback for test creation. The recorded test cases can be modified as needed
- Integration to Bug Tracking Software: Integrates with various bug tracking software such as Jira, Bugzilla, etc. It can be used to modify or create items in bug tracking software using issue tracking template
- Data Driven Testing: Easy data extraction from CSV files, database tables, Excel sheets, etc.
- Test Visualizer: Captures screenshots during test execution allowing us to differentiate between expected and actual screens.
Minimum System Requirements
Operating System: Microsoft Windows XP Professional 32/64 bit.
Processor: Intel Core 2 Duo 2 GHz or higher.
Ram: 2 GB of RAM on other operating systems.
Hard Disk: 1 GB of free disk space for installation.
Resolution: 1024 × 768 or higher display resolution.
Mouse or other pointing devices.
Installation of TestComplete
Download => TestComplete can be downloaded from the official SmartBear web site from here.
After downloading, follow the steps to install TestComplete
#1) Double-click on the downloaded TestComplete setup package. Installation of the software will start and license agreements will be displayed.
#2) Specify the path of the folder where you want to install the software.
#3) Now, a welcome dialog is displayed asking to activate a license, we can start by clicking a 30-day trial license.
#4) After this process restarts the computer, we are finished the process of installing TestComplete.
Creating your first project in TestComplete
Launch the application and you will see the start page.
Follow these steps to create a new project.
1) Go to the File menu.
2) Click on the New option from the menu.
3) Click on the New Project option.
(Note: Click on any image for an enlarged view)
4) Alternately, you can use the shortcut key (shift + ctrl + N) to create a new project.
5) A window will appear, give a name to the project.
6) Click on Finish.
7) Thus, we have created our first project in TestComplete.
TestComplete’s User Interface
TestComplete’s UI is well organized and divided into different sections.
- Project Explorer panel on the left side of the window, displays the project suites, projects, and their contents
- Workspace panel is where you can modify and create tests
- Test Visualizer panel (at the bottom) displays screenshots saved during test case execution
Creating our first test on a Web Based Project
Let us begin by creating our first web-based project in TestComplete.
#1) Select File | New | New Project as shown in the screenshot.
#2) Enter the name of the project; you can also alter the location if required.
#3) Click on Next button.
Note: Since TestComplete supports different platforms like web, desktop, mobile, etc., we must select the platform on which we are testing.
#4) Initially, we are testing a web-based application, hence select “Functional testing of web pages”, and click Next.
#5) Once we have selected our platform in the previous step, a project creation wizard will take us to the Test Visualizer page, where we can enable/disable the Test Visualizer functionality. Click on Next.
#6) Now we need to specify the scripting language for our project. After selecting the scripting language, click on Finish.
Thus, our project to test a web application is ready.
Recording a Test for the Web Application
We will start with recording our test in which we will open in Google search engine and search for a query.
Follow these steps to record the test:
#1) Click on Append to Test, as shown in the image below.
Note: TestComplete records user actions and typically mouse clicks, i.e. whenever the user clicks on any object, the ID and references get recorded.
#2) A recording panel as shown in the image will be displayed, indicating that the recording of the test has started. We are now all set to perform actions.
#3) Launch the browser, TestComplete identifies the browser with the special inbuilt test command.
#4) Navigate to this URL https://www.google.com
#5) Type any query in the Google search box, say software testing helps.
#6) Click on Stop button as shown in the image.
#7) Once we have clicked on the stop button, TestComplete will display the keyword editor where all our recorded keywords are displayed.
#8) To playback, our recorded test cases simply click on the Run Test button as shown in the image.
Analyzing test results
Let us analyze the test results.
Run a browser and launch the browser. It detects the launched browser by inbuilt test functions and performs the test during playback.
This command is used to wait for the page to load; here we have opened Google homepage, so that means test execution is paused until Google home page has loaded completely.
The following command is used to set text in the Google search bar, we have used software testing as our keyword, and hence the following text is displayed.
In the Test Visualizer, screenshots were captured during test execution to enable the tester to differentiate between actual and expected screen output.
A word of caution: Please note that up until now we have only recorded a few basic steps. Realtime, this is never a complete test. You will have to add/remove/customize steps to make the script perform the validation that you need it to do.
Creating Tests on Desktop Based Applications
TestComplete supports both Web as well as Desktop based Applications.
Let us begin by creating our project on Desktop Based Applications.
Note: Close all projects that are open in TestComplete. Click File | Close.
#1) Create a new project-> File | New | New Project opens a new project creation wizard.
#2) Specify the project name and location. Click Next.
Note: As we are running our test on a desktop application, choose Windows application on the wizard. This will take you to a page where we can specify the platform of the project. Select Generic Windows application and click Next.
Note: When we are automating desktop applications, we need to specify the application to test in TestComplete
#4) Click on Add button, and specify the path of the project in the window that opens.
For demo purposes, we are creating our test on notepad.exe.
#5) Specify the path for the notepad.exe file on your machine
Eg : “C:\Users\Admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Accessories\Notepad.lnk”.
#6) Click OK. Then, Next.
#7) Choose the settings as needed for the Test Visualizer. Click Next.
#8) Select the scripting language. Click Finish.
We have now created a project to record our test on a desktop application.
Recording test for Desktop based Application
Once we have recorded our test on a Web-based project, recording our test for Desktop based applications is simple.
#1) Click on Append to test.
#2) A new file on the notepad will open.
#3) Write any text of your choice. Say, “Software testing help.”
#4) Click on the stop button.
#5) Close the notepad file.
#6) For playback simply click on Run Test.
Analyzing recorded tests
Run Tested App is the command used to launch our application. Since we are performing our test on notepad.exe hence the name notepad is displayed in the Operation Column. TestComplete records the operation when the application is launched.
We have typed software testing help in the open window of the notepad, thus the Edit command is used to set text in the application.
Conclusion
In this article, we have a very basic Introduction to TestComplete.
We have learned how to create Web Based and Desktop Based projects. We have recorded tests on two different domains and have learned to analyze the results.
At this point, please feel free to install the trial and work alongside it. Try creating a project and record some tests. Get comfortable understanding the steps and functions that the tool translates your actions into. This series is about to get serious- be prepared!
Part II – The second part of this tutorial is on the “Data Driven Testing using TestComplete”.
About the author: This is a guest post by Vivek, a QA Automation Engineer.
Questions? – Request below. Comments? – Always welcome!
Thanks for the demo.
Can existing UFT test cases be leveraged by using Test Complete without making changes in the existing scripts?
Can existing UFT test cases be re-used via Testing Complete?
if we use VMs, Is ALM completable with Test Complete?
I would like to know about the utility of remoteexecute.exe. Need help on this. Can someone direct me to a technical group to get help on this? Thank you.
How to integrate testcomplete with testrails?
how to integrate testcomplete with testrails using python?
Hi,
Very good explanation. I’d like to hear about Test automation with scripting languages like JavaScript or VBscripting. And running Selenium Automated tests as well.
Hey,
Wow…Very Very Very Nice Article and also thanks for sharing this tool information.
Thanks for all the informative posts. Its been very helpful. I have a specific question on Test scenarios .
1) What would be the best way to test a large number of requirements in the least number of test scenarios possible?.. This is related to Banking domain.
(This one is a urgent question , will appreciate your response on this.)
Thank You !
It totally depends on how you write your test case. You could write a single test case in a way that verifies all the requirements.
Very good tools for tester, do you have any embedded firmware test automation tools ?