Monday, 6 June 2016

Software Testing Interview Questions



Software Testing Interview Questions
A list of mostly asked software testing interview questions or QTP interview questions and answers are given below.

1) What is PDCA cycle and where testing fits in?
There are four steps in a normal software development process. In short, these steps are referred as PDCA.
PDCA stands for Plan, Do, Check, Act.
  • Plan: It defines the goal and the plan for achieving that goal.
  • Do/ Execute: It depends on the plan strategy decided during the plan stage. It is done according to this phase.
  • Check: This is the testing part of the software development phase. It is used to ensure that we are moving according to plan and getting the desired result.
  • Act: This step is used to solve if there any issue is occurred during the check cycle. It takes appropriate action accordingly and revises the plan again.
The developers do the "planning and building" of the project while testers do the "check" part of the project.

2) What is the difference among white box, black box and gray box testing?
Black box Testing: The strategy of black box testing is based on requirements and specification. It requires no need of knowledge of internal path, structure or implementation of the software being tested.
White box Testing: White box testing is based on internal paths, code structure, and implementation of the software being tested. It requires a full and detail programming skill.
Gray box Testing: This is another type of testing in which we look into the box which is being tested, It is done only to understand how it has been implemented. After that we close the box and use the black box testing.

3) What are the types of defects?
There are three types of defects: Wrong, missing and extra.
Wrong: These defects are occurred due to requirements have been implemented incorrectly.
Missing: It is used to specify the missing things i.e. a specification was not implemented, or the requirement of the customer was not noted properly.
Extra: This is an extra facility incorporated into the product that was not given by the end customer. It is always a variance from the specification but may be an attribute that was desired by the customer. However, it is considered as a defect because the variance from the user requirements.

4) What are the advantages of designing tests early in the life cycle?
It helps you to prevent defects into the code.

5) Tell me about the risk based testing.
Risk based testing is a testing strategy that is based on prioritizing tests by risks. It is based on a detailed risk analysis approach which categorizes the risks by their priority. Highest priority risks are resolved first.
6) What is the difference between preventative and reactive approaches to testing?
Preventative tests are designed earlier and reactive tests are designed after the software has been produced.

7) What is the purpose of exit criteria?
The exit criteria is used to define the completion of the test level.

8) Why the decision table testing is used?
A decision table consists of inputs in a column with the outputs in the same column but below the inputs.
The decision table testing is used for testing systems for which the specification takes the form of rules or cause-effect combination. The reminders you get in the table explore combinations of inputs to define the output produced.

9) What is alpha and beta testing?
These are the key differences between alpha and beta testing:
No.
Alpha Testing
Beta Testing
1)
It is always done by developers at the software development site.
It is always performed by customers at their own site.
2)
It is also performed by Independent testing team.
It is not be performed by Independent testing team.
3)
It is not open to the market and public.
It is open to the market and public.
4)
It is always performed in virtual environment.
It is always performed in real time environment.
5)
It is used for software applications and projects.
It is used for software products.
6)
It follows the category of both white box testing and Black Box Testing.
It is only the kind of Black Box Testing.
7)
It is not known by any other name.
It is also known as field testing.
10) What is Random/Monkey Testing?
Random testing is also known as monkey testing. In this testing, data is generated randomly often using a tool. The data is generated either using a tool or some automated mechanism.
Random testing has some limitations:
  • Most of the random tests are redundant and unrealistic.
  • It needs more time to analyze results.
  • It is not possible to recreate the test if you do not record what data was used for testing.

11) What is the negative and positive testing?
Negative Testing: When you put an invalid input and receive errors is known as negative testing.
Positive Testing: When you put in the valid input and expect some actions that are completed according the specification is known as positive testing.

Hadoop Interview Questions



Hadoop Interview Questions
There is given hadoop interview questions and answers that has been asked in many companies. Let's see the list of top hadoop interview questions.

1) What is Hadoop?
Hadoop is a distributed computing platform. It is written in Java. It consist of the features like Google File System and MapReduce.

2) What platform and Java version is required to run Hadoop?
Java 1.6.x or higher version are good for Hadoop, preferably from Sun. Linux and Windows are the supported operating system for Hadoop, but BSD, Mac OS/X and Solaris are more famous to work.

3) What kind of Hardware is best for Hadoop?
Hadoop can run on a dual processor/ dual core machines with 4-8 GB RAM using ECC memory. It depends on the workflow needs.

4) What are the most common input formats defined in Hadoop?
These are the most common input formats defined in Hadoop:
  1. TextInputFormat
  2. KeyValueInputFormat
  3. SequenceFileInputFormat
TextInputFormat is a by default input format.

