- Programming language supported by
test complete
- Jscript, vbscript, c#, c++,delphi,python
- Recording mode in Test complete
- Simple
recording – shift+F1
- Low level
recording – shift +F4
- Stop
recording – shift+F11
- Capture object in test complete
- Object spy
- Recording
- Find
method-
- Find
- Findchild
- FindAllchildren
- Findall
- Checkpoints in Test complete
- File
- Web service
- Database
table
- Property
- Object
- Run, pause and stop the
test run
- Run – F5
- Pause – Shift+F10
- Resume – shift +F3
- Stop – shift +F2 (in scripts - using
the Runner.Stop or Runner.Halt method)
- Debugging in Test complete
- Using debugging we can evaluate variable values, define
debug points and go through steps
- Running test through
debugging- we can run to the cursor, stepping through test and set next
execution step too
- Breakpoints- using breakpoint we can create and modify the
properties of variables
- Debug panel- call stack panel, local panel and watch list
panel
- Export Test result format
for testcomplete (Log.SaveResultsAs is use to store the result
from script and Use the /exportLog command-line argument:)
- Junit report
- Mht
- Html
- Pdf
- Xml
- tclogx
Environment
variables
If
you have a system variable and a user variable with the same name:
· To
get the user variable, use aqEnvironment.GetEnvironmentVariable.
· To
get the system variable, use WMI.GetEnvironmentVariable.
Regular
Expression
- Native Regular expression
(built into scripting
language)
- Example in vbscript
Dim re, matches, match
Set re = New RegExp
re.Pattern = "gr[ae]y"
re.IgnoreCase = True
re.Global = True ' Find all occurrences of the pattern
Set matches = re.Execute("Do you spell it gray or grey?")
For Each match In Matches
Log.Message(match.Value)
Next
Set re = New RegExp
re.Pattern = "gr[ae]y"
re.IgnoreCase = True
re.Global = True ' Find all occurrences of the pattern
Set matches = re.Execute("Do you spell it gray or grey?")
For Each match In Matches
Log.Message(match.Value)
Next
- Non native regular
expression (own regular expressions) syntax: obj.Find("WndCaption", "regexp:pattern"); example: notepad.Find("WndCaption", "regexp:.*
Notepad", 5);
NameMapping: NameMapping is one
of the important features of TestComplete through
which we could provide a Custom Name for any selected object. The unique name
is created by using some special values
If
your computer resolution will be change, your same script will be run or it
will get fail
There are two possibilities -Yes! Our script gets fail in case
if we implement Record and Playback methodology. Yes! Our Script will be run
successfully If we Implement Name mapping or Descriptive programming
methodology
If any unexpected windows pop up during your script in TestComplete, how can you handle that- Use OnUnexpectedWindow Event
to handle unexpected windows
distributed testing and how it can be achieved using TestComplete Distributed testing means that a test consists of several
parts and each of them is performed on a separate computer. TestComplete uses Network suite plugin to achieve
distributed testing.
Launch desktop application- dbgservice plugin should install
- Using dbgservice.launchapplication(pathof application)
- Using dbservice.launchtestedapplication(pathof application)
- Using Testedapplication.launch=true, testedapplication.run()
Log
operations
Log.message Log.Message(MessageText, AdditionalInformation, Priority, Attr, Picture, FolderID)
Log.error (Log.Error(MessageText, AdditionalInformation, Priority, Attr, Picture, FolderID)
Log.picture
Log.Event Log.Event(MessageText, AdditionalInformation, Priority, Attr, Picture, FolderID)
Log.warning (Log.Warning(MessageText, AdditionalInformation, Priority, Attr, Picture, FolderID)
String
functions
- aqString.Compare(String1, String2, CaseSensitive)
– compare two string casesensitive(true,false) and return 0 if match
else 1 or -1.
- aqString.Concat(String1, String2)
– concate two string
- aqString.Find(InputString, SubString, StartPosition, CaseSensitive)- to
find the first occurrence of a substring in the input string
- aqString.GetChar(InputString, Position) to
get the character located at the specified position within a string
(ex. Aqstring.getchar(“abc”,2) return b)
- aqString.SubString(InputString, StartPosition, Length) to
obtain a text fragment starting from the specified position and having the
specified length. Ex. aqString.SubString(“123456789”, 3, 5) returns
45678
- aqString.Replace(InputString, StringToReplace, SubString, CaseSensitive)
- aqString.ToLower(InputString)
- aqString.ToUpper(InputString)
- aqString.Trim(InputString, Space)
- aqString.GetLength(InputString)
-returns the total number of characters in the input string