Showing posts with label Basic Testing Interview Questions. Show all posts
Showing posts with label Basic Testing Interview Questions. Show all posts

Tuesday, June 2, 2009

ActiveX Data Objects

Microsoft's ActiveX Data Objects (ADO) is a set of Component Object Model (COM) objects for accessing data sources. It provides a layer between programming languages and OLE DB (a means of accessing data stores, whether they be databases or otherwise, in a uniform manner). ADO allows a developer to write programs that access data without knowing how the database is implemented. You must be aware of your database for connection only. No knowledge of SQL is required to access a database when using ADO, although one can use ADO to execute arbitrary SQL commands. The disadvantage of this (i.e. using SQL directly) is that it introduces a dependency upon the type of database used.

It is positioned as a successor to Microsoft's earlier object layers for accessing data sources, including RDO (Remote Data Objects) and DAO (Data Access Objects). ADO was introduced by Microsoft in October 1996.

ADO is made up of four collections and twelve objects:

ADO collections

Fields
This collection contains a set of Field objects. The Collection can be used in either a Recordset object or in a Record object. In a Recordset object, each of the Field objects that make up the Fields collection corresponds to a column in that Recordset object. In a Record object, a Field can be an absolute or relative URL that points into a tree-structured namespace (used for semi-structured data providers like the Microsoft OLE DB Provider for Internet Publishing) or as a reference to the default Stream object associated with that Record object.
Properties
An object can have more than one Property object, which are contained in the object's Properties collection.
Parameters
A Command object can have several Parameter commands to change its predefined behaviour, and each of the Parameter objects are contained in the Command object's Parameters collection
Errors
All provider created errors are passed to a collection of Error objects, while the Errors collection itself is contained in a Connection object. When an ADO operation creates an error, the collection is cleared and a new group of Error objects are created in the collection.

ADO objects

Connection
The connection object is ADO's connection to a data store via OLE DB. The connection object stores information about the session and provides methods of connecting to the data store. As some data stores have different methods of establishing a connection, some methods may not be supported in the connection object for particular OLE DB providers. A connection object connects to the data store using its 'Open' method with a connection string which specifies the connection as a list of key value pairs (for example: "Provider='SQLOLEDB';Data Source='TheSqlServer'; Initial Catalog='Northwind';Integrated Security='SSPI';"). The start of which must identify the type of data store connection that the connection object requires. This must be one of:
  • an OLE DB provider (for example SQLOLEDB), using the syntax "provider=";
  • a file name, using the syntax "file name=";
  • a remote provider and server (see RDS), using the syntax "Remote provider=" and "Remote server="; or
  • an absolute URL, using the syntax "URL="
Command
After the connection object establishes a session to the data source, instructions are sent to the data provider via the command object. The command object can send SQL queries directly to the provider through the use of the CommandText property, send a parameterised query or stored procedure through the use of a Parameter object or Parameters collection or run a query and return the results to a dataset object via the Execute method. There are several other methods that can be used in the Command object relating to other objects, such as the Stream, RecordSet or Connection objects.
Recordset
A recordset is a group of records, and can either come from a base table or as the result of a query to the table. The RecordSet object contains a Fields collection and a Properties collection. The Fields collection is a set of Field objects, which are the corresponding columns in the table. The Properties collection is a set of Property objects, which defines a particular functionality of an OLE DB provider. The RecordSet has numerous methods and properties for examining the data that exists within it. Records can be updated in the recordset by changing the values in the record and then calling on the Update or UpdateBatch method. Adding new records is performed through the AddNew function and then by calling on the Update or UpdateBatch method. Records are also deleted in the recordset with the Delete method and then by calling on the Update method. However, if for some reason the deletion cannot occur, such as because of violations in referential integrity, then the recordset will remain in edit mode after the call to the Update method. The programmer must explicitly call on the CancelUpdate function to cancel the update. Additionally, ADO can rollback transactions (if this is supported) and cancel batch updates. Recordsets can also be updated in one of three ways: via an immediate update, via a batch update, or through the use of transactions:
Immediate
The recordset is locked using the adLockOptimistic or adLockPessimistic lock. The data are updated at the data source after the record is changed and the Update method is called.
Batch
The recordset is locked using adLockBatchOptimistic and each time Update is called the data are updated in a temporary buffer. Finally, when UpdateBatch is called the data are completely updated back at the data source. This has the advantage of it all being done in memory, and if a problem occurs then UpdateCancel is called and the updates are not sent to the data source
Transaction
If the OLE DB provider allows it, transactions can be used. To start the transaction, the programmer invokes the BeginTrans method and does the required updates. When they are all done, the programmer invokes the CommitTrans method. RollbackTrans can be invoked to cancel any changes made inside the transaction and rollback the database to the state before the transaction began
Record
This object represents one record in the database, and contains a fields collection. A RecordSet consists of a collection of Record objects.
Stream
A stream, mainly used in a RecordSet object, is a means of reading and writing a stream of bytes. It is mostly used to save a recordset in an XML format, to send commands to an OLE DB provider as an alternative to the CommandText object and to contain the contents of a binary or text file.
Parameter
A parameter is a means of altering the behaviour of a common piece of functionality, for instance a stored procedure might have different parameters passed to it depending on what needs to be done; these are called parameterised commands.
Field
Each Record object contains many fields, and a RecordSet object has a corresponding Field object also. The RecordSet object's Field object corresponds to a column in the database table that it references.
Property
This object is specific to the OLE DB provider and defines an ability that the provider has implemented. A property object can be either a built-in property — it is a well defined property implemented by ADO already and thus cannot be altered — or can be a dynamic property — defined by the underlying data provider and can be changed
Error
When an OLE DB provider error occurs during the use of ADO, an Error object will be created in the Errors collection. Other errors do not go into an Error object, however. For instance, any errors that occur when manipulating data in a RecordSet or Field object are stored in a Status property.

