Ask a Question

New to Automation - The very basics

New Contributor

New to Automation - The very basics

Hi Guys,

Currently, I'm a strong manual tester who has been tasked with learning automation. The tool we chose was TestComplete.The thing I need help with is how do I get TestComplete to run a script I've written. It keeps saying there's no routine when I try and drag my script (unit1) to the 'Keyword Tests'.

I have tried using record and playback, and that seems to work fine - however I really want to create and run my own scripts from scratch. 

I have tried reading through the help files and tutorials but I cannot find the section on running custom script successfully. 

Could anyone help. Thanks.

Here's a very basic discription:

Keyword tests - tests that you create using the test recorder using onscreen elements

Scripts - tests written in a scripting language of your choice.

Projects suite - a collection of projects that contain keyword tests and or scripts

Projects - a group of keyword tests and or scripts that make up that project.

Your custom script test can be ran several different ways.

1) place the script as part of the project test items - this is one of the main tabs of the project.

2) open the script and select the run script (test)

Hope that helps.

Software tester for a Chiropractic software provider.

BSBA - Management Information Systems
Graduated from University of Lousiana at Lafayette
Frequent Contributor

Hi Kam

Firstly, welcome to the world of TestComplete.  Hopefully, like me, you'll find the user forum a useful resource!!

Based on what you have written, it sounds like you are trying to copy a script that has been written in a scripting linguage into what TestComplete calls Keyword Tests.

If I have understood you correctly, what you need to have done during the creation of your project is to decide on a scripting language, JScript, VBScript, DelphiScript, etc., you'll see the available list of options when you do this.  Thereafter, you should create your scripts in the 'Script' area of the project.

It also sounds like you may have written your script outside of TestComplete.  In that case, you'll need to import it, but that is something that I have no experience with myself.  I do all my script development within TestComplete's own IDE.

Hopefully, this will point you in the right general direction though!!


Community Hero

I recommend the videos!

[Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
New Contributor

Thanks guys, I figured it out. It looks like the IDE didn't recognise my function correctly.

I'm trying to include the namespace using System.Diagnostics; and it doesn't seem to like it.

l'm scripting in C#, also method like system.process need to be abbrievated sys.process, which I do not understand as to why this needs to be the case. 

Could someone clarify? 

Sorry, I know I'm hard work 😞
SmartBear Alumni (Retired)

Hi Kam,

It's not C#; it's C#Script, which is JScript with square bracket notation foo["bar"]["baz"] instead of dot notation C#Script has a very specific purpose of writing C#-compatible code for C# Connected Apps - apps that talk to TestComplete via COM. So, unless you plan to do Connected Apps, don't use C#Script (it's hard to read); use JScript instead.

If you want to write your tests using .NET features, you can use .NET classes via the dotNET object, and reference .NET assemblies by adding them to Tools | Current Project Properties | CLR Bridge. But almost always there're built-in TestComplete features and objects to do the job. For example, you can use TestedApps to run apps or aqFileSystem to work with files and folders.

Helen Kosova
SmartBear Documentation Team Lead
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Showing results for 
Search instead for 
Did you mean: