- What are the different types of identifiers? Tell with symbols and explain them?
When we capture a window there are different types of identifiers created like below, where the object gets to be recognized.
Types of identifiers are
Caption Case sensitive The label for the check box.
Prior text ^Find The closest static text above the check box.
Index #1 It is the first check box in the dialog.
Win ID $1041 GUI-specific tag.
Location @(57,65) (x, y) location of the check box in the dialog.
- What are the different file types?
.inc -> Include files
.pln -> plan files
.t -> testcase files
.vtp -> project files
.res -> result files
.opt -> option file
.s -> suite file
- Why is .opt file used? Give a example for it?
This is a option set files where settings of the current silktest is set. For example we can change the agent mouse delay by change OPT_MOUSE_DELAY = 5. This make the mouse to delay by 5 secs
- What are extensions?
It's a header file which exposes the functionality of a library already present with SilkTest. It is one of the available alternatives for handling custom objects from within SilkTest.
- How do I activate two different extensions? For ex: I have IE browser and netscape also how do I activate them?
Each frame can contain only one extension. To activate another extension create another frame.
- What is fault trap?
It is basically for system crash and exception handling. (e.g) over run of memory.
Fault trapping for the specific application under test is enabled through the Extensions dialog (target machines) and the Extension Enabler dialog (host machines). Once you enable fault trapping, you can also choose fault trapping options, which specify the action SilkTest takes in response to the fault and the information SilkTest logs about the fault.
- What is class file syntax?
[scope] winclass wclass-id [ : derived-class]
- Is Object oriented possible in silktest?
Inheritence is possible. There is a collection of related classes that solve specific
programming problems(AWT) and (JFC)
- What is the basic .inc file which recognizes silktest?
Winclass.inc
- What is agent?
The Agent is the software process that translates the commands in your 4Test scripts into GUI-specific commands.
- What is bind agent?
Sets a new value for the specified Agent option within a recording block or withoptions statement and returns the previous value. BindAgentOption is useful when an Agent option needs to be set to a particular value only for the duration of a given call. It obviates the need to get the previous value, set up a do...except statement, and so on.
aOldValue = BindAgentOption (aoAgentOption, aNewValue)
- What is difference b/w agent and bind agent ?
Agent option is applied as a global setting and is applicable to the entire silk test where as bind agent option is applied for a particular function or a test case.
- Why is withoption() used for? Syntax?
Opens a block of code in which Agent options can be set for the duration of the block.
Withoption()
Statements below…..
- Like testcase xyz() what else is there for multiple testcase()?
Multitestcase xyz()
- What initialization files?
The initialization file is specified in the Data File for Attributes and Queries field
- What is synchronization?
Synchronisation can be done using sleep statement.
- A scenario of a situation. Consider class A is fully sync. Class B and Class C are not in sync with Class A. How do you call Class A to class B or vice versa?
No idea
- What is recovery system?
The default recovery system specifies what SilkTest does to restore your application’s BaseState. For example if one testcase ends abruptly silktest should continue to the next testcase.
- What is an appstate ? Why do we need it? What happens if we do not specify appstate?
Declares an application state. An application state is typically used to put an application into the state it should be in at the start of a testcase.
An application state is the state you want your application to be in after the base state is restored but before you run one or more testcases. By creating an application state, you are creating reusable code that saves space and time. Furthermore, if you need to modify the Setup stage, you can change it once, in the application state routine.
- How do you inherit a class file?
Using winclass method, anywinclass method
- What is difference b/w tag and multitag?
The only difference is syntax: With the tag statement, all segments of the tag are in one string and are delimited by the pipe character ( | ), such as:
tag "Case sensitive|$1041"
With the multitag statement, different segments are on their own lines, such as:
multitag "Case sensitive"
"$1041"
- How do we overload a method?
A method that you call with different sets of parameter lists. Overloaded methods
cause naming conflicts which must be resolved to avoid runtime errors when testing Java applications. Example setBounds( RECT r1)
- How do we fetch data?
DB_fetchnext
- Can we use main in silk test? Explain the syntax?
Yes we can use.
main ()
// 1. Declare a variable to hold current record
// 2. Store all data for testcase in a list of records
// 3. Call the testcase once for each record in the list
- What is data driven test?
A data driven testcase lets you store data combinations in a list of items and invoke the testcase once for each item, passing the data to the testcase as a parameter.
- Main steps in data driven test?
DB_connect
DB_executeSQL
DB_fetchnext
DB_finishSQL
DB_disconnect
- How do you open file?
Fopen(spath, fmmode, options, fshare)
- What are the different modes of opening a file?
FM_READ
FM_WRITE
FM_UPDATE
FM_APPEND
- Syntax
a) ddt_columnprevilage
b) get_rowcounttext
c) fclose
d)
- What is silkbean?
Using the SilkBean, you can test standalone Java applications on non-Windows platforms, such as UNIX and Linux. You can perform cross-platform testing of 100% pure Java controls in standalone Java applications in a number of test environments. SilkBean provides flexibility that enables you to:
·Test a single standalone Java application on a target machine
·Set up multiple testing sessions on the same 32-bit Windows host machine to test multiple standalone Java applications on the same target machine.
·Set up multiple testing sessions on different 32-bit Windows hosts to test multiple standalone Java applications on the same target machine.
- What are the different errors faced when using silktest?
Syntax error
Object not declared in .inc file
- What is partner.ini?
Partner.ini file is a ini file for silk test. It contains global settings for starting silk
- I have a method like gettext() and one more method like db_connect, I want both of them defined in one file? How is it possible?
winclass MyList : RadioList
- What are the exceptions?
SilkTest by default calls its built-in recovery system, which:
· Terminates the testcase
· Logs the error in the results file
· Restores your application to its default base state in preparation for the next testcase
These runtime errors are called exceptions.
- Have you handled exceptions?
SilkTest’s built-in error handler (which is part of the recovery system). The statement has the following syntax:
do
statements
except
statements
- What is logerror and exceptlog?
LogError writes a string (usually an error message) to the results file. The string LogError creates is marked internally as an error line. SilkTest calls LogError automatically when it raises an exception that you have not handled.
ExceptLog logs an error to the results file by calling the built-in function LogError with the data from the most recent exception (an error message by convention). ExceptLog also writes the call stack information for that exception to the results file.
- How to add different .inc files in one file?
Use “xyz.inc”
- Share mode of a file
NULL
FS_DENY_NONE
FS_DENY_WRITE
FS_EXCLUSIVE
- How can java objects that exists in memory be called through silktest ?
By writing a public function in java code
No comments:
Post a Comment