Friday, May 29, 2009

Connection string in QTP?

connection string is a string that specifies information about a data source and the means of connecting to it. It is passed in code to an underlying driver or provider in order to initiate the connection.

Connections are built by supplying an underlying driver or provider with a connection string, which is a way of addressing a specific database or server and instance as well as user authentication credentials (for example, Server=sql_box;Database=Common;User ID=uid;Pwd=password;). Once a connection has been built it can be opened and closed at will, and properties (such as the command time-out length, or transaction, if one exists) can be set. The Connection String is composed of a set of key/value pairs as dictated by the data access interface and data provider being used.


Client Side and Server Side Applications

Client side scripting languages are Javascript, VbScript, PHP…etc
Client side scripting languages are useful to validate the inputs or user actions from user side or client side.
Client side scripting is good because it won’t send the unwanted input’s to server for validation. From front-end it self it validate the user inputs and restricts the user activities and guides him

Server side Scripting languages are
Perl, JSP, ASP, PHP.etc
Server side Scripting languages are to validate the inputs at server side.

These scripting languages provide security for the application. And also provides dynamic nature to web or client server application

Thursday, May 28, 2009

Whats the difference between HTTP and HTTPS?

http is hyper text transfer protocol which is responsible for transmitting and receiving information across the Internet where as https is secure http, which is used exchanging confidential information with a server, which needs to be secured in order to prevent unauthorized access.

HTTP is Hyper Text Transport Protocol and is transmitted over the wire via PORT 80(TCP). You normally use HTTP when you are browsing the web, it's not secure, and so someone can eavesdrop on the conversation between your computer and the web server. HTTP can support the client asking for a particular file to be sent only if it has been updated after a certain date and time. This would be used if the client has already retrieved a copy of a file by that name from that server, but wants to check to see if it has been updated since then. The server responds either with the updated file, with a message to say the file has not been changed, or with a message that the file no longer exists.

HTTPS (Hypertext Transfer Protocol over Secure Socket Layer or HTTP over SSL) is a Web protocol developed by Netscape and built into its browser that encrypts and decrypts user page requests as well as the pages that are returned by the Web server. HTTPS is really just the use of Netscape's Secure Socket Layer (SSL) as a sub layer under its regular HTTP application layering. (HTTPS uses port 443 instead of HTTP port 80 in its interactions with the lower layer, TCP/IP.) SSL uses a 40-bit key size for the RC4 stream encryption algorithm, new-age browsers use 128-bit key size which is more secure than the former, it is considered an adequate degree of encryption for commercial exchange. HTTPS is normally used in login pages, shopping/commercial sites.

How it Work
Https is not a separate protocol, but refers to the combination of a normal HTTP interaction over an encrypted Secure Sockets Layer (SSL) or Transport Layer Security (TLS) transport mechanism. This ensures reasonable protection from eavesdroppers and (provided it is implemented properly and the top level certification authorities do their job properly) man-in-the-middle attacks.

The default TCP port of an https: URL is 443 (for unsecured HTTP, the default is 80). To prepare a web-server for accepting https connections the administrator must create a public key certificate for the web-server. These certificates can be created for Linux based servers with tools such as Open SSL's ssl or SuSE's gensslcert. This certificate must be signed by a certificate authority of one form or another, who certifies that the certificate holder is who they say they are. Web browsers are generally distributed with the signing certificates of major certificate authorities, so that they can verify certificates signed by them.

When does Test Automation Makes Sense

1.When there is a repetitive task
2.When you want to do load test an application
3.API based testing
advantages:
4.Human errors will be minimized
5.Reusability
6.Number of resources will be reduced
7.Consistency in test results