5) What is InputSplit in Hadoop? Explain.
When a hadoop job runs, it splits input files into chunks and assign each split to a mapper for processing. It is called InputSplit.

6) How many InputSplits is made by a Hadoop Framework?
Hadoop will make 5 splits as following:
  • One split for 64K files
  • Two splits for 65MB files, and
  • Two splits for 127MB files

7) What is the use of RecordReader in Hadoop?
InputSplit is assigned with a work but doesn't know how to access it. The record holder class is totally responsible for loading the data from its source and convert it into keys pair suitable for reading by the Mapper. The RecordReader's instance can be defined by the Input Format.

8) What is JobTracer in Hadoop?
is a service within Hadoop which runs MapReduce jobs on the cluster.

9) What are the functionalities of JobTracer?
These are the main tasks of JobTracer:
  • To accept jobs from client.
  • To communicate with the NameNode to determine the location of the data.
  • To locate TaskTracker Nodes with available slots.
  • To submit the work to the chosen TaskTracker node and monitors progress of each tasks.

10) Define TaskTracker.
TaskTracker is a node in the cluster that accepts tasks like MapReduce and Shuffle operations from a JobTracker.

11) What is Map/Reduce job in Hadoop?
Map/Reduce is programming paradigm which is used to allow massive scalability across the thousands of server.
Actually MapReduce refers two different and distinct tasks that Hadoop performs. In the first step maps jobs which takes the set of data and converts it into another set of data and in the second step, Reduce job. It takes the output from the map as input and compress those data tuples into smaller set of tuples.

12) What is Hadoop Streaming?
Hadoop streaming is a utility which allows you to create and run map/reduce job. It is a generic API that allows programs written in any languages to be used as Hadoop mapper.

13) What is a combiner in Hadoop?
A Combiner is a mini-reduce process which operates only on data generated by a Mapper. When Mapper emits the data, combiner receives it as input and sends the output to reducer.

14) Is it necessary to know java to learn Hadoop?
If you have a background in any programming language like C, C++, PHP, Python, Java etc. It may be really helpful, but if you are nil in java, it is necessary to learn Java and also get the basic knowledge of SQL.

15) How to debug Hadoop code?
There are many ways to debug Hadoop codes but the most popular methods are:
  • By using Counters.
  • By web interface provided by Hadoop framework.

16) Is it possible to provide multiple inputs to Hadoop? If yes, explain.
Yes, It is possible. The input format class provides methods to insert multiple directories as input to a Hadoop job.

17) What is the relation between job and task in Hadoop?
In Hadoop, A job is divided into multiple small parts known as task.

18) What is distributed cache in Hadoop?
Distributed cache is a facility provided by MapReduce Framework. It is provided to cache files (text, archives etc.) at the time of execution of the job. The Framework copies the necessary files to the slave node before the execution of any task at that node.

19) What commands are used to see all jobs running in the Hadoop cluster and kill a job in LINUX?
Hadoop job - list
Hadoop job - kill jobID

20) What is the functionality of JobTracker in Hadoop? How many instances of a JobTracker run on Hadoop cluster?
JobTracker is a giant service which is used to submit and track MapReduce jobs in Hadoop. Only one JobTracker process runs on any Hadoop cluster. JobTracker runs it within its own JVM process.
Functionalities of JobTracker in Hadoop:
  • When client application submits jobs to the JobTracker, the JobTracker talks to the NameNode to find the location of the data.
  • It locates TaskTracker nodes with available slots for data.
  • It assigns the work to the chosen TaskTracker nodes.
  • The TaskTracker nodes are responsible to notify the JobTracker when a task fails and then JobTracker decides what to do then. It may resubmit the task on another node or it may mark that task to avoid.

21) How JobTracker assign tasks to the TaskTracker?
The TaskTracker periodically sends heartbeat messages to the JobTracker to assure that it is alive. This messages also inform the JobTracker about the number of available slots. This return message updates JobTracker to know about where to schedule task.

22) Is it necessary to write jobs for Hadoop in Java language?
No, There are many ways to deal with non-java codes. HadoopStreaming allows any shell command to be used as a map or reduce function.

Saturday, 28 May 2016

Oracle Interview Questions

Oracle Interview Questions
Oracle is a secured database that is widely used in multinational companies. The frequently asked questions from oracle database are given below.

1) What are the components of physical database structure of Oracle database?
Components of physical database structure are given below.
  • One or more data files.
  • Two or more redo log files.
  • One or more control files.

2) What are the components of logical database structure in Oracle database?
Components of logical database structure.
  • Tablespaces
  • Database's schema objects

