Interview Questions Software Testing
Interview Questions Software Testing
Organizations vary considerably in how they assign responsibility for QA and testing.
Sometimes they're the combined responsibility of one group or individual. Also
common are project teams that include a mix of testers and developers who work
closely together, with overall QA processes monitored by project managers. It will
depend on what best fits an organization's size and business structure.
• Media reports in January of 2005 detailed severe problems with a $170 million
high-profile U.S. government IT systems project. Software testing was one of
the five major problem areas according to a report of the commission
reviewing the project. Studies were under way to determine which, if any,
portions of the project could be salvaged.
-1-
* A bug in site management software utilized by companies with a significant
percentage of worldwide web traffic was reported in May of 2004. The bug
resulted in performance problems for many of the sites simultaneously and
required disabling of the software until the bug was fixed.
* In early 2004, news reports revealed the intentional use of a software bug as
a counter-espionage tool. According to the report, in the early 1980's one
nation surreptitiously allowed a hostile nation's espionage service to steal a
version of sophisticated industrial software that had intentionally-added flaws.
This eventually resulted in major industrial disruption in the country that used
the stolen flawed software.
* A major U.S. retailer was reportedly hit with a large government fine in
October of 2003 due to web site errors that enabled customers to view one
anothers' online orders.
* In early 2000, major problems were reported with a new computer system in
a large suburban U.S. public school district with 100,000+ students; problems
included 10,000 erroneous report cards and students left stranded by failed
class registration systems; the district's CIO was fired. The school district
decided to reinstate it's original 25-year old system for at least a year until the
bugs were worked out of the new system by the software vendors.
* In October of 1999 the $125 million NASA Mars Climate Orbiter spacecraft
-2-
was believed to be lost in space due to a simple data conversion error. It was
determined that spacecraft software used certain data in English units that
should have been in metric units. Among other tasks, the orbiter was to serve
as a communications relay for the Mars Polar Lander mission, which failed for
unknown reasons in December 1999. Several investigating panels were
convened to determine the process failures that allowed the error to go
undetected.
-3-
environments, continuously modified requirements may be a fact of life. In this
case, management must understand the resulting risks, and QA and test
engineers must adapt and plan for continuous extensive testing to keep the
inevitable bugs from running out of control - see 'What can be done if
requirements are changing continuously?' in Part 2 of the FAQ. Also see
information about 'agile' approaches such as XP, also in Part 2 of the FAQ.
* * 'no problem'
* * 'piece of cake'
* instead of:
* * 'I can't estimate how long it will take, until I take a close look at it'
* * 'we can't figure out what that old spaghetti code did in the first place'
If there are too many unrealistic 'no problem's', the result is bugs.
* Poorly documented code - it's tough to maintain and modify code that is
badly written or poorly documented; the result is bugs. In many organizations
management provides no incentive for programmers to document their code
or write clear, understandable, maintainable code. In fact, it's usually the
opposite: they get points mostly for quickly turning out code, and there's job
security if nobody else can understand it ('if it was hard to write, it should be
hard to read').
•
* Software development tools - visual tools, class libraries, compilers, scripting
tools, etc. often introduce their own bugs or are poorly documented, resulting
in added bugs.
-4-
* A lot depends on the size of the organization and the risks involved. For large
organizations with high-risk (in terms of lives or property) projects, serious
management buy-in is required and a formalized QA process is necessary.
* The most value for effort will often be in (a) requirements management processes,
with a goal of clear, complete, testable requirement specifications embodied in
requirements or design documentation, or in 'agile'-type environments extensive
continuous coordination with end-users, (b) design inspections and code inspections,
and (c) post-mortems/retrospectives.
8.What is a 'walkthrough'?
9.What's an 'inspection'?
* Black box testing - not based on any knowledge of internal design or code. Tests
are based on requirements and functionality.
* Unit testing - the most 'micro' scale of testing; to test particular functions or code
modules. Typically done by the programmer and not by testers, as it requires
-5-
detailed knowledge of the internal program design and code. Not always easily done
unless the application has a well-designed architecture with tight code; may require
developing test driver modules or test harnesses.
* End-to-end testing - similar to system testing; the 'macro' end of the test scale;
involves testing of a complete application environment in a situation that mimics real-
world use, such as interacting with a database, using network communications, or
interacting with other hardware, applications, or systems if appropriate.
* Load testing - testing an application under heavy loads, such as testing of a web
site under a range of loads to determine at what point the system's response time
degrades or fails.
* Stress testing - term often used interchangeably with 'load' and 'performance'
testing. Also used to describe such tests as system functional testing while under
-6-
unusually heavy loads, heavy repetition of certain actions or inputs, input of large
numerical values, large complex queries to a database system, etc.
* Performance testing - term often used interchangeably with 'stress' and 'load'
testing. Ideally 'performance' testing (and any other 'type' of testing) is defined in
requirements documentation or QA or Test Plans.
* Usability testing - testing for 'user-friendliness'. Clearly this is subjective, and will
depend on the targeted end-user or customer. User interviews, surveys, video
recording of user sessions, and other techniques can be used. Programmers and
testers are usually not appropriate as usability testers.
* Recovery testing - testing how well a system recovers from crashes, hardware
failures, or other catastrophic problems.
* Security testing - testing how well the system protects against unauthorized internal
or external access, willful damage, etc; may require sophisticated testing techniques.
* Exploratory testing - often taken to mean a creative, informal software test that is
not based on formal test plans or test cases; testers may be learning the software as
they test it.
* Ad-hoc testing - similar to exploratory testing, but often taken to mean that the
testers have significant understanding of the software before testing it.
-7-
* Beta testing - testing when development and testing are essentially completed and
final bugs and problems need to be found before final release. Typically done by
end-users or others, not by programmers or testers.
* Mutation testing - a method for determining if a set of test data or test cases is
useful, by deliberately introducing various code changes ('bugs') and retesting with
the original test data/cases to determine if the 'bugs' are detected. Proper
implementation requires large computational resources.
* Realistic schedules - allow adequate time for planning, design, testing, bug fixing,
re-testing, changes, and documentation; personnel should be able to complete the
project without burning out.
* Adequate testing - start testing early on, re-test after fixes or changes, plan for
adequate time for testing and bug-fixing. 'Early' testing ideally includes unit testing by
developers and built-in testing and diagnostic capabilities.
* Quality software is reasonably bug-free, delivered on time and within budget, meets
requirements and/or expectations, and is maintainable. However, quality is obviously
a subjective term. It will depend on who the 'customer' is and their overall influence
in the scheme of things. A wide-angle view of the 'customers' of a software
development project might include end-users, customer acceptance testers,
customer contract officers, customer management, the development organization's.
-8-
of profits while an end-user might define quality as user-friendly and bug-free.
* 'Good code' is code that works, is bug free, and is readable and maintainable.
Some organizations have coding 'standards' that all developers are supposed to
adhere to, but everyone has different ideas about what's best, or what is too many or
too few rules. There are also various theories and metrics, such as McCabe
Complexity metrics. It should be kept in mind that excessive use of standards and
rules can stifle productivity and creativity. 'Peer reviews', 'buddy checks' code
analysis tools, etc. can be used to check for problems and enforce standards. For C
and C++ coding, here are some typical ideas to consider in setting rules/standards;
these may or may not apply to a particular situation:
* Use descriptive function and method names - use both upper and lower case,
avoid abbreviations, use as many characters as necessary to be adequately
descriptive (use of more than 20 characters is not out of line); be consistent in
naming conventions.
* Use descriptive variable names - use both upper and lower case, avoid
abbreviations, use as many characters as necessary to be adequately descriptive
(use of more than 20 characters is not out of line); be consistent in naming
conventions.
* Function and method sizes should be minimized; less than 100 lines of code is
good, less than 50 lines is preferable.
* In adding comments, err on the side of too many rather than too few comments; a
common rule of thumb is that there should be at least as many lines of comments
(including header blocks) as lines of code.
-9-
* Make extensive use of error handling procedures and status and error logging.
* For C++, to minimize complexity and increase maintainability, avoid too many
levels of inheritance in class heirarchies (relative to the size and complexity of the
application). Minimize use of multiple inheritance, and minimize use of operator
overloading (note that the Java programming language eliminates multiple
inheritance and operator overloading.)
* For C++, keep class methods small, less than 50 lines of code per method is
preferable.
* 'Design' could refer to many things, but often refers to 'functional design' or 'internal
design'. Good internal design is indicated by software code whose overall structure is
clear, understandable, easily modifiable, and maintainable; is robust with sufficient
error-handling and status logging capability; and works correctly when implemented.
Good functional design is indicated by an application whose functionality can be
traced back to customer and end-user requirements.For programs that have a user
interface, it's often a good idea to assume that the end user will have little computer
knowledge and may not read a user manual or even the on-line help; some common
rules-of-thumb include:
* The program should act in a way that least surprises the user
* It should always be evident to the user what can be done next and how to exit
* The program shouldn't let the users do something stupid without warning them.
* CMM = 'Capability Maturity Model', now called the CMMI ('Capability Maturity
Model Integration'), developed by the SEI. It's a model of 5 levels of process
'maturity' that determine effectiveness in delivering quality software. It is geared to
large organizations such as large U.S. Defense Department contractors. However,
many of the QA processes involved are appropriate to any organization, and if
reasonably applied can be helpful. Organizations can receive CMMI ratings by
undergoing assessments by qualified auditors.
- 10 -
* Level 3 - standard software development and maintenance processes are
integrated throughout an organization; a Software Engineering Process Group is is in
place to oversee software processes, and training programs are used to ensure
understanding and compliance.
* Level 4 - metrics are used to track productivity, processes, and products. Project
performance is predictable, and quality is consistently high.
- 11 -
* The life cycle begins when an application is first conceived and ends when it is no
longer in use. It includes aspects such as initial concept, requirements analysis,
functional design, internal design, documentation planning, test planning, coding,
document preparation, integration, testing, maintenance, updates, retesting, phase-
out, and other aspects.
* Possibly For small projects, the time needed to learn and implement them may not
be worth it. For larger projects, or on-going long-term projects they can be valuable.
* Coverage analyzers - these tools check which parts of the code have been
exercised by a test, and may be oriented to code statement coverage, condition
coverage, path coverage, etc.
* Load/performance test tools - for testing client/server and web applications under
various load levels.
* Web test tools - to check that links are valid, HTML code usage is correct, client-
side and server-side programs work, a web site's interactions are secure.
- 12 -
* Other tools - for test case management, documentation management, bug
reporting, and configuration management.
Ans. Yes, I have been WinRunner for creating automates scripts for GUI, functional
and regression testing of the AUT.
Ans.
Ans.
Ans.
WinRunner uses the GUI Map file to recognize objects on the application. When
WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s
- 13 -
description in the GUI map and then looks for an object with the same properties in
the application being tested.
5) Have you created test scripts and what is contained in the test scripts?
Ans.
Yes I have created test scripts. It contains the statement in Mercury Interactive’s Test
Script Language (TSL). These statements appear as a test script in a test window.
You can then enhance your recorded test script, either by typing in additional TSL
functions and programming elements or by using WinRunner’s visual programming
tool, the Function Generator.
Ans.
Following each test run, WinRunner displays the results in a report. The report
details all the major events that occurred during the run, such as checkpoints, error
messages, system messages, or user messages. If mismatches are detected at
checkpoints during the test run, you can view the expected results and the actual
results from the Test Results window.
Ans.
Yes, I have performed debugging of scripts. We can debug the script by executing
the script in the debug mode. We can also debug script using the Step, Step Into,
Step out functionalities provided by the WinRunner.
Ans.
We run tests in Verify mode to test your application. Each time WinRunner
encounters a checkpoint in the test script, it compares the current data of the
application being tested to the expected data captured earlier. If any mismatches are
found, WinRunner captures them as actual results.
Ans.
Following each test run, WinRunner displays the results in a report. The report
details all the major events that occurred during the run, such as checkpoints, error
messages, system messages, or user messages. If mismatches are detected at
checkpoints during the test run, you can view the expected results and the actual
results from the Test Results window. If a test run fails due to a defect in the
application being tested, you can report information about the defect directly from the
- 14 -
Test Results window. This information is sent via e-mail to the quality assurance
manager, who tracks the defect until it is fixed.
Ans.
Ans When you work with WinRunner, you can choose to save your tests directly to
your TestDirector database or while creating a test case in the TestDirector we can
specify whether the script in automated or manual. And if it is automated script then
TestDirector will build a skeleton for the script that can be later modified into one
which could be used to test the AUT.
Ans.
Ans. Add-Ins are used in WinRunner to load functions specific to the particular add-
in to the memory. While creating a script only those functions in the add-in selected
will be listed in the function generator and while executing the script only those
functions in the loaded add-in will be executed else WinRunner will give an error
message saying it does not recognize the function.
14) What are the reasons that WinRunner fails to identify an object on the GUI?
Ans.
- 15 -
15) What do you mean by the logical name of the object.
Ans. An object’s logical name is determined by its class. In most cases, the logical
name is the label that appears on an object.
16) If the object does not have a name then what will be the logical name?
Ans.
If the object does not have a name then the logical name could be the attached text.
17) What is the different between GUI map and GUI map files?
Ans.
The GUI map is actually the sum of one or more GUI map files. There are two
modes for organizing GUI map files.
i. Global GUI Map file: a single GUI Map file for the entire application
ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each
test created. GUI Map file is a file which contains the windows and the objects
learned by the WinRunner with its logical name and their physical description.
Ans. GUI Map editor displays the content of a GUI Map. We can invoke GUI Map
Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the various
GUI Map files created and the windows and objects learned in to them with their
logical name and physical description.
19) When you create GUI map do you record all the objects of specific
objects?
Ans.
If we are learning a window then WinRunner automatically learns all the objects in
the window else we will we identifying those object, which are to be learned in a
window, since we will be working with only those objects while creating scripts.
- 16 -
Ans. Set_Window command sets the focus to the specified window. We use this
command to set the focus to the required window before executing tests on a
particular window.
Syntax: set_window(, time); The logical name is the logical name of the window and
time is the time the execution has to wait till it gets the given window into focus.
Ans When you work with WinRunner, you can choose to save your tests directly to
your TestDirector database or while creating a test case in the TestDirector we can
specify whether the script in automated or manual. And if it is automated script then
TestDirector will build a skeleton for the script that can be later modified into one
which could be used to test the AUT.
Ans.
Ans. Add-Ins are used in WinRunner to load functions specific to the particular add-
in to the memory. While creating a script only those functions in the add-in selected
will be listed in the function generator and while executing the script only those
functions in the loaded add-in will be executed else WinRunner will give an error
message saying it does not recognize the function.
14) What are the reasons that WinRunner fails to identify an object on the GUI?
Ans.
Ans. An object’s logical name is determined by its class. In most cases, the logical
name is the label that appears on an object.
- 17 -
16) If the object does not have a name then what will be the logical name?
Ans.
If the object does not have a name then the logical name could be the attached text.
17) What is the different between GUI map and GUI map files?
Ans.
The GUI map is actually the sum of one or more GUI map files. There are two
modes for organizing GUI map files.
i. Global GUI Map file: a single GUI Map file for the entire application
ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each
test created. GUI Map file is a file which contains the windows and the objects
learned by the WinRunner with its logical name and their physical description.
Ans. GUI Map editor displays the content of a GUI Map. We can invoke GUI Map
Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the various
GUI Map files created and the windows and objects learned in to them with their
logical name and physical description.
19) When you create GUI map do you record all the objects of specific
objects?
Ans.
If we are learning a window then WinRunner automatically learns all the objects in
the window else we will we identifying those object, which are to be learned in a
window, since we will be working with only those objects while creating scripts.
Ans. Set_Window command sets the focus to the specified window. We use this
command to set the focus to the required window before executing tests on a
particular window.
Syntax: set_window(, time); The logical name is the logical name of the window and
time is the time the execution has to wait till it gets the given window into focus.
31) When do you feel you need to modify the logical name?
- 18 -
Ans. Changing the logical name of an object is useful when the assigned logical
name is not sufficiently descriptive or is too long.
Ans. Changing the physical description is necessary when the property value of an
object changes.
Ans. We can handle varying window labels using regular expressions. WinRunner
uses two “hidden” properties in order to use regular expression in an object’s
physical description. These properties are regexp_label and regexp_MSW_class.
i. The regexp_label property is used for windows only. It operates “behind the
scenes” to insert a regular expression into a window’s label description.
Ans. The regexp_label property is used for windows only. It operates “behind the
scenes” to insert a regular expression into a window’s label description.
36) How do you copy and move objects between different GUI map files?
Ans. We can copy and move objects between different GUI Map files using the GUI
Map Editor. The steps to be followed are: i. Choose Tools > GUI Map Editor to open
the GUI Map Editor.
ii. Choose View > GUI Files.
iii. Click Expand in the GUI Map Editor. The dialog box expands to display two GUI
map files simultaneously.
iv. View a different GUI map file on each side of the dialog box by clicking the file
names in the GUI File lists.
v. In one file, select the objects you want to copy or move. Use the Shift key and/or
Control key to select multiple objects. To select all objects in a GUI map file, choose
Edit > Select All.
vi. Click Copy or Move.
vii. To restore the GUI Map Editor to its original size, click Collapse.
- 19 -
37) How do you select multiple objects during merging the files?
Ans. Use the Shift key and/or Control key to select multiple objects. To select all
objects in a GUI map file, choose Edit > Select All.
Ans. We can clear a GUI Map file using the “Clear All” option in the GUI Map Editor.
Ans. GUI Map Editor has a Filter option. This provides for filtering with 3 different
types of options.
i. Logical name displays only objects with the specified logical name.
ii. Physical description displays only objects matching the specified physical
description. Use any substring belonging to the physical description.
iii. Class displays only objects of the specified class, such as all the push buttons.
a. When WinRunner learns the description of a GUI object, it does not learn all its
properties. Instead, it learns the minimum number of properties to provide a unique
identification of the object.
b. Many applications also contain custom GUI objects. A custom object is any object
not belonging to one of the standard classes used by WinRunner. These objects are
therefore assigned to the generic “object” class. When WinRunner records an
operation on a custom object, it generates obj_mouse_ statements in the test script.
c. If a custom object is similar to a standard object, you can map it to one of the
standard classes. You can also configure the properties WinRunner uses to identify a
custom object during Context Sensitive testing. The mapping and the configuration
you set are valid only for the current WinRunner session. To make the mapping and
the configuration permanent, you must add configuration statements to your startup
test script.
Load testing is to test that if the application works fine with the loads that
result from large number of simultaneous users, transactions and to
determine weather it can handle peak usage periods.
Timing for both read and update transactions should be gathered to determine
whether system functions are being performed in an acceptable timeframe.
This should be done standalone and then in a multi user environment to
- 20 -
determine the effect of multiple transactions on the timing of a single
transaction.
Version 7.2.
Step 1: Planning the test. Here, we develop a clearly defined test plan to
ensure the test scenarios we develop will accomplish load-testing
objectives. Step 2: Creating Vusers. Here, we create Vuser scripts that
contain tasks performed by each Vuser, tasks performed by Vusers as a
whole, and tasks measured as transactions. Step 3: Creating the scenario.
A scenario describes the events that occur during a testing session. It
includes a list of machines, scripts, and Vusers that run during the scenario.
We create scenarios using LoadRunner Controller. We can create manual
scenarios as well as goal-oriented scenarios. In manual scenarios, we define
the number of Vusers, the load generator machines, and percentage of
Vusers to be assigned to each script. For web tests, we may create a goal-
oriented scenario where we define the goal that our test has to achieve.
LoadRunner automatically builds a scenario for us. Step 4: Running the
scenario.
We emulate load on the server by instructing multiple Vusers to perform tasks
simultaneously. Before the testing, we set the scenario configuration and
scheduling. We can run the entire scenario, Vuser groups, or individual
Vusers. Step 5: Monitoring the scenario.
We monitor scenario execution using the LoadRunner online runtime,
transaction, system resource, Web resource, Web server resource, Web
application server resource, database server resource, network delay,
streaming media resource, firewall server resource, ERP server resource, and
Java performance monitors. Step 6: Analyzing test results. During scenario
execution, LoadRunner records the performance of the application under
different loads. We use LoadRunner’s graphs and reports to analyze the
application’s performance.
We perform load testing once we are done with interface (GUI) testing.
Modern system architectures are large and complex. Whereas single user
testing primarily on functionality and user interface of a system component,
application testing focuses on performance and reliability of an entire system.
For example, a typical application-testing scenario might depict 1000 users
logging in simultaneously to a system. This gives rise to issues such as what
is the response time of the system, does it crash, will it go with different
software applications and platforms, can it hold so many hundreds and
thousands of users, etc. This is when we set do load and performance testing.
- 21 -
The components of LoadRunner are The Virtual User Generator, Controller,
and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner
Books Online.
8. What Component of LoadRunner would you use to play Back the script
in multi user mode? -
You insert rendezvous points into Vuser scripts to emulate heavy user load on
the server. Rendezvous points instruct Vusers to wait during test execution for
multiple Vusers to arrive at a certain point, in order that they may
simultaneously perform a task. For example, to emulate peak load on the
bank server, you can insert a rendezvous point instructing 100 Vusers to
deposit cash into their accounts at the same time.
A scenario defines the events that occur during each testing session. For
example, a scenario defines and controls the number of users to emulate, the
actions to be performed, and the machines on which the virtual users run their
emulations.
11. Explain the recording mode for web Vuser script? - We use VuGen to
develop a Vuser script by recording a user performing typical business
processes on a client application. VuGen creates the script by recording the
activity between the client and the server. For example, in web based
applications, VuGen monitors the client end of the database and traces all the
requests sent to, and received from, the database server. We use VuGen to:
Monitor the communication between the application and the server; Generate
the required function calls; and Insert the generated function calls into a Vuser
script.
12. Why do you create parameters? - Parameters are like script variables.
They are used to vary input to the server and to emulate real users. Different
sets of data are sent to the server each time the script is run. Better simulate
the usage model for more accurate testing from the Controller; one script can
emulate many different users on the system.
13. What is correlation? Explain the difference between automatic
correlation and manual correlation? - Correlation is used to obtain data
which are unique for each run of the script and which are generated by nested
queries. Correlation provides the value to avoid errors arising out of duplicate
- 22 -
values and also optimizing the code (to avoid nested queries). Automatic
correlation is where we set some rules for correlation. It can be application
server specific. Here values are replaced by data which are created by these
rules. In manual correlation, the value we want to correlate is scanned and
create correlation is used to correlate.
14. How do you find out where correlation is required? Give few examples
from your projects? - Two ways: First we can scan for correlations, and see
the list of values which can be correlated. From this we can pick a value to be
correlated. Secondly, we can record two scripts and compare them. We can
look up the difference file to see for the values which needed to be
correlated. In my project, there was a unique id developed for each customer,
it was nothing but Insurance Number, it was generated automatically and it
was sequential and this value was unique. I had to correlate this value, in
order to avoid errors while running my script. I did using scan for correlation.
- 23 -
Once the library is added then we assign user defined function as a
parameter. The function should have the following format: __declspec
(dllexport) char* <function name>(char*, char*)Examples of user defined
functions are as follows:GetVersion, GetCurrentTime, GetPltform are some of
the user defined functions used in my earlier project.
20. What are the changes you can make in run-time settings? - The Run Time
Settings that we make are: a) Pacing - It has iteration count. b) Log - Under
this we have Disable Logging Standard Log and c) Extended Think Time - In
think time we have two options like Ignore think time and Replay think time. d)
General - Under general tab we can set the vusers as process or as
multithreading and whether each step as a transaction.
21. How do you perform functional testing under load? - Functionality under
load can be tested by running several Vusers concurrently. By increasing the
amount of Vusers, we can determine how much load the server can sustain.
22. What is Ramp up? How do you set this? - This option is used to gradually
increase the amount of Vusers/load on the server. An initial value is set and a
value to wait between intervals can be
specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
23. What is the advantage of running the Vuser as thread? - VuGen provides
the facility to use multithreading. This enables more Vusers to be run per
generator. If the Vuser is run as a process, the same driver program is loaded
into memory for each Vuser, thus taking up a large amount of memory. This
limits the number of Vusers that can be run on a single
generator. If the Vuser is run as a thread, only one instance of the driver
program is loaded into memory for the given number of
Vusers (say 100). Each thread shares the memory of the parent driver
program, thus enabling more Vusers to be run per generator.
24. If you want to stop the execution of your script on error, how do you do
that? - The lr_abort function aborts the execution of a Vuser script. It instructs
the Vuser to stop executing the Actions section, execute the vuser_end
section and end the execution. This function is useful when you need to
manually abort a script execution as a result of a specific error condition.
When you end a script using this function, the Vuser is assigned the status
"Stopped". For this to take effect, we have to first uncheck the “Continue on
error” option in Run-Time Settings.
25. What is the relation between Response Time and Throughput? - The
Throughput graph shows the amount of data in bytes that the Vusers received
from the server in a second. When we compare this with the transaction
response time, we will notice that as throughput decreased, the response time
also decreased. Similarly, the peak throughput and highest response time
would occur approximately at the same time.
- 24 -
27. How do you identify the performance bottlenecks? - Performance
Bottlenecks can be detected by using monitors. These monitors might be
application server monitors, web server monitors, database server monitors
and network monitors. They help in finding out the troubled area in our
scenario which causes increased response time. The measurements made
are usually performance response time, throughput, hits/sec, network delay
graphs, etc.
28. If web server, database and Network are all fine where could be the
problem? - The problem could be in the system itself or in the application
server or in the code written for the application.
29. How did you find web server related issues? - Using Web resource
monitors we can find the performance of web servers. Using these monitors
we can analyze throughput on the web server, number of hits per second that
occurred during scenario, the number of http responses per second, the
number of downloaded pages per second.
30. How did you find database related issues? - By running “Database”
monitor and help of “Data Resource Graph” we can find database related
issues. E.g. You can specify the resource you want to measure on before
running the controller and than you can see database related issues
31. How did you plan the Load? What are the Criteria? - Load test is planned
to decide the number of users, what kind of machines we are going to use
and from where they are run. It is based on 2 important documents, Task
Distribution Diagram and Transaction profile. Task Distribution Diagram gives
us the information on number of users for a particular transaction and the time
of the load. The peak usage and off-usage are decided from this Diagram.
Transaction profile gives us the information about the transactions name and
their priority levels with regard to the scenario we are deciding.
32. What does vuser_init action contain? - Vuser_init action contains
procedures to login to a server.
33. What does vuser_end action contain? - Vuser_end section contains log off
procedures.
34. What is think time? How do you change the threshold? - Think time is
the time that a real user waits between actions. Example: When a user
receives data from a server, the user may wait several seconds to review the
data before responding. This delay is known as the think time. Changing the
Threshold: Threshold level is the level below which the recorded think time
will be ignored. The default value is five (5) seconds. We can change the think
time threshold in the Recording options of the Vugen.
35. What is the difference between standard log and extended log? - The
standard log sends a subset of functions and messages sent during script
execution to a log. The subset depends on the Vuser type Extended log sends
a detailed script execution messages to the output log. This is mainly used
during debugging when we want information about: Parameter substitution.
Data returned by the server. Advanced trace.
36. Explain the following functions: - lr_debug_message - The
lr_debug_message function sends a debug message to the output log when
the specified message class is set. lr_output_message - The
lr_output_message function sends notifications to the Controller Output
window and the Vuser log file. lr_error_message - The lr_error_message
function sends an error message to the LoadRunner Output window. lrd_stmt
- The lrd_stmt function associates a character string (usually a SQL
- 25 -
statement) with a cursor. This function sets a SQL statement to be processed.
lrd_fetch - The lrd_fetch function fetches the next row from the result set.
37. Throughput - If the throughput scales upward as time progresses and
the number of Vusers increase, this indicates that the bandwidth is
sufficient. If the graph were to remain relatively flat as the number of Vusers
increased, it would
be reasonable to conclude that the bandwidth is constraining the volume of
data delivered.
5. What are the command line functions that import and export the DS jobs?
6. How many types of database triggers can be specified on a table ? What are
they ?
7. What is NLS in datastage? how we use NLS in Datastage ? what advantages in
that ? at the time of ins. ..
8. What are types of Hashed File?
9. What are the datatypes a available in PL/SQL ?
1. Plan - Determine the testing strategy and define specific test requirements.
2. Capture - Classify the GUI objects in your application and build a framework
for running your tests.
4. Run - Select specific tests and execute them against the AUT.
- 27 -
3) What is SilkTest Host?
Ans. SilkTest Host is a SilkTest component that manages and executes test scripts.
SilkTest Host usually runs on a separate machine different than the machine where
AUT (Application Under Test) is running.
Ans. SilkTest Agent is a SilkTest component that receives testing commands from
the SilkTest Host and interacts with AUT (Application Under Test) directly. SilkTest
Agent usually runs on the same machine where AUT is running.
5) What is 4Test?
Ans. 4Test is a test scripting language used by SilkTest to compose test scripts to
perform automated tests. 4Test is an object-oriented fourth-generation language. It
consists of 3 sets of functionalities:
2. A set of statements, operators and data types that you use to introduce
structure and logic to a recorded testcase.
Ans. Virtual Object (VO) browser extension is a SilkTest add-on component for
testing Web applications. VO browser extersion uses sophisticated pattern
recognition techniques to identify browser-rendered objects. The VO extension sees
Web pages as they appear visually; it does not read or recognize HTML tags in the
Web application code. Instead, the VO extension sees the objects in a Web page; for
example, links, tables, images and compound controls the way that you do,
regardless of the technology behind them.
- 28 -
8) Is there any problem in using scripts created on v6.0 to 6.5 or higher
versions?
Ans. Moving from lower to higher version should not be a problem.... This is a
general statement and cannot be true at all instances. I faced problems with scripts
working in 6.5 not running in 7.0 because some of the recognition patterns used
each changed. And in some situations, finally landed two paths of the script to
perform same action based on version. PS: Did not encounter any problems from 6.0
to 6.5.
Ans. A SilkTest project is a collection of files that contains required information about
a test project.
Ans.
1. Run SilkTest.
2. Select Basic Workflow bar.
3. Click Open Project on the Workflow bar.
4. Select New Project.
5. Double click Create Project icon in the New Project dialog box
6. One the Create Project dialog box, enter your project name, and your project
description.
7. Click OK.
8. SilkTest will create a new subdirectory under SilkTest project directory, and
save all files related to the new project under that subdirectory.
11) Is There any function for word count of web page is available in the
SilkTest?
Ans. You can use Clipboard functions. Get All the contents by Ctrl+a & ctrl+C. Then
parse the List of string ...
Ans. The SilkTest testplan is an outline that provides a framework for the software
testing process and serves as the point of control for organizing and managing your
test requirements. A testplan consists of two distinct parts: an outline, which is a
formatted description of the test requirements, and statements, which are used to
connect the testplan to SilkTest scripts and testcases that implement the test
requirements.
- 29 -
2. Writing scripts for automating the test cases.
The first steps, is the outcome of analysis of what all data is required for all of your
testcases to be executed. These all should be collected and scripts to be written so
that TEST DATA is ready.
The second steps, is basically the test case execution steps automation.
Ans. A testplan file contains text lines. There are 5 types of text lines in a testplan
file:
- 30 -
5. Testplan statement - Marked in dark red color: Providing relations to link
scripts, testcases, test data, closed sub testplans or an include file to the
testplan.
1. Category: The type of testcase or group of testcases. For example, you can
use this attributes to categorize your test groups as "Boundary value tests",
"Navagation tests", etc.
Ans.
- 31 -
Ans.
Ans.
1. Make sure your Web browser is active and showing your Web application
home page. Do not minimize this Web page window.
2. Make sure your test project is open.
3. Click File/New menu. The New dialog box shows up.
4. Select the Test Frame radio button.
5. Click OK. The New Test Frame dialog box shows up with a list all active Web
applications.
6. Select your Web application.
7. Enter a test frame name. For example: HomeFrame.inc.
8. Review the window name. It should be the HTML title your Web application.
You can rename it, if needed.
9. Click OK to close the New Test Frame dialog box.
10. Click File/Save menu. HomeFrame.inc.
Ans. A test frame is a text file, which records the following types of information for a
Web application:
Ans. The DOM browser extension uses the following syntax for Web UI objects:
Browser.BrowserChild("page_title").html_class("object_tag")
- 32 -
1. "page_title" is the title of the Web page, defined by the HTML
2. "object_tag" is the label of the HTML element. How a HTML element is
labeled depending on the type of HTML element.
Ans. If your Web application has pages other than the home page, you should also
record their page objects into the test frame:
1. Make sure your Web browser is active and showing another page of your
Web application.
7. Click your Web application window. Web page objects are recorded in the
Record Window Declarations dialog box.
9. Click "Paste to Editor" button. All recorded objects will be inserted into the test
frame.
- 33 -
24) What is DefaultBaseState?
Ans. The DefaultBaseState is a starting point of test project from which the
Recovery System can automatically restart your test cases when test cases fail to
continue.
Ans.
Ans.
1. Run SilkTest.
2. Click Option/Runtime menu. The Runtime Options dialog box shows up.
3. Edit the Use Files field to include your test frame file and the exlorer.inc file.
For example: ...\HomeFrame.inc,extend\explorer.inc.
7. Click Record/Testcase menu. The Record Testcase dialog box shows up.
- 34 -
9. Select DefaultBaseState in the Applicatin State dropdown list.
10. Click Start Recording button.The Record Testcase dialog closes. Your Web
application is will be automatically started by SilkTest, based on the
information in test frame file. SilkTest Editor window closes. The Record
Status dialog box shows up.
11. Continue to use your Web application. SilkTest records everything you did on
your application.
12. Click the "Done" button on the Recording Status dialog box to stop recording.
The Recording Status dialog box closes. The Record Testcase dialog box
shows up again.
13. Click Paste to Editor. SilkTest will insert the recorded acitivities as 4Test
statements into a script file. The Record Testcase dialog closes.
14. Click File/Save menu to save the script file. You can enter a script file name.
For example, LoginTest.t.
Ans. You can run all your sub-plans using master plan approach. You just open new
plan file and call your subplan/testcase from this file. if you want to run subplan from
master plan then sysntax is like include: mysubplan.pln
Ans. While recording a test case, you can define verification points to verify UI
objects:
- 35 -
5. Press Ctrl-Alt. The Verify Window dialog box shows up. All the objects on the
current Web page are listed on the Verify Window dialog box.
6. Select the object to be verified in the object list. Un-select all other objets.
7. Select the property to be verified in the property list. Un-select all other
properties.
8. Click OK to close the Verify Window dialog box.
9. Continue your recording.
Ans. A test script file can store multiple test cases. You can run a testcase from a
test script file:
Ans.
1. Result sumary: The name of the script file. The name of the testcase. The
machine on which the tests ran. The starting time and the total elapsed time.
The number and percentage of testcases that passed and failed. The total
number of errors and warnings.
2. Result detail: List of errors and detailed information.
Ans.
4. Click the Results/Goto Source menu. The original script file opens up showing
the place where the error was originated.
- 36 -
32) How to link an error in the result file to the script file?
Ans.
2. Click Results/Pass/Fail Report. The Pass/Fail Report dialog box shows up.
3. Select an attribute on which you want the report to be based on. For example:
Component.
7. Click the Close button to close the Pass/Fail Report dialog box.
Ans. DBTester is a testing tool that allows you to access a database server directly
through ODBC drivers. If your application is a database driven application, you can
perform a test through the application UI, and verify data changes in the database
with DBTester without using the application UI.
Ans. DBTester offers 6 functions. You can use them directly in your test cases:
- 37 -
2. DB_Disconnect: Closes the database connection represented by the speficied
connection handle. All resources related to this connect are also released. For
example: DB_Disconnect(con)
4. DB_FetchNext: Retrieves the next row from the specified query result handler.
For example: DB_FetchNext(res, col1, col2, col3, ...)
5. DB_FetchPrevious: Retrieves the previous row from the specified query result
handler.
Ans. In a testplan, each text line starting from column 0 represents a top level group
description. To create sub group description:
1. Move the cursor the next line below the top level group description.
2. Click Outline/Move Right.
3. The text line will be indented to the right to be come a sub group description.
Ans. You must define values for a testplan before using it:
2. Click Testplan/Define Attributes menu. The Define Attributes dialog box shows
up. You should see 3 predefined default attributes and other attributes defined
by yourself.
- 38 -
4. Enter a value in Add box. For example, "Catalog".
5. Click Add. Value "Catalog" should be inserted into the Values box.
Ans. Testplan attributes are stored in the testplan initialization file, testplan.ini, in
SilkTest installation directory.
Ans. A test frame is a file that contains information about the application you are
testing. Information stored in a test frame will be used as references when SilkTest
records and executes testcases. A test frame is stored in an include file with file
extension .inc.
Ans.
1. Run SilkTest.
4. Leave the IE window with the Web application. Don't minimize the IE window.
- 39 -
7. Click Enable Externsions on the Workflow bar.
8. The Enable Extensions dialog will show up. Your Web application running in
the IE window will listed in the dialog box.
10. The Extension Settings dialog will show up. Click OK to enable the DOM
browser extension.
Ans.
3. Click Run/Application State menu. The Run Application State dialog box
shows up with a list of states. One of them should be DefaultBaseState.
4. Select DefaultBaseState.
5. Click Run button. The Runtime Status dialog box shows up. And the Results
File dialog box shows up too.
6. You should see no error message in the results file.
- 40 -