Test Complete - Steps to get started

By Komal Joshi on May 4, 2011 Comments

This article will provide step-by-step guide to start test automation using test complete tool from Automated QA. You will find this article very useful if you are starting with Automated QA and need basic steps to get you started. These steps were provided with the assumption that Delphi will be used as a primary language for the automation.

Steps to get started – In order to get you started with TestComplete, let us take an example of testing TestingGeek itself.

  • Open the TestComplete application. Create a new Project say TestingGeekTesting.
  • You can create it as General Project, Object driven Testing project or Unit Testing. In the same window you can specify the language you will be using for automation and the location of your project. For this example, we are using Delphi. Select the default options for it and click on Finish.
  • You will have Delphi Project created in the project explorer. There will be a default script by the name of Unit1 created in the script section of the project, containing the Main routine. Like most of the languages, Main is the starting point for your automation.
  • Now you need to add the TestApps (Application that you need to test/launch) in the list of Tested Application, in our case it is the firefox browser. You can see the TestedApps icon in the left project explorer browser. Just R-click and add the Firefox exe.
  • At this point of time, you have option of either recording or writing scripts for the test cases you want to automate.

This code is written using combination of both. i.e starts with recording and changing it manually to make it robust and efficient.

procedure Main;
var process: olevariant;
w1 : olevariant;
AppWin : window;
begin
  try
  // Enter your code here.
   process :=TestedApps.Items[0].Run;
  //This code section will wait for this window to load before pressing
  AppWin :=process.WaitWindow('MozillaUIWindowClass', 'Google - Mozilla Firefox', 1,9000);
  AppWin.setfocus;
  //Pressing Control + t to open a new tab.
  Appwin.Keys('^t');
  AppWin.Keys('http://www.testinggeek.com[Enter]');
  AppWin.Close;
 except
 Log.Error('Exception', ExceptionMessage)
end;

System Message: WARNING/2 (<string>, line 33)

Explicit markup ends without a blank line; unexpected unindent.

end;

Now after running this code you can see the messages logged in the log window.

TestingGeek hopes that this information is sufficient enough to get you started with TestComplete. In the next article we will explore TestComplete IDE, Object inspector and the concept of stores.

blog comments powered by Disqus
Finished reading? Browse all posts »