3) What is a tablespace?
A database contains Logical Storage Unit called tablespaces. A tablespace is a set of related logical structures. Actually a tablespace groups related logical structures together.

4) What is a SYSTEM tablespace and when it is created?
When the database is created in Oracle database system, it automatically generate a SYSTEM named SYSTEM tablespace. The SYSTEM tablespace contains data dictionary tables for the entire database.

5) What is an Oracle table?
A table is basic unit of data storage in Oracle database. A table contains all the accessible information of a user in rows and columns.

6) In the Oracle version 9.3.0.5.0, what does each number shows?
Oracle version number refers:
  • 9 - Major database release number
  • 3 - Database maintenance release number
  • 0 - Application server release number
  • 5 - Component Specific release number
  • 0 - Platform Specific release number

7) What is bulk copy or BCP in Oracle?
Bulk copy or BCP in Oracle, is used to import or export data from tables and views but it does not copy structure of same data.
The main advantage of BCP is fast mechanism for coping data and you can also take the backup of data easily.

8) What is the relationship among database, tablespace and data file?
An Oracle database contains one or more logical storage units called tablespaces. These tablespaces collectively store whole data of databases and each tablespace in Oracle database consists of one or more files called datafiles. These datafiles are physical structure that confirm with the operating system in which Oracle is running.

9) What is a snapshot in Oracle database?
A snapshot is a replica of a target master table from a single point-in-time. In simple words you can say, snapshot is a copy of a table on a remote database.

10) What is the difference between hot backup and cold backup in Oracle? Tell about their benefits also.
Hot backup (Online Backup): A hot backup is also known as online backup because it is done while the database is active. Some sites can not shut down their database while making a backup copy, they are used for 24 hour a day, 7 days a week.
Cold backup (Offline Backup): A cold backup is also known as offline backup because it is done while the database has been shutdown using the SHUTDOWN normal command. If the database is suddenly shutdown with a uncertain condition it should be restarted with RESTRICT mode and then shutdown with NORMAL option.
For a complete cold backup the following files must be backed up.
All datafiles, All control files, All online redo log files(optional) and the init.ora file (you can recreate it manually).

11) How many memory layers are in the Oracle shared pool?
Oracle shared pools contains two layers:
1.     library cache
2.     data dictionary cache

12) What is save point in Oracle database?
Save points are used to divide a transaction into smaller parts. It allows rolling back of a transaction. Maximum five save points are allowed. It is used to save our data, whenever you encounter an error you can roll back from the point where you save your SAVEPOINT.

13) What is hash cluster in Oracle?
Hash cluster is a technique to store a data in hash table and improve the performance of data retrieval. Hash function is applied on table row's cluster key value and store in hash cluster.

14) What are the various Oracle database objects?
Tables: This is a set of elements organized in vertical and horizontal fashion.
Tablespaces: This is a logical storage unit in Oracle.
Views: It is virtual table derived from one or more tables.
Indexes: This is a performance tuning method to process the records.
Synonyms: This is a name for tables.

15) What is the difference between pre-select and pre-query?
A pre-query trigger fire before the query executes and fire once while you try to query. With the help of this trigger you can modify the where clause part dynamically.
Pre-select query fires during the execute query and count query processing after Oracle forms construct the select statement to be issued, but before the statement is actually issued.
Pre-query trigger fires before Pre-select trigger.

16) How to convert a date to char in Oracle? Give one example.
The to_char() function is used to convert date to character. You can also specify the format in which you want output.
1.     SELECT to_char ( to_date ('12-12-2012''DD-MM-YYYY') , 'YYYY-MM-DD'FROM dual;  
Or,
1.     SELECT to_char ( to_date ('12-12-2012''DD-MM-YYYY') , 'DD-MM-YYYY'FROM dual;  

17) What are the extensions used by Oracle reports?
Oracle reports are use to make business enable with the facility to provide information of all level within or outside in a secure way. Oracle report uses REP files and RDF file extensions.

18) How to convert a string to a date in Oracle database?
Syntax: to_date (string , format)
Let us take an example :
1.     to_date ('2012-12-12''YYYY/MM/DD')  
It will return December 12, 2012.

19) How do you find current date and time in Oracle?
The SYSDATE() function is used in Oracle to find the current date and time of operating system on which the database is running.
1.     SELECT TO_CHAR (SYSDATE, 'MM-DD-YYYY HH24:MI:SS'"Current_Date" FROM DUAL;  

20) What will be the syntax to find current date and time in format "YYYY-MM-DD"?
1.     SELECT TO_CHAR (SYSDATE, 'YYYY-MM-DD HH24:MI:SS'"Current_Date" FROM DUAL;