0 Shares 640 Views

Create your first test with TestComplete

Mar 25, 2013
640 Views
Sample Recorded Script

 

There are two types of test in TestComplete.

Keyword Test :  This is a visually represented and documented test which provides a simple and easy way change and design the test. If you are not familiar with VBScript or other programming language then you can design your tests using Keywords.

Script Test : This direct scripting statements to achieve the tests. One should be familiar with VBScript or other programming language.

TestComplete provides commonly used code templates, which can be helpful while you script. Press Ctrl + J to open Code Template and select one which you need to use.

 

Code Template

Code Template

You can add, modify or delete these code templates as per your need. Go to Tools | Options

Panels | Code Editor | Code Templates

 

Option Dialogue for Code Template

Option Dialogue for Code Template

Create a Test Project

Menu Bar– File | New | New Project Suite

This will open new project suite dialog. Enter your Project Suite Name in the Name Field. If you wish to change the save location of your project suite change the Location Field.

Right Click the Project Suite in Project Explorer, Select Add | New Item

This will call Create Project dialogue box. Enter Project Name, Location and the scripting Language you are comfortable in.

 

Create Project

Create Project

You may choose the New Project wizard as well from the start Page to create a new project.

 TestedApps Project Item :  TestedApps includes a list of tested applications and their attributes (command-line parameters, the number of instances to run and so on). The TestedApps object holds one item from the list. It has methods and properties that can set application attributes, launch or close the application and so on.

to add a TestedApps object – right click on TestedApps project Item Add | New Item

Select the program start-up file to be tested to add.

Recording Test : If you are not comfortable to write operating software footsteps, you can create your test by recording the steps.

start recording – Menu bar – Test | Record | Record Keyword test   or    Test | Record | Record Script

or click the record button on tool bar

 

Start Recording

Start Recording

After start recording, record toolbar displays.

This toolbar includes some additional features, you can use the  recording script or stop recording, and insert comment.

 

Recording Toolbar

Recording Toolbar

perform your test steps and once done press stop recording.

Playback : to execute your test, press Run Test button or Run Script Routine button.

or you can add your items in Test Items pane and the select Items to Run and press Run Focussed Item Button.

 

Playback

Playback

Result Logs : To view the results of test execution, open Logs

Test Log

Test Log

Test Log contains following information

 Error: Error message

 Warning: Warning Information

 Message: Message information

 Event: Event Information

 Image: Image Information 

Double-click the Log Information can be targeted to generate the script parameter information statement.

 

Lets Understand Recorded Script

Here is a sample recorded script on Notepad.

Sample Recorded Script

Sample Recorded Script

TestedApps.**.Run is to start the application under test.

Aliases :  TestComplete provides Aliases for the object the establishment of a “Alias” Tree. The alias tree in the created Namemapping When created, the tree structure and Namemapping is same.

edit.click(20,13) – mouse click at particular location.

edit.Keys(“***”) – to set the text in the edit box.

 

Checkout the Video on creating first test with TestComplete

 

You may be interested

Setting up Web Service Automation Project
Katalon Studio
240 views
Katalon Studio
240 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
241 views1
Katalon Studio
241 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…

UFT Jenkins Integration
Unified Functional Testing
795 views
Unified Functional Testing
795 views

UFT Jenkins Integration

Saket - Oct 03, 2017

In our earlier post, we got to know the easy integration of UFT with GIT. This post focuses on integration of UFT and Jenkins. I have also…

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