Monday, July 7, 2008

JDBC Interview Questions

Q What is JDBC?

A

JDBC technology is an API (included in both J2SE and J2EE releases) that provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. With a JDBC technology-enabled driver, you can connect all corporate data even in a heterogeneous environment

2 Q What are stored procedures?

A : A stored procedure is a set of statements/commands which reside in the database. The stored procedure is precompiled. Each Database has it's own stored procedure language,

3 Q What is JDBC Driver ?

A The JDBC Driver provides vendor-specific implementations of the abstract classes provided by the JDBC API. This driver is used to connect to the database.

4 Q What are the steps required to execute a query in JDBC?

A First we need to create an instance of a JDBC driver or load JDBC drivers, then we need to register this driver with DriverManager class. Then we can open a connection. By using this connection , we can create a statement object and this object will help us to execute the query.

5 Q What is DriverManager ?

A DriverManager is a class in java.sql package. It is the basic service for managing a set of JDBC drivers.

6 Q What is a ResultSet ? A A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor is positioned before the first row. The next method moves the cursor to the next row, and because it returns false when there are no more rows in the ResultSet object, it can be used in a while loop to iterate through the result set.

7 Q What is Connection? A Connection class represents a connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.

A Connection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, and so on. This information is obtained with the getMetaData method.

8 Q What does Class.forName return?

A A class as loaded by the classloader.

9 Q What is Connection pooling?

A Connection pooling is a technique used for sharing server resources among requesting clients. Connection pooling increases the performance of Web applications by reusing active database connections instead of creating a new connection with every request. Connection pool manager maintains a pool of open database connections.

10 Q What are the different JDB drivers available? A There are mainly four type of JDBC drivers available. They are:

Type 1 : JDBC-ODBC Bridge Driver - A JDBC-ODBC bridge provides JDBC API access via one or more ODBC drivers. Note that some ODBC native code and in many cases native database client code must be loaded on each client machine that uses this type of driver. Hence, this kind of driver is generally most appropriate when automatic installation and downloading of a Java technology application is not important. For information on the JDBC-ODBC bridge driver provided by Sun.

Type 2: Native API Partly Java Driver- A native-API partly Java technology-enabled driver converts JDBC calls into calls on the client API for Oracle, Sybase, Informix, DB2, or other DBMS. Note that, like the bridge driver, this style of driver requires that some binary code be loaded on each client machine.

Type 3: Network protocol Driver- A net-protocol fully Java technology-enabled driver translates JDBC API calls into a DBMS-independent net protocol which is then translated to a DBMS protocol by a server. This net server middleware is able to connect all of its Java technology-based clients to many different databases. The specific protocol used depends on the vendor. In general, this is the most flexible JDBC API alternative. It is likely that all vendors of this solution will provide products suitable for Intranet use. In order for these products to also support Internet access they must handle the additional requirements for security, access through firewalls, etc., that the Web imposes. Several vendors are adding JDBC technology-based drivers to their existing database middleware products.

Type 4: JDBC Net pure Java Driver - A native-protocol fully Java technology-enabled driver converts JDBC technology calls into the network protocol used by DBMSs directly. This allows a direct call from the client machine to the DBMS server and is a practical solution for Intranet access. Since many of these protocols are proprietary the database vendors themselves will be the primary source for this style of driver. Several database vendors have these in progress.

11 Q What is the fastest type of JDBC driver?

A

Type 4 (JDBC Net pure Java Driver) is the fastest JDBC driver. Type 1 and Type 3 drivers will be slower than Type 2 drivers (the database calls are make at least three translations versus two), and Type 4 drivers are the fastest (only one translation).

12 Q Is the JDBC-ODBC Bridge multi-threaded?

A No. The JDBC-ODBC Bridge does not support multi threading. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get the advantages of multi-threading.

13 Q What is cold backup, hot backup, warm backup recovery?

A : Cold backup means all these files must be backed up at the same time, before the database is restarted. Hot backup (official name is 'online backup' ) is a backup taken of each tablespace while the database is running and is being accessed by the users

14 Q What is the advantage of denormalization?

A : Data denormalization is reverse procedure, carried out purely for reasons of improving performance. It maybe efficient for a high-throughput system to replicate data for certain data.

15 Q How do you handle your own transaction ?

A :Connection Object has a method called setAutocommit ( boolean flag) . For handling our own transaction we can set the parameter to false and begin your transaction . Finally commit the transaction by calling the commit method.



Winrunner Interview Questions 1

1. What is WinRunner and for what type of testing it is used?
2. Can you carry out functionality testing using WinRunner?
3. WinRunner is appropriate for which kind of applications?
4. What are different the types of applications WinRunner can use?
5. What’s the WinRunner version number you used for your applications?
6. What are all the different sort of recordings accessible in WinRunner?
7. When […]

Database Functions


What is the use of “db_check” function?
This function captures and evaluates data from a database.

Note that the checklist file (arg1) can be created only during record.
arg1 - checklist file.

What is the use of “db_connect”


This function creates a new connection session with a database.
arg1 - the session name (string)
arg2 - a connection string
for example “DSN=SQLServer_Source;UID=SA;PWD=abc123″

