Fast Start TestComplete – Module 1: Getting Started

July 16, 2017

If you’re looking to learn TestComplete fast then this is the place to start. We’ve pulled together 12 fast start training modules teaching you all you need to know when you start out with TestComplete. Everything you need to become productive in the shortest time possible. Each module comprises of one short video along with a list of key learning point and concepts.

All this designed to get you productive with TestComplete in the shortest time possible. The quicker you become familiar with TestComplete the quicker you’ll be writing and running effective automated tests.

Over the course of 12 modules we’ll cover the following topics:

Each module is designed to take no more than 30 minutes to complete. In fact I’ve specifically kept every video to about 10 minutes. There’s a lot packed into each video though. The key learning points accompanying the video will take no longer than 10 minutes to scan. You might have to watch each video a couple of times but, spend just 30 minutes each day for two weeks and you’ll have mastered the basics of TestComplete.

Module 1 – Getting Started and Key Components

In this module we’ll look at the core components in TestComplete and get you familiar with the IDE (Integrated Development Environment). Whilst we’ll look in more detail at the concepts of Project Suites and Projects in the next module we’ll need to get started by creating our first Project Suite and Project. Watch the video and we’ll walk you through this:

 
Remember that you’ll start out by creating a project suite to hold your projects. Each project suite then contains one or more projects. Each project is a container for all the artifacts you need for a specific chunk of automation.

Once you’ve created your first Project Suite and Project (we’ll walk your through this process in the next module) you’ll see two main tabs; the Project Workspace and the Object Browser.

Project Workspace: is where you develop and work on all of your automated tests. It is split into two main areas:

  1. Project Explorer – where you can navigate all of the artifacts in your test projects
  2. Workspace – where you create and modify the artifacts in your test projects

Each time you double click on an item in the project explorer it opens a new tab in the workspace so that you can edit that item.

Object Browser: is where you inspect and investigate your system and the applications you’re testing. The object browser area is split into two main areas too:

  1. The list (or tree) of objects on your system
  2. The properties/methods view

The list/tree area shows all the objects on your system. Objects are either Processes, Applications or Browsers running on your system. Those objects are arranged in a hierarchy where the top parent object is your system (Sys). All other objects are child objects of the System object. For example your system (computer) might have a child object called ‘Process(“calcplus”)’ which is the CalcPlus application running under your System object. This CalcPlus process will then have it’s own child objects which could be ‘Windows’ that are displayed on your desktop.

When you select an Object in the left hand panel you will see the Properties and Methods for that specific object displayed in the right hand panel.

Properties can be considered as characteristics of the object. For example you ‘Sys’ object will have a property called ‘Hostname’. That property would have a value (e.g. The host name of your system).

Methods can be considered as actions that the object can carry out. For example if you have the CalcPlus application/object running on your system, this object could have the ‘close’ method. If this method is run then the object would be closed on your system.

 

If you’re still struggling with the concept of objects, properties and methods read the following analogy:

Objects and child objects: You can think of yourself and your body as an object. As an object you have lots of child objects. You have a head, you have arms, you have legs, etc. These child objects have their own child objects. For example an arm has child objects like shoulder joint, elbow joint, wrist joint, forearm, top arm and hand.

Properties: Each object will have a number of properties. You have a height property. That property could have a value (for example 1.6 meters). You body will have a list of properties and each of it’s child objects will have it’s own list of properties too. Take your ‘arm’ object. We’ve seen that the arm has a list of child objects. The arm itself could then have a property called ‘Number of child objects’. The value of this property is 6 (the six child objects for the arm being the shoulder joint, elbow joint, wrist joint, forearm, top arm and hand). Other properties for the arm could be things like colour, texture, etc. All of these properties could have values.

Methods: These are the actions that the object can carry out. Your overall body object might have methods, or actions, like Sleep, Run, Walk, etc. Each child object may have it’s own set of methods too. So your arm object may have methods like bend, twist, raise, lower, etc

These principals apply in exactly the same way to everything on your computer or laptop. The top level object can be considered your computer system. This system has child objects which might be processes (like the notepad process running on your system). The notepad process then has child objects which can be windows that are displayed on your desktop. If we take the notepad window this window will have properties; like height, width, colour, title, etc. This window will have methods too. These methods are likely to include actions like ‘minimise’ and ‘maximise’.

 
Project Suite and Project basics: When you start an automation project in TestComplete everything will be contained in a project suite. A project suite is just a container for one or more ‘Projects’. A project is a collection of items that you need to create in order to run your automated tests. A project will contain things like keyword tests, connections to databases, files containing test data, and much much more. Everything you need for a particular automation effort is contained in a ‘Project’. And a project is contained within a ‘Project Suite’. Thus you could have one Project Suite that contains a project for your automated system integration tests. And the suite could contain another project specifically for GUI tests.

Tests: in a project you can have two types of tests. Either Keyword tests or scripted tests.

  1. Keyword tests are graphical based tests that you build by pulling test items together. A test item might be an ‘on screen’ action like click a button
  2. Scripted tests are code that’s written (in a language like Python for example) to carry out test actions. For example you might write code like

We’ll look at scripted tests much later but for now this course focuses on Keyword tests.

NameMapping: The Namemap can be thought of as TestComplete’s list of objects that you want to interact with as part of your automation project. It lists the objects, their position in the object hierarchy and their identification properties. Much, much more to come on this later.

Stores: The Stores entity in your project is the repository that holds any other artifacts that you need to run your automated tests. For example you can add database connections here, you can add images for comparisons during test replays and files that you might want to compare too.

TestedApps: Here you can list the applications that you want TestComplete to focus on testing. Your system will be running lots of applications and processes but you only want to focus your automation efforts on one or a few specific applications. Listing those applications here helps TestComplete focus on what’s important and ignore everything else.

And that’s the basic TestComplete components. Become familiar with these and you’ll find creating your first few automated tests far easier and everything will fall into place far quicker.

In the next module we’ll walk your through creating your first Project and creating those first few automated tests.