Steve Trefethen RSS
Contact me Send mail to the author(s)
About Me
My Blog
View my LinkedIn profile
Main Page
All Pages
Advanced Search »


Wiki Stats

TestComplete Excercises

Modified: 2008/07/24 17:49 by steve - Categorized as: Testing
Edit

TestComplete Training Information

Purchase TestComplete from Falafel at a 10% discount.

Microsoft Script Debugger - required for debugging support in TestComplete.

Edit

Sample Web App & Web Service

ASP.NET TestComplete Sample Web App
ASP.NET Test Web service
ASP.NET sample website and web service

Edit

Building TestComplete Sample Applications

If you want to work with the Sample applications included with TestComplete you can build the .NET versions from the command line without having VS.NET installed as long as you have the .NET framework installed.

To build the C# versions of the samples:

  1. Change to the direction of the sample you wish to compile
  2. Execute the following command %SystemRoot%\Microsoft.NET\Framework\v2.0.50272\msbuild.exe

Edit

Other Resources

Microsoft Word Object Model Overview

ftp.automatedqa.com
   Username: traininguser
   Password: training
www.automatedqa.com
www.qaforums.com
www.stickyminds.com
Setting up a continuous integration environment
Continuous Integration with Subversion and CruiseControl.NET
Automated testing of ASP.NET web applications using Selenium
Firefox Addins
Syntax Highlighter

Edit

Tools

Process Explorer
Araxis Merge
MSSQL Management Studio Express

Edit

Working with the Log and Sys Objects

  1. Create a New Project
  2. Add a function to the script which outputs to the log information about the machine that the test is executing on. (Examples/ideas)

Edit

Working with Stores and comparing data against the store

  1. Create a new project
  2. Add the Stores Item to the project
  3. Validate an onscreen object's data against data from the store

Edit

Create name mappings and use the name mappings in script

  1. Create a new project
  2. Add the Name Mapping Item to your project
  3. Create a Name mapping to an object on screen (use Map Object from Screen toolbar button)
  4. Using script create a function to write the objects name to the log using Log.Message

Edit

Working with Web Services

  1. Add the Web Services Item to your project
  2. Using the following WSDL as your web service: WSDL
  3. Create a checkpoint against a web services method to validate the result

Edit

Create Manual Tests

  1. Create a new project
  2. Add the Manual Test item to the project
  3. Create new manual test for Windows Notepad
Edit

Debugging

  1. Create a new Project
  2. Record a test script against Windows Notepad
- Start Notepad
- Type some text
- Change the Font
  1. End the recording and switch to the code editor
  2. Find the new recorded function
  3. Set a breakpoint on the first line of the function
  4. Right click the function and select Run current Routine
  5. When the breakpoint is hit click the watch window and add a watch for one of the variables from the function
  6. If the function's Value is [Object] use the Object Browser to locate that object and find a property you can evaluate
  7. Then change the watch to view the value of that property

Edit

Using the Code Editor/Code Explorer

  1. Create a new project
  2. Record a test against Windows Notepad
  3. Add a new script to the project
  4. Using the code explorer move the recorded test to the new script file

Edit

Handling unexpected Windows

  1. Create a new project
  2. Add notepad to the list of Tested Apps

Edit

Copying a manual test (from AutomatedQA)

  1. Create a copy of the folder that stores the manual test files (for example, copy the contents of the "<ProjectFolder>\ManualTests\ManualTest1" folder to the "<ProjectFolder>\ManualTests\ManualTest2" folder).
  2. Rename the copy of the manual test file (it has the .tcMT extension). In other words, you need to rename the "ManualTest1.tcMT" file located in the "ManualTest2" folder to "ManualTest2.tcMT".
  3. Change the project item name in the copy of the manual test file. To do this, you need to find the following line in the "ManualTest2.tcMT" file and specify the "value" attribute as "ManualTest2":

<Prp name="node name" type="S" value="ManualTest1"/>
  1. Add the copy of the manual test to your project as an existing item.

Edit

Using passwords with TestComplete (from AutomatedQA)

It's best not to have automated tests access sensitive systems.

The second best method is to have external security for the test workstations and not try to make the tests themselves secure.

After that, you get into compromises.

A pretty good method is to require the password to be entered manually when the test is run.

When the test starts, pop up a dialog and prompt the tester to manually enter the password. (See help topic "Entering Passwords") Store it in a global variable that doesn't persist when the test isn't executing. Use it while the test is running. Lose it when it's finished. The password is only in memory and is gone from the system when the test run is completed.

That could be inconvenient if there are many passwords or the tests are being re-started often.

You could store the passwords on a secure SQL DB or network file share and have the tester user account authenticate/login when they begin working so the test scripts have access to the securely stored passwords while the user is logged in to the other system.

A less secure method is to use a master password to encrypt the passwords used in the test and store those passwords in an unprotected file on the hard drive. The tester would enter the master password at the start of each test run and the test script would have to decrypt the passwords.









Copyright © 2006-2009 Steve Trefethen. Some rights reserved.
Except where otherwise noted, content on this work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.
Powered by: ScrewTurn Wiki version 2.0.36