What is the use of “db_disconnect”
This function disconnects from the database and deletes the […

Do you suggest installing WinRunner and Silktest on the same computer?

First I will ask ideas to work with WinRunner and Silktest installed on the same machine. In the majority cases such setup would work fine, but unexpectedly a new difficulty may


Winrunner Faq, Winrunner Interview Questions, Winrunner Questions, Winrunner Scripts, Winrunner Testing, Winrunner Tutorial, Winrunner Versions

Posted at 4:39 PM 0 comments

Labels: Winrunner Faq, WinRunner Interview Questions, Winrunner Questions, Winrunner Scripts, Winrunner Testing, Winrunner Tutorial, Winrunner Versions


Wednesday, April 23, 2008
Software Testing Interview Question 11

Q Can you provide me the correct answer for Test Bug?

The idea of testing is to expose defects/Bugs. A defect/BUG is a difference from a desired product characteristic. Two categories of defects/Bugs are- Variance from product specifications- Variance from customer/user anticipation.

Q What is the ONE major factor of 'test case'?

Test case hold the elements like; test case no, test case explanation, expected result, actual result, Status, remark. According to me, the one key element is actual result.

Q Cost of cracking a bug from requirements phase to testing phase - boosts slowly, decreases, increases steeply or remains constant?

Cost of solving a bug from requirements phase to testing phase - increases slowly

Q What is Bug Tracking Process, Reporting, Re-testing and Debugging?

First step : Bug finding

Second Step : Bug Reporting

Third Step : Bug De-bugging(fixing)

Fourth Step : Re verification of the reported bug (Regression)

This is the process of Bug cycle

Q What are the management tools we have in testing?

We have management tools like Test Director, Team rack, Rational Clear Quest, Bug Zilla etc.,

Q What are the test cases prepared by the testing team ?

1. Functional Unit Teset cases (FUT), 2. Integration Test cases (IT), 3. System Test cases (ST), 4. User Inerface Test cases, 5. Validations

Q Can we write Functional test case based on only BRD or only Use case?

We can write down the test cases using the BRD, but we may not obtain the full flow information and exact functionality of the business from BRD. According to me, we can start writing the functional test cases using the BRD, but we cannot baseline the test cases on the basis of BRD.

Q In an application if i press the delete button it should give an error message "Are u sure u want to delete" but the application gives the message as "Are u sure". is it a bug? And if it is how you would rate its severity.

Severity should be minor

Q Best to solve defects - requirements, plan, design, code / testing phase?

Best to solve Defect is Requirement Phase

Q During the start of the project how will the company come to an conclusion that tool is required for testing or not?

There are lots of things which will decide the Automation tool at the time of Project Initialization...1.Requirements2.Project Budget3.Project size4.Head counts5.Time

Q Tell difference between GUI Testing and Black box Testing?

GUI testing fall under black box testing, where we are going to make sure whether the alignments of the objects are placed correctly or not.. like look and feel we can also state that this is cosmetic testing

Black box testing is testing the overall functionality of a system without any collision on the internal code of an application. here you are going to carry out the usability, GUI, functionality, validation, security, system, performance and user acceptance testing.

Posted at 5:21 PM 0 comments

Labels: Manual Testing Interview Questions, Qa Testing Interview, Qa Testing Interview Questions, Software Testing Interview Questions, Test Director, Testing Interview Question, testing interview questions


Tuesday, April 22, 2008
Software Testing Interview Question 10

Q. Explain bug life cycle?
A: —

New: When tester reports a defect
Open: When developer admit that it is a bug or if the developer neglect the defect, then the status is updated into “Rejected”
Fixed: When developer make modifications to the code to correct the bug…
Closed/Reopen: When tester tests it again. If the probable result shown up, it is turned into “Closed” and if the problem still exists, it’s “Reopen”

Q. What is deferred status in defect life cycle?
A: — Deferred status means the developer accepted the bug, but it is planned to correct in the next build

Q. What is smoke test?
A; — Testing the application whether it’s performing its fundamental functionality correctly or not, so that the test team can go forward with the application.

Q. Do you use any automation tool for smoke testing?
A: - Absolutely can use.

Q. What is Verification and validation?
A: — Verification is static. No code is executed. Say, analysis of requirements etc. Validation is dynamic. Code is executed with scenarios present in test cases.

Q. Explain test plan and its contents?
A: — Test plan is a document which contains the scope for testing the application and what to be tested, when to be tested and who to test.

Q. Advantages of automation over manual testing?
A: — Time, resource and Money

Q. What is ADhoc testing?
A: — Doing something which is not planned.

Q. What is mean by release notes?
A: — It’s a document released beside the product which give details about the product. It also contains about the bugs that are in deferred status.

Q. Scalability testing comes under in which tool?
A: — Scalability testing comes under performance testing. Load testing, scalability testing both are same.

Q. What is the difference between Bug and Defect?
A: — Bug: Difference from the expected result.

Defect: Problem in algorithm leads to failure.

A Mistake in code is called Error.

Due to Error in coding, test engineers are getting mismatches in application is called defect.

If defect accepted by development team to solve is called Bug.

Q. What is hot fix?
A: — A hot fix is a solitary, collective package that contains one or more files that are used to tackle a problem in a software product. Usually, hot fixes are made to address a exact customer circumstances and may not be spread outside the customer organization.

Bug found at the customer place which has high priority.

Q. What is the difference between functional test cases and compatibility test cases?
A: —In Compatibility we have no Test Cases. Like we are Testing an application in different Hardware and software.

Q. What is Acid Testing??
A: — ACID Means:
ACID testing is related to testing a transaction.
A-Atomicity
C-Consistent
I-Isolation
D-Durable

Mostly this will be done database testing.

Q. What is the main use of set up a traceability matrix?
A: — To Cross confirm the ready test cases and test scripts with user requirements.

To observe the changes, enhance occurred during the development of the project.

Traceability matrix is arranged in order to cross check the test cases planned against each requirement, hence giving an prospect to confirm that all the necessities are covered in testing the application.

No comments: