Académique Documents
Professionnel Documents
Culture Documents
•´¯)
************************************************************************
************************************************************************
1. Types of TestCases
2. Types of Testing
3. Client/server testing challenges
4. Networking protocols used by SilkTest
5. Parallel processing statements and how they work
6. Core Data Types in Silk Test
************************************************************************
1. Types of testcases
• Level 1 tests, often called smoke tests or object tests, verify that an application’s
GUI objects function properly. For example, they verify that text fields can accept
keystrokes and check boxes can display a check mark.
• Level 2 tests verify an application feature. For example, they verify that an
application’s searching capability can correctly find different types of search
patterns.
You typically run Level 1 tests when you receive a new build of your application, and do
not run Level 2 tests until your Level 1 tests achieve a specific pass/fail ratio. The reason
for this is that unless your application’s graphical user interface works, you cannot
actually test the application itself.
************************************************************************
2. Types of Testing
Functional testing
Before you test the multi-user aspects of a client/server application, you should verify the
functional operation of a single instance of the application. This is the same kind of
testing that you would do for a non-distributed application.
Once you have written scripts to test all the operations of the application as it runs on one
platform, you can modify the scripts as needed for all other platforms on which the
(¯`•._.•[Jagan’s]•._.•´¯)
application runs. Testing multiple platforms thus becomes almost trivial. Moreover, many
of the tests you script for functional testing can become the basis of your other types of
testing. For example, you can easily modify the functional tests (or a subset of them) to
use in load testing.
Configuration testing
• Test the client application and the server application when they are running on the
same machine—if that is a valid operational mode for the application. This testing
must be repeated for each platform that can execute in that mode.
• Test with the client and server on separate machines. This testing should be
repeated for all different platform combinations of server and client
Concurrency testing
Test two clients using the same server. This is a variation of functional testing that
verifies that the server can properly handle simultaneous requests from two clients. The
simplest form of concurrency testing just verifies that two clients can make multiple non-
conflicting server requests during the same period of time. This is a very basic sanity test
for a client/server application.
To test for problems with concurrent access to the same database record, you need to
write specific scripts that synchronize two clients to make requests of the same records in
your server’s database(s) at the same time. Your goal is to encounter faulty read/write
locks, software deadlocks, or other concurrency problems.
Stress testing
Stress testing verifies that running a particular command or set of commands a large
number of times does not break the software. For example, stress testing discovers a
failure to release resources. This is no different than stress testing for a non-distributed
application, but as with functional testing, you need to discover whether the application
functions properly with a remote server under stress conditions. You can do this type of
stress testing with a single client.
You can create stress tests by repeating the same commands a large number of times.
Usually, the 4Test code looks like this:
for i = 1 to 50
DoSomeCommands ()
(¯`•._.•[Jagan’s]•._.•´¯)
For example, you can stress-test remote logins or you can stress-test all application
operations that allocate significant amounts of memory (to see if they release that
memory). One simple form of stress testing is to set up your functional tests to repeat
indefinitely and then run them night and day over a two- to four-day period.
Load testing
Load testing verifies that running a large number of concurrent clients does not break the
server or client software. For example, load testing discovers deadlocks and problems
with queues. SilkTest’s unique architecture provides built-in load testing. You can
implement your functional tests using multi-application techniques and then, after
completing functional testing on a single machine, you can run them on multiple targets.
Unlike simulated load testing tools, SilkTest allows you to create a real-life scenario that
can determine the actual impact of multi-machine operation on your application, the
server, the network, and all related elements.
2. Volume
Volume testing
Volume testing is placing a heavy load on the server, with a high volume of data
transfers, for 24 to 48 hours. One way to implement this is to use one set of clients
to generate large amounts of new data and another set to verify the data (and
delete data to keep the size of the database at an appropriate level). You would
need to synchronize the verification scripts to wait for the generation scripts. The
4Test script language makes this easy. You would not normally need a very large
testbed to drive this type of server load, but again, if you under-configure your
(¯`•._.•[Jagan’s]•._.•´¯)
server you will probably be able to exercise the sections of the software that
handle the outer limits of data capacity.
Performance testing
Increase the rate of server requests submitted until the trend is isolated and then project
the remainder. From the response times at different request rates, you can calculate the
expected performance for different numbers of users submitting requests at a normal rate.
The result of this method is frequently more accurate than simulation can provide,
because a simulation cannot produce the same complex interactions as these scenarios.
Although you probably cannot establish a 500-user testbed that runs a realistic workload
(which might average two server requests per client per hour), you can design an artificial
workload that submits sequential requests as fast as the response to the previous request
is received. If you cannot generate a sufficient load using SilkTest’s GUI-driving scripts,
use the Extension Kit (EK) to drive the application’s API directly. Using either method,
you can drive the server with different rates of received requests and chart the response
times for different numbers of representative users. You can then repeat the test with a
more (or less) powerful server. See the Extension Kit Guide for more information.
************************************************************************
SilkTest provides powerful support for testing client/server applications and/ or databases
in a networked environment. Testing multiple remote applications raises the level of
complexity of QA engineering above that required for stand-alone application testing.
Here are just a few of the testing methodology challenges raised by client/server testing:
• Closing down multiple failed applications and bringing them back to a particular
base state (recovery control).
• Testing the functioning of the server application when driven at peak request rates
and at maximum data rates (peak load and volume testing).
************************************************************************
SilkTest runs on many platforms, but only three different protocols are used. This means
that a SilkTest script on one platform can drive the Agent on a target platform, as long as
both the host and Agent platforms are running an appropriate protocol for the platform
and both are running the same protocol (regardless of the protocols used by the
applications under test). The table lists the protocols available for each platform.
Suppose you are running SilkTest under Windows 95 and testing an application that
requires TCP/IP communications in order to communicate with a server on a Sun Sparc
station. SilkTest’s Windows machine can run NetBIOS for the host and the application’s
Windows machine must then run NetBIOS for the Agent as well as TCP/IP for the
application under test. Running NetBIOS will have no impact on your TCP/ IP
connections but will allow SilkTest to communicate with the Agent. Alternatively, since
the application is already running TCP/IP, you can choose to use TCP/IP for SilkTest and
its Agents as well.
There is no limit on the protocol or API that an application under test may use. Just make
sure that the protocol required by SilkTest and the protocol required by your application
are running at the same time.
************************************************************************
You create and manage multiple threads using combinations of the 4Test statements
parallel, spawn, rendezvous, and critical
.
In 4Test, all running threads (those not blocked) have the same priority with respect to
one another. 4Test executes one instruction for a thread, then passes control to the next
thread. The first thread called is the first run, and so on.
All threads run to completion unless they are deadlocked. 4Test will detect a script
deadlock and raise an exception. Note that the 4Test exit statement terminates all threads
immediately when it is executed by one thread.
parallel statement
A parallel statement spawns a statement for each machine specified and blocks the
calling thread until the threads it spawns have all completed. It condenses the actions of
spawn and rendezvous and can make code more readable.
The parallel statement executes a single statement for each thread. Thus if you wish to
run complete tests in parallel threads, use the invocation of a test function (which may
execute many statements) with the parallel statement, or use a block of statements with
spawn and rendezvous.
To use the parallel statement, you have to specify the machines for which threads are to
be started. You can follow the parallel keyword with a list of statements, each of which
specifies a different Agent name. For example:
parallel
DoSomething ("Client1")
DoSomething ("Client2")
spawn statement
You can use spawn to start a single thread for one machine, and then use successive
spawn statements to start threads for other machines being tested. SilkTest scans for all
(¯`•._.•[Jagan’s]•._.•´¯)
spawn statements preceding a rendezvous statement and starts all the threads at the same
time. However, the typical use of spawn is in a loop, as follows:
The above example could achieve the same result when written as follows:
rendezvous statement
A rendezvous statement blocks execution of the calling thread until all threads that were
spawned by the calling thread have completed. When the last child thread exits, it
unblocks the parent thread. The rendezvous statement is unnecessary if it is the last
statement at the end of the testcase. If the calling thread has no child threads, rendezvous
does nothing.
critical statement
A critical statement guarantees that no other thread will execute until the specified
statement or indented block of code has executed and passed control to the next statement
at the level of the critical statement. Only one thread can have critical status at any time.
************************************************************************
Agent options control various aspects of agent operations. When you want to get or set
the value of an agent option, you use the appropriate constant from the AGENTOPTION
data type to identify the option. For example, the option value identified by
OPT_KEYBOARD_DELAY specifies the time the agent waits between each keystroke
submitted from a script. You can access the values of options by passing the constants
defined for this data type to the GetOption method and SetOption method of the
AgentClass class. For information about specific options, see Agent options.
OPT_MENU_INVOKE_POPUP
OPT_MENU_PICK_BEFORE_GET
OPT_MENU_PICK_WITH_KEYS
OPT_MOUSE_DELAY
OPT_POWER_BUILDER
OPT_RADIO_LIST
OPT_REL1_CLASS_LIBRARY
OPT_REQUIRE_ACTIVE
OPT_TEXT_NEW_LINE
OPT_TRANSLATE_TABLE
OPT_TRAP_FAULTS
OPT_TRAP_FAULTS_FLAGS
OPT_TRIM_ITEM_SPACE
OPT_VERIFY_ACTIVE
OPT_VERIFY_COORD
OPT_VERIFY_CTRLTYPE
OPT_VERIFY_ENABLED
OPT_VERIFY_EXPOSED
OPT_VERIFY_RESPONDING
OPT_VERIFY_UNIQUE
OPT_VISUAL_BASIC
OPT_WINDOW_MOVE_TOLERANCE
OPT_WINDOW_RETRY
OPT_WINDOW_SIZE_TOLERANCE
OPT_WINDOW_TIMEOUT
[ ] AS_SHOW_ALL_CLASSES
[ ] AS_SHOW_ALL_METHODS
A variable of type ANYTYPE stores data of any type, including user-defined types.
Note Be careful when you give a variable type ANYTYPE, because 4Test does not
perform compile-time type checking on it. However, type checking does occur at
runtime.
Syntax 1
Syntax 2
Syntax 3
Variable Description
dimension An INTEGER expression that specifies the size of the array. The
expression is evaluated at runtime.
data-type The data type you want the elements in the array to have.
(¯`•._.•[Jagan’s]•._.•´¯)
Often you need to group several pieces of data together. 4Test uses the ARRAY and
LIST compound data types to do this. Use the ARRAY data type to group together data
values, all of which must have the same type. Specify the type and number of elements
when you declare the array.
Arrays are made up of elements that are grouped in a hierarchy. Each level of the
hierarchy is called a dimension. Each dimension holds a fixed number of either elements
or sub-arrays. The leaf nodes of the hierarchy, which are in the last dimension specified,
contain elements; the other dimensions hold sub-arrays. Consider the following array
specification:
In this array there are two sub-arrays at level one, three sub-arrays at level two, and 4
elements in each of the level two sub-arrays. Since each of the level-one sub-arrays
contains three sub-arrays, and each of these six level-two sub-arrays contains four
elements, MyArray contains 24 elements.
Array size must be between 1 and 2147483647 (MAXINT).
To refer to an element in a one-dimensional array, use the array name and an expression
in square brackets that evaluates to the position of the element in the array.
To refer to an element in a multi-dimensional array, use the array name followed by two
or more expressions in brackets.
· The preceding expressions refer to the arrays and subarrays containing the
element.
Examples
Description
BROWSERLOCATION is the alias data type for the string or window that identifies a
browser page. 4Test defines this data type as follows:
Description
SilkTest supports different Web browsers and uses "browser specifiers" so that you can
explicitly specify a particular browser in a script. The following table lists the most
commonly used browser specifiers. Consult the release notes for information about
additional supported browsers.
For the full list of browser specifiers see the 4test.inc file in your
<SilkTestInstallDirectory> and search for the word "browsertype".
Notes
· You can use a browser specifier in a script or include file to indicate that a
particular line applies only to particular browsers.
You set the browser in the Runtime Options dialog or by calling the SetBrowserType or
SetDefaultBrowserType function, each of which takes an argument of type
BROWSERTYPE. If you don’
t set a browser type explicitly in a script, SilkTest will use the browser specified in the
Runtime Options dialog.
If you try to use a browser specifier instead of a GUI specifier to specify a window,
SilkTest will generate an error. The primary use of browser specifiers is to address
differences in window declarations between different browsers. Each Agent connection
maintains its own browser type, allowing different threads to interact with different
browsers.
Syntax
netscape4, explorer4
You can also specify all but one browser, such as the following, which indicates that
what follows applies to all browsers except Internet Explorer 3:
! explorer3
Example 1
In the following code fragment, netscape and explorer browser specifiers are used to
indicate that the tag for the BrowserAuthentication window differs in the two browsers.
Note that browser specifiers can be used in conjunction with GUI specifiers as well.
Example 2
main ()
LIST OF BROWSERTYPE lbtType
BROWSERTYPE btType
lbtType = {explorer4, netscape4}
for each btType in lbtType
GetItemCount (btType)
// Results:
// Testcase GetItemCount (explorer4) - Passed
(¯`•._.•[Jagan’s]•._.•´¯)
Note In the preceding testcase, you don’t have to call SetBrowserType to set the
browser type. That’s because if a BROWSERTYPE argument is passed to a testcase, the
recovery system automatically calls SetBrowserType with the argument.
One entry in a CALL_LIST datatype. 4Test defines this enumerated data type as follows:
The data type returned by the ExceptCalls function. 4Test defines this alias data type as
follows:
A data type that identifies the kind of cursor represented by an instance of the
CursorClass class. 4Test defines this alias data type as follows:
Description
(¯`•._.•[Jagan’s]•._.•´¯)
The legal values of the DATACLASS type are the names of all the 4Test classes,
including user-defined classes-for example, MainWin, ChildWin, and CursorClass.
Identifiers in window class declarations and the return value from the ClassOf function
are both of type DATACLASS.
Description
Describes the units for a byte-based size value, such as for disk free space or file size.
The unit specifier is an optional parameter for the SYS_GetFreeDiskSpace function and
SYS_GetDirContents functions. 4Test defines this enumerated data type as follows:
Description
The legal values of the DATATYPE type are the names of data types, for example
INTEGER and BOOLEAN. The return value from the TypeOf function is of type
DATATYPE.
Description
A variable of type DATETIME stores a date plus a time calculated to microseconds. The
DATETIME data type represents values from 4713 B.C.E. (B.C.) to 19999 C.E. (A.D.).
Notes
You can use relational operators between two variables of type DATETIME. You can
cast a variable of type DATETIME to or from a type DATE or a type TIME by means of
explicit type casting. You can implicitly cast a STRING as a DATETIME as described in
the table below.
(¯`•._.•[Jagan’s]•._.•´¯)
You can generate a DATETIME constant by specifying a date and time as a string and
then casting the string as a DATETIME data type. The string must have the following
format:
YYYY-MM-DD HH:MM:SS.MSMSMS.
Cast Rules
DATETIME to DATE The time information is lost. Use explicit type casting
([DATE])
DATETIME to TIME The date information is lost. Use explicit type casting
([TIME])
DATE to DATETIME The time is set to midnight. Use explicit type casting
([DATETIME])
TIME to DATETIME The date is set to the current date. Use explicit type casting
([DATETIME])
STRING to DATETIME The string must have the ISO format: YYYY-MM-DD
HH:MM:SS.MSMSMSYou can truncate the string at any
point, as long as the last field is complete. Use implicit type
casting (DATETIME)
Example
· The conversion, by explicit casting, of the DATETIME to a DATE (this drops the
time portion of the DATETIME).
· The explicit casting of the DATE value to a DATETIME (so that it can be
formatted) and the formatting of the DATETIME.
· Printing the formatted DATETIME. Note that the time value changes to midnight.
Rules govern the various ways in which you can convert dates and times using casting.
Description
[ ] // 4TEST
[]
[ ] E_ABORT = -10100
[ ] E_ACCESS = -10200
[ ] E_AGENT = -10300
[ ] E_ARRAY_SIZE = -10400
[ ] E_ASSERT_FAILED = -10500
[ ] E_ASSIGN = -10600
[ ] E_BAD_ARG = -10700
[ ] E_BAD_INDEX = -10800
[ ] E_BUSY = -10900
[ ] E_CLASS_MISMATCH = -11000
[ ] E_CONST = -11100
[ ] E_DATABASE = -11200
[ ] E_DEADLOCK = -11300
[ ] E_DISABLED = -11400
[ ] E_DIVIDE_BY_ZERO = -11500
[ ] E_FILE = -11600
[ ] E_HALT_THREAD = -11700
[ ] E_HANDLE = -11800
[ ] E_INCOMPAT_TYPES = -11900
[ ] E_INTERNAL = -12000
[ ] E_LIST_FULL = -12100
[ ] E_NO_LIST_OPEN = -12200
[ ] E_NO_RETVAL = -12300
[ ] E_NULL = -12400
[ ] E_NUM_ARGS = -12500
[ ] E_OUT_OF_MEMORY = -12600
[ ] E_SEMAPHORE = -12700
[ ] E_STR_OVERFLOW = -12800
[ ] E_SYNTAX = -12900
[ ] E_SYSTEM = -13000
[ ] E_TIMER = -13100
[ ] E_TYPE_MISMATCH = -13200
[ ] E_UNDEFINED = -13300
[ ] E_UNSUPPORTED = -13400
[ ] E_VAR_EXPECTED = -13500
[ ] E_VAR_NOT_SET = -13600
[ ] E_VERIFY = -13700
[ ] E_WINDOW_TAG = -13800
[ ] E_ZERO_STEP = -13900
[ ] E_PARENT_HALTED = -14000
[ ] E_SIBLING_HALTED = -14100
(¯`•._.•[Jagan’s]•._.•´¯)
[ ] E_AGENT_GUI_MISMATCH = -14200
[]
[ ] // 4TEST AGENT
[ ] E_APP_FAULT = -20000
[ ] E_APP_NOT_RESPONDING = -20100
[ ] E_APPID_INVALID = -20200
[ ] E_BITMAP_NOT_STABLE = -20300
[ ] E_BITMAP_REGION_INVALID = -20400
[ ] E_BITMAPS_ALMOST_MATCH = -20500
[ ] E_BITMAPS_DIFFERENT = -20600
[ ] E_BITMAPS_DIFF_COLORTABLE = -20700
[ ] E_BITMAPS_DIFF_DEPTH = -20800
[ ] E_BITMAPS_DIFF_EMPTY = -20900
[ ] E_BITMAPS_DIFF_HEIGHT = -21000
[ ] E_BITMAPS_DIFF_PLANES = -21100
[ ] E_BITMAPS_DIFF_SIZE = -21200
[ ] E_BITMAPS_DIFF_WIDTH = -21300
[ ] E_CANT_CAPTURE_BITMAP = -21400
[ ] E_CANT_CLEAR_SELECTION = -21500
[ ] E_CANT_CLOSE_WINDOW = -21600
[ ] E_CANT_CONVERT_RESOURCE = -21700
[ ] E_CANT_EXIT_APP = -21800
[ ] E_CANT_EXTEND_SELECTION = -21900
[ ] E_CANT_LOAD_DLL = -22000
[ ] E_CANT_MAXIMIZE_WINDOW = -22100
[ ] E_CANT_MINIMIZE_WINDOW = -22200
[ ] E_CANT_MOVE_WINDOW = -22300
[ ] E_CANT_RESTORE_WINDOW = -22400
[ ] E_CANT_SET_ACTIVE = -22500
[ ] E_CANT_SET_FOCUS = -22600
[ ] E_CANT_SIZE_WINDOW = -22700
[ ] E_CANT_START_APP = -22800
[ ] E_CANT_TRANSLATE_KEYS = -22900
[ ] E_CANT_TRANSLATE_TEXT = -23000
[ ] E_COL_COUNT_INVALID = -23100
[ ] E_COL_NUM_INVALID = -23200
[ ] E_COL_START_EXCEEDS_END = -23300
[ ] E_CONNECTION_REFUSED = -23400
[ ] E_CONTROL_NOT_RESPONDING = -23500
[ ] E_COORD_OFF_SCREEN = -23600
[ ] E_COORD_OUTSIDE_WINDOW = -23700
[ ] E_CURSOR_TIMEOUT = -23800
[ ] E_DELAY_INVALID = -23900
(¯`•._.•[Jagan’s]•._.•´¯)
[ ] E_FUNCTION_NOT_FOUND = -24000
[ ] E_FUNCTION_NOT_REGISTERED = -24100
[ ] E_GUIFUNC_ID_INVALID = -24200
[ ] E_ITEM_NOT_FOUND = -24300
[ ] E_ITEM_NOT_VISIBLE = -24400
[ ] E_ITEM_INDEX_INVALID = -24500
[ ] E_INVALID_REQUEST = -24600
[ ] E_KEY_COUNT_INVALID = -24700
[ ] E_KEY_NAME_INVALID = -24800
[ ] E_KEY_SYNTAX_ERROR = -24900
[ ] E_LINE_COUNT_INVALID = -25000
[ ] E_LINE_NUM_INVALID = -25100
[ ] E_LINE_START_EXCEEDS_END = -25200
[ ] E_MOUSE_BUTTON_INVALID = -25300
[ ] E_NO_ACTIVE_WINDOW = -25400
[ ] E_NO_DEFAULT_PUSHBUTTON = -25500
[ ] E_NO_FOCUS_WINDOW = -25600
[ ] E_OPTION_CLASSMAP_INVALID = -25700
[ ] E_OPTION_EVTSTR_LENGTH = -25800
[ ] E_OPTION_NAME_INVALID = -25900
[ ] E_OPTION_TOO_MANY_TAGS = -26000
[ ] E_OPTION_TYPE_MISMATCH = -26100
[ ] E_OPTION_VALUE_INVALID = -26200
[ ] E_POS_INVALID = -26300
[ ] E_POS_NOT_REACHABLE = -26400
[ ] E_PROPERTY_INDEX_INVALID = -26500
[ ] E_PROPERTY_IS_NULL = -26600
[ ] E_PROPERTY_NOT_FOUND = -26700
[ ] E_PROPERTY_READ_ONLY = -26800
[ ] E_PROPERTY_TYPE_MISMATCH = -26900
[ ] E_RESOURCE_NOT_FOUND = -27000
[ ] E_SBAR_HAS_NO_THUMB = -27100
[ ] E_TAG_SYNTAX_ERROR = -27200
[ ] E_TRAP_NOT_SET = -27300
[ ] E_WINDOW_INDEX_INVALID = -27400
[ ] E_WINDOW_NOT_ACTIVE = -27500
[ ] E_WINDOW_NOT_ENABLED = -27600
[ ] E_WINDOW_NOT_EXPOSED = -27700
[ ] E_WINDOW_NOT_FOUND = -27800
[ ] E_WINDOW_NOT_UNIQUE = -27900
[ ] E_WINDOW_SIZE_INVALID = -28000
[ ] E_WINDOW_TYPE_MISMATCH = -28100
[]
(¯`•._.•[Jagan’s]•._.•´¯)
[ ] E_COLUMN_INDEX_INVALID = -28200
[ ] E_COLUMN_NOT_FOUND = -28201
[ ] E_ITEM_CANT_COLLAPSE = -28300
[ ] E_ITEM_CANT_EXPAND = -28400
[ ] E_KEY_STRING_TOO_LONG = -28500
[]
[ ] /*** THESE ARE FOR HANDLING OLE2/VB CALLS ***/
[]
[ ] E_AXEXT_NOT_RESPONDING = -28600
[ ] E_OBJ_CALL_FAILED = -28700
[ ] E_OBJ_NOT_FOUND = -28800
[ ] E_ARG_TYPE_MISMATCH = -28900
[ ] E_BAD_ARG_COUNT = -29000
[ ] E_ARG_VAL_OUT_OF_RANGE = -29100
[ ] E_APP_NOT_READY = -29200
[ ] E_CANT_SCROLL_INTO_VIEW = -29300
[ ] E_ALREADY_DRAGGING = -29400
[ ] E_NOT_DRAGGING = -29500
[]
[ ] E_DLL_EXCEPTION = -29800
[]
[ ] E_ROW_INDEX_INVALID = -30000
[ ] E_TBL_HAS_NO_ROW_HDR = -30100
[ ] E_TBL_HAS_NO_COL_HDR = -30200
[ ] E_TBL_SINGLE_CELL_ONLY = -30300
[ ] E_UD_HAS_NO_RANGE = -30400
[ ] E_ROW_NOT_TOP = -30500
[ ] E_COLUMN_NOT_LEFT = -30600
[]
[ ] E_VO_COLUMN_INVALID = -50100
[ ] E_VO_COUNT_INVALID = -50200
[ ] E_VO_ITEM_INDEX_INVALID = -50300
[ ] E_VO_ITEM_NOT_FOUND = -50400
[ ] E_VO_LINE_INVALID = -50500
[ ] E_VO_PROPERTY_NOT_FOUND = -50600
[ ] E_VO_REGION_INVALID = -50700
[ ] E_VO_ROW_INVALID = -50800
[ ] E_VO_STATUS_NOT_FOUND = -50900
[ ] E_VO_TYPE_MISMATCH = -51000
Describes a particular file by providing its attributes. 4Test defines this record data type
as follows:
Where:
· dtLastModifyTime is of the datetime data type and specifies the date and time that
the file was last modified
· dtCreationTime is of the datetime data type and specifies the date and time that
the file was created
Attributes
The file attributes that you can determine with FILEINFO are:
FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_OFFLINE
FILE_ATTRIBUTE_COMPRESSED FILE_ATTRIBUTE_READONLY
FILE_ATTRIBUTE_DIRECTORY FILE_ATTRIBUTE_REPARSE_POINT
FILE_ATTRIBUTE_HIDDEN FILE_ATTRIBUTE_SPARSE_FILE
FILE_ATTRIBUTE_ENCRYPTED FILE_ATTRIBUTE_SYSTEM
FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_TEMPORARY
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
Note To determine a file attribute, you must use a binary AND comparison with the file
attribute. If the comparison returns that same file attribute, then the attribute exists.
A list containing instances of the FILEINFO data type. 4Test defines this alias data type
as follows:
(¯`•._.•[Jagan’s]•._.•´¯)
Describes the file mode for a file. The file mode is a required parameter for the FileOpen
function. 4Test defines this enumerated data type as follows:
FM_READ Opens the file for reading. SilkTest raises the exception E_FILE if
the file does not exist.
FM_WRITE Opens the file for writing. If the file does not exist, it is created. If
the file exists, it is truncated to zero (0) bytes.
FM_UPDATE Similar to FM_WRITE, except that it does not truncate the file. By
default, it denies write access to other users. The file pointer is
positioned at the beginning of the file.
FM_APPEND Opens the file for appending. If the file does not exist, it is created.
If the file exists, the file pointer is positioned at the last line of the
file. By default, it does not deny write access to other users.
FILEPOS data type
Describes how the FileSetPointer function should set the read/write position in an open
file. 4Test defines this enumerated data type as follows:
FS_EXCLUSIVE
NULL (default) Previous file-sharing behavior. For example, if the file was last
opened with a fsShare value of FS_DENY_WRITE, then the next file open will have this
value as well.
FS_DENY_NONE Others have read/write access.
FS_DENY_WRITE Others have read access.
FS_EXCLUSIVE Others have no access.
Describes the file type of a file. The file type is an optional parameter for the FileOpen
and IniFileOpen functions. It is available only with SilkTest International. 4Test defines
this enumerated data type as follows:
FONTSTYLE identifies the style of a font. 4Test defines this set data type as follows:
FS_BOLD
FS_ITALIC
FS_STRUCKOUT
FS_UNDERLINE
FUZZYVERIFY identifies the values that the optional argument to VerifyProperties can
have. It is used in fuzzy verification. 4Test defines this data type as follows:
[ ] GW_HWNDFIRST = 0
[ ] GW_HWNDLAST = 1
[ ] GW_HWNDNEXT = 2
[ ] GW_HWNDPREV = 3
[ ] GW_OWNER = 4
[ ] GW_CHILD = 5
Description
Certain functions, such as TimerCreate and FileOpen, create and return values of type
HANDLE. You can only store or reassign these return values; you cannot directly create
values of type HANDLE. A handle is an identification code provided for certain types of
object so that you can pass it to a function that needs to know which object to manipulate.
For example,
The handle that identifies a database. 4Test defines this alias data type as follows:
type HDATABASE is HANDLE
The handle for a driver. A driver handle provides you with a means to identify, and
therefore to access, a specific driver. 4Test defines this alias data type as follows:
[ ] INTEGER iHeapSize
[ ] INTEGER iHeapCommitted
[ ] INTEGER iHeapAllocated
(¯`•._.•[Jagan’s]•._.•´¯)
[ ] INTEGER iHeapFree
[ ] INTEGER iHeapOverhead
The handle for an open file. A file handle provides you with a means to identify, and
therefore to access, a specific file. The FileOpen function returns an HFILE that you can
then pass to such functions as FileReadLine to identify a particular open file that
FileReadLine is to read. 4Test defines this alias data type as follows:
The handle for an open .ini file. A file handle provides you with a means to identify, and
therefore to access, a specific file. A .ini file is an initialization file. SilkTest stores test
attributes and their values in the initialization file called testplan.ini. The IniFileOpen
function returns an HINIFILE that you can then pass to such functions as IniFileSetValue
to identify the initialization file in which to set a value. 4Test defines this alias data type
as follows:
The handle for a machine that is connected to the 4Test Agent. The Connect function
returns an HMACHINE when it completes successfully. 4Test defines this alias data type
as follows:
When a function requires a machine handle for an input parameter, you can substitute the
string form of the machine name instead of the handle form. For example:
The handle that identifies a 4Test timer. The TimerCreate function returns an HTIMER.
4Test defines this alias data type as follows:
Description
A variable of type INTEGER stores integral values. On all platforms, an INTEGER is 32-
bits.
LBSTYLE describes the style of a list box: single, extended, or multiple. 4Test defines
this enumerated data type as follows:
Specifies data passed to the Link Tester tool. 4Test defines this record datatype as
follows:
[ ] LC_ALL
[ ] LC_COLLATE
[ ] LC_CTYPE
[ ] LC_MONETARY
[ ] LC_NUMERIC
[ ] LC_TIME
Description
Use a variable of type LONG to store integers which require four bytes, for example, a
return value from a Microsoft Windows Dynamic Link Library (DLL).
LVSTYLE describes the style of a listview: single, extended, or multiple. 4Test defines
this enumerated data type as follows:
This data type stores information about the multiple ways to view a elaborated list box
control: large and small rearrangeable icons, normal text, and a detail, or report, view.
4Test defines this enumerated data type as follows:
[ ] TAG_CAPTION
[ ] TAG_PRIOR_LABEL
[ ] TAG_INDEX
[ ] TAG_WINDOW_ID
[ ] TAG_LOCATION
Description
(¯`•._.•[Jagan’s]•._.•´¯)
A variable of type NUMBER stores either integers or real numbers. Use a variable of this
type only when its value can be either integer or real.
Variables of type NUMBER can have a value from 2.0 – 32. If the value is outside the
range, the data type returns a value of zero.
Certain properties and methods have a pointer to an ActiveX interface as their return
type, for example, a pointer to an IDispatch interface. Such a pointer is represented in
4Test as a PINTERFACE type.
4Test defines this alias data type as follows:
The interface pointed to cannot be called directly from SilkTest; however, the pointer can
be processed further by passing it to a method or property that accepts a pointer.
Position coordinates typically used to specify a screen or window location. 4Test defines
this record data type as follows:
The information necessary to specify a rectangle relative to a window, the entire screen,
or some other coordinate space. 4Test defines this record data type as follows:
Field Description
xPos The x-coordinate of the top-left corner. INTEGER.
yPos The y-coordinate of the top-left corner. INTEGER.
xSize The width (in pixels) of the capture region. INTEGER.
ySize The height (in pixels) of the capture region.
Holds the minimum and maximum values to which a ScrollBar or UpDown object can be
set. 4Test defines this record data type as follows:
Holds the minimum and maximum values to which a Scale object can be set. 4Test
defines this record data type as follows:
SIZE datatype
Description
The dimensions of an object, without regard to position. 4Test defines this record data
type as follows
A variable of type STRING stores character strings. You define a string by enclosing it in
either single (') or double quotation marks (").
For the range of valid values, see Data type ranges.
To sort lists of strings and compare strings by ASCII value, add the line AsciiSort=TRUE
in the [Runtime] section of the partner.ini file. This setting also affects the comparison of
strings, not just sorting of lists of strings.
[ ] STRING sName
[ ] STRING sVerifyMethod
[ ] STRING sGetMethod
(¯`•._.•[Jagan’s]•._.•´¯)
Description
A variable of type TIME holds values for a hours, minutes, seconds, and microseconds.
WINATTR_LIST
Description
You can declare a variable of type WINDOW to store a window identifier and then
reference the window using the variable name, instead of using the window identifier as
specified in the window's declaration.
Examples
Use WindowDefinedHow as optional parameter for the IsDefined method to see how a
particular string definition has been defined: as a method, not as a method but as some
other definition, or to find out if the string is defined in the DATACLASS at all.
4Test defines this enumerated data type as follows:
[ ] WINDOW w
[ ] BOOLEAN bEnabled
[ ] BOOLEAN bChecked
The data type used to store the names and values of the properties of a window and that
window’s child windows. 4Test defines this data structure as follows:
The data type returned by the GetState function to report the current state of a
MoveableWin object. 4Test defines this enumerated data type as follows:
WS_MAXIMIZED
WS_MINIMIZED
The data type of the WndTag property, which is the window tag of a window. 4Test
defines this alias data type as follows:
************************************************************************