Tuesday, May 26, 2009

TestCases on Physical Objects like Pen,Book or Chair etc

Test cases on different objects generally asking are ::Pen, Book,Chair .
In general when we are writing a test case for objects like above, we should consider the objects parameters like
• Look and feel
• Performance
• Usability
• Rigidity
Look and feel means external appearance like outer case must be attractive. Look and feel parameters are, Color, Height, Width, Design Material used for making it, .etc
If you come for performance the important parameters are, Durability, Continuous perfromence...Etc.
Usability: How easy to use that thin Accessibility
Rigidity How strong it is How it is working in abnormal conditions For example if you want to write test cases for a pen Then first start with look and feel.
If you com for software enabled objects Notepad, Yahoo login, For above objects we should check Different menu options are working properly Functionality of buttons, Memory capacities, Look and feel, Speed of operation…etc

Friday, May 22, 2009

Retrieve the nth highest salary from emp table?

Oracle10g:
SELECT * FROM emp e1 WHERE &N = (SELECT COUNT(DISTINCT (e2.salary)) FROM emp e2 WHERE e2.salary >= e1.salary)

sqlserver

select max(sal) FROM emp where not in(select top n sal from emp)order by sal desc;
N -> Nth highest salary of the month

Reterieving the Top2 salaries from the employee table:
Select * from EMP e where 2>= (select count (*) from EMP e where sal>e.sal) order by desc sal

Thursday, May 21, 2009

Retrieve the nth highest salrary from an employee table?


What is meant by Priority and severity?

Priority means “Importance of the defect w.r.t customer requirement”.And also it indicates how fast theDeveloper should act on it.

Severity means “Seriousness of the defect w.r.t functionality”.How it affects the Testing.

Severity
1 - Urgent
2 - High
3 - Medium
4 - Low

Status
New
Open
Returned for closure
Duplicate
Cancelled

Main components of Quality Center Tool

Quality Center is a Test Management tool from hp(previously Mercury) which can be opened or accessed using Internet Explorer Web Browser only.It has 4 important components from the all of its components which Tester will have to work with.In this Tool we can write the test cases(in Test Plan tab) and execute the test cases(in Test Lab) and report the mismatches(in Defects tab).
1.Requirements
2.Test Plan
3.Test Lab
4.Defects

Tuesday, May 12, 2009

Difference between Client/Server and Web Testing

The following list of testings are performed specifically on Client/Server Applications.

1.Installation Testing.
You will need to aware of clients and servers and their locations in the test scenario.
They may be New Installation,Upgrade.
2.Testing related to LAN, Centralized hardware and software.

The following list of testings are performed specifically on Web Applications.

1.Compatibility Testing(Browser and OS)
2.Load Testing

More to ::
Web systems are one type of client/server. The client is the browser, the server is whatever is on the back end (database, proxy, mirror, etc). This differs from so-called “traditional” client/server in a few ways but both systems are a type of client/server. There is a certain client that connects via some protocol with a server (or set of servers).

Also understand that in a strict difference based on how the question is worded, “testing a Web server” specifically is simply testing the functionality and performance of the Web server itself. (For example, I might test if HTTP Keep-Alives are enabled and if that works. Or I might test if the logging feature is working. Or I might test certain filters, like ISAPI. Or I might test some general characteristics such as the load the server can take.) In the case of “client server testing”, as you have worded it, you might be doing the same general things to some other type of server, such as a database server. Also note that you can be testing the server directly, in some cases, and other times you can be testing it via the interaction of a client.

You can also test connectivity in both. (Anytime you have a client and a server there has to be connectivity between them or the system would be less than useful so far as I can see.) In the Web you are looking at HTTP protocols and perhaps FTP depending upon your site and if your server is configured for FTP connections as well as general TCP/IP concerns. In a “traditional” client/server you may be looking at sockets, Telnet, NNTP, etc.

Monday, February 2, 2009

Who watches the watchmen?

1)The act of testing can also affect that which is being tested.
2)In practical terms the test engineer is testing software (and sometimes hardware or firmware) with other software (and hardware and firmware). The process can fail in ways that are not the result of defects in the target but rather result from defects in (or indeed intended features of) the testing tool.

Software Development Life Cycle

Acronym for "System development life cycle". SDLC is the process of developing information systems through investigation, analysis, design, implementation and maintenance. SDLC is also known as information systems development or application development. SDLC is a systems approach to problem solving and is made up of several phases, each comprised of multiple steps.Various SDLC methodologies have been developed to guide the processes involved, including the ..
1.waterfall model (which was the original SDLC method)
2.rapid application development (RAD)
3.joint application development (JAD)
4.the fountain model
5.the spiral model
6.build and fix
7.synchronize-and-stabilize
8.V Model(The very frequently used SDLC Model) ...........and etc