Showing posts with label study. Show all posts
Showing posts with label study. Show all posts

Thursday, 14 April 2016

JAVA INTERVIEW QUESTIONS FOR 4 YEARS EXPERIENCED CANDIDATES

1. What is the difference between a constructor and a method?
  • A constructor is a member function of a class that is used to create objects of that class. It has the same name as the class itself, has no return type, and is invoked using the new operator.
  • A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator.
2. What is the purpose of garbage collection in Java, and when is it used?
  • The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used.
3. Describe synchronization in respect to multi threading?
  • With respect to multi threading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable. This usually leads to significant errors.
4. What is an abstract class?
  • Abstract class must be extended/sub classed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie. you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract itself, and must be declared as such. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.
5. What is the difference between an Interface and an Abstract class?
  • An abstract class can have instance methods that implement a default behaviour. An Interface can only declare constants and instance methods, but cannot implement default behaviour and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavours of class members (private, protected, etc.), but has some abstract methods.
6. Explain different way of using thread?
  • The thread could be implemented by using runnable interface or by inheriting from the Thread class. The former is more advantageous, 'cause when you are going for multiple inheritance, the only interface can help.

QTP ENTIRE SYLLABUS FOR EXPERTS AND QTP PROFESSIONALS

                                      Detailed Syllabus


1)   Introduction
  • What is Test Automation?
  • When Should Test Automation Be Used?                                    
  • When Should Test Automation Be Avoided?                                 
  • The Automated Testing Process                                           
  • What is HP Quick Test Professional (QTP)                                 
2) QTP’s Recording and Identification Logic
  • Logic behind QTP’s Recording Process
  • Logic behind QTP’s Identification and Replay Process
  • How to use Identification Dialog box before start recording
  • Normal Recording, Low Level Recording & Analogue Recording with live examples
3 ) Object Repository (OR)
  • How objects are added to the OR                                         
  • Test and Run-time Objects with TO Properties                                                        
  • Object Repository Modes                                               
  • Per-Action versus Shared Object Repository                                
  • The Object Spy                                                       
  • User-defined Objects                                                   
  • Object Repository Shortcomings                                         
 4) Data Tables 
  • Design and run-time data table                                                  
  • When to use the global or a local data table                                
  • Setting data table iterations     
  • Data table object model
  • Data Table Object’s Methods and Properties by real examples                                           
  • Data table formatting 
5)  Actions
  • Types of Actions                                                     
  • Inserting Calls to Actions                                              
  • Insert Call to New…                                                  
  • Insert Call to Existing…                                               
  • Insert Call to Copy…                                            
6 ) QTP Environment Variables
  • Types of Environment variables                                         
  • Environment Object                                                  
  • Environment Variable using (.ini Extension) through script and example

JAVA IMPORTANT INTERVIEW QUETIONS WITH ANSERS

1. What is the most important feature of Java?
  • Java is a platform independent language.
2. What do you mean by platform independence?
  • Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).
3. What is a JVM?
  • JVM is Java Virtual Machine which is a run time environment for the compiled java class files.
4. Are JVM's platform independent?
  • JVM's are not platform independent. JVM's are platform specific run time implementation provided by the vendor.
5. What is the difference between a JDK and a JVM?
  • JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.
6. What is a pointer and does Java support pointers?
  • Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn't support the usage of pointers.

what is Database testing - this Question is most important for real time interview point of view

Here are the Displayed Question which are most important for real time interview point of view, so read complete questions. 


1). what is Database testing?

 Testing the back end databases like comparing   the actual results   with expected results.

2). what is database testing and what we test in database testing?

Data bas testing basically include the following.
1) Data validity testing.
2) Data Integrity testing
3) Performances related to database.
4) Testing of Procedure, triggers and functions.

For doing data validity testing you should be good in SQL queries
For data integrity testing you should know about referential integrity and different constraint.
For performance related things you should have idea about the table structure and design.
For testing Procedure triggers and functions you should be able to understand the same.

3). What we normally check for in the Database Testing?

Database testing involves some in-depth knowledge of the given application and requires more defined plan of approach to test the data. Key issues include:
1) data Integrity
2) data validity
3) data manipulation and updates.

Tester must be aware of the database design concepts and implementation rules

4). How to Test database in Manually? Explain with an example?

Observing that operations, which are operated on front-end is effected on back-end or not.
The approach is as follows:
While adding a record thru' front-end check back-end that addition of record is effected or not.
So same for delete, update...
Ex: Enter employee record in database thru' front-end and check if the record is added or not to the back-end (manually).

Data base testing for Testers

5). How to test a SQL Query in WinRunner? With out using Database Checkpoints?

  By writing scripting procedure in the TCL we can connect to the database and we can test database and      queries.

6). How does you test whether a database in updated when information is entered in the front end?

With database check point only in Win Runner, but in manual we will go to front end using some information. Will get some session names using that session names we search in back end. If that information is correct then we will see query results.

7). What are the different stages involved in Database Testing?

In Database testing we need to check for,
1. The field size validation
2. Check constraints.
3. Indexes are done or not (for performance related issues)
4. Stored procedures.
5.The field size defined in the application is matching with that in the db.

8). What SQL statements have you used in Database Testing?

DDLDDL is Data Definition Language statements. Some examples: · CREATE · ALTER - · DROP -· TRUNCATE -· COMMENT - · RENAME - DMLDML is Data Manipulation Language statements. Some examples: · SELECT - · INSERT - · UPDATE - · DELETE - · MERGE - UPSERT -· CALL - · EXPLAIN PLAN - · LOCK TABLE - DCLDCL is Data Control Language statements. Some examples: · GRANT - · REVOKE - · COMMIT - · SAVEPOINT - · ROLLBACK - COMMIT -· SET TRANSACTION - This are the Database testing commands.

9). How to use SQL queries in WinRunner/QTP?

In QTP
Using output database check point and database check point,
Select SQL manual queries option 
And enter the "select" queries to retrieve data in the database and compare 
The expected and actual.

10). What steps does a tester take in testing Stored Procedures?

 In my view, the tester has to go through the requirement, as to why the particular stored procedure is written for? And check whether all the required indexes, joins, updates, deletions are correct comparing with the tables mentions in the Stored Procedure.  And also he has to ensure whether the Stored Procedure follows the standard format like comments, updated by, etc.

Wednesday, 6 April 2016

Factors which affect the test effort

The factors which affect the test effort are:

  • While good project documentation is a positive factor, it’s also true that having to produce detailed documentation, such as meticulously specified test cases, results in delays. During test execution, having to maintain such detailed documentation requires lots of effort, as does working with fragile test data that must be maintained or restored frequently during testing.
  • Increasing the size of the product leads to increases in the size of the project and the project team. Increases in the project and project team increases the difficulty of predicting and managing them. This leads to the disproportionate rate of collapse of large projects.
  • The life cycle itself is an influential process factor, as the V-model tends to be more fragile in the face of late change while incremental models tend to have high regression testing costs.
  •  Process maturity, including test process maturity, is another factor, especially the implication that mature processes involve carefully managing change in the middle and end of the project, which reduces test execution cost.
  • Time pressure is another factor to be considered. Pressure should not be an excuse to take unwarranted risks. However, it is a reason to make careful, considered decisions and to plan and re-plan intelligently throughout the process.
  • People execute the process, and people factors are as important or more important than any other. Important people factors include the skills of the individuals and the team as a whole, and the alignment of those skills with the project’s needs. It is true that there are many troubling things about a project but an excellent team can often make good things happen on the project and in testing.
  • Since a project team is a team, solid relationships, reliable execution of agreed-upon commitments and responsibilities and a determination to work together towards a common goal are important. This is especially important for testing, where so much of what we test, use, and produce either comes from, relies upon or goes to people outside the testing group. Because of the importance of trusting relationships and the lengthy learning curves involved in software and system engineering, the stability of the project team is an important people factor, too.
  • The test results themselves are important in the total amount of test effort during test execution. The delivery of good-quality software at the start of test execution and quick, solid defect fixes during test execution prevents delays in the test execution process. A defect, once identified, should not have to go through multiple cycles of fix/retest/re-open, at least not if the initial estimate is going to be held to.

What is STLC (Software Testing Life Cycle)

STLC - Software Testing Life Cycle :

There is a systematic cycle to software testing, although it varies from organization to organization
Software Testing Life Cycle:
Software testing life cycle or STLC refers to a comprehensive group of testing related actions specifying details of every action along with the specification of the best time to perform such actions. There can not be a standardized testing process across various organizations, however every organization involved in software development business, defines & follows some sort of testing life cycle.
STLC by & large comprises of following Six Sequential Phases: 
1) Planning of Tests
2) Analysis of Tests
3) Designing of Tests 
4) Creation & Verification of Tests
5) Execution of Testing Cycles
6) Performance Testing, Documentation
7) Actions after Implementation
Every company follows its own software testing life cycle to suit its own requirements, culture & available resources. The software testing life cycle can’t be viewed in isolation, rather it interacts with the every phase of Software Development Life Cycle (SDLC). Prime focus of the software testing life cycle is on managing & controlling all activities of software testing. Testing might be manual testing or an automated testing using some tool.
1) Planning of Tests:
In this phase a senior person like the project manager plans & identifies all the areas where testing efforts need to be applied, while operating within the boundaries of constraints like resources & budget. Unless judicious planning is done in the beginning, the result can be catastrophic with emergence of a poor quality product, dissatisfying the ultimate customer. Planning is not limited just to the initial phase, rather it is a continuous exercise extending till the end. 
During the planning stage, the team of senior level persons comes out with an outline of Testing Plan at High Level. The High Level Test Plan comprehensively describes the following:

  • Scope of Testing : Defining the areas to be tested, identification of features to be covered during testing
  • Identification of Approaches for Testing: Identification of approaches including types of testing
  • Defining Risks: Identification of different types of risks involved with the decided plan
  • Identification of resources : Identification of resources like man, materials & machines which need to be deployed during Testing
  • Time schedule: For performing the decided testing is aimed to deliver the end product as per the commitment made to the customer. 


Involvement of software testers begins in the planning phase of the software development life cycle. During the design phase, testers work with developers in determining what aspects of a design are testable and with what parameters those tests will work.
2) Analysis of Tests:
Based upon the High Level Test Plan Document, further nitty-gritty’s covering the following are worked out.
  • Identification of Types of Testing to be performed during various stages of Software Development Life Cycle.
  • Identification of extent to which automation needs to be done.
  • Identification of the time at which automation is to be carried out.
  • Identification of documentation required for automated testing

The Software project can’t be successful unless there is frequent interaction among various teams involved in Coding & Testing with the active involvement of the Project Managers, Business Analysts or even the customer. Any deficiencies in the decided test plans come to the surface, during such meetings of cross-functional teams. This provides an opportunity to have a rethinking & refining the strategies decided for testing.
Based upon the customer requirements a detailed matrix for functional validation is prepared to cover the following areas:
  • Ensure that each & every business requirement is getting covered through some test case or the other.
  • Identification of the test cases best suited to the automated testing
  • Identification of the areas to covered for performance testing and stress testing
  • Carry out detailed review of documentation covering areas like Customer Requirements, Product Features & Specifications and Functional Design etc.

3) Designing of Tests:
This phase involves the following:
  • Further polishing of various Test Cases, Test Plans
  • Revision & finalization of Matrix for Functional Validation.
  • Finalization of risk assessment methodologies.
  • In case line of automation is to be adopted, identification of test cases suitable for automation.
  • Creation of scripts for Test cases decided for automation.
  • Preparation of test data.
  • Establishing Unit testing Standards including defining acceptance criteria
  • Revision & finalization of testing environment.

4) Construction and verification:
This phase involves the following:
  • Finalization of test plans and test cases
  • Completion of script creation for test cased decided for automation.
  • Completion of test plans for Performance testing & Stress testing.
  • Providing technical support to the code developers in their effort directed towards unit testing.
  • Bug logging in bug repository & preparation of detailed bug report.
  • Performing Integration testing followed by reporting of defects detected if any.

5) Execution of Testing Cycles:
This phase involves the following:
  • Completion of test cycles by executing all the test cases till a predefined stage reaches or a stage of no detection of any more errors reach.
  • This is an iterative process involving execution of Test Cases, Detection of Bugs, Bug Reporting, Modification of test cases if felt necessary, Fixing of bugs by the developers & finally repeating the testing cycles.

6) Performance Testing, Documentation & Actions after Implementation:
This phase involves the following:
  • Execution of test cases pertaining to performance testing & stress testing.
  • Revision & finalization of test documentation
  • Performing Acceptance testing, load testing followed by recovery testing
  • Verification of the software application by simulating conditions of actual usage.

7) Actions after Implementation:
This phase involves the following:
  • Evaluation of the entire process of testing.
  • Documentation of TGR (Things Gone Right) & TGW (Things Gone Wrong) reports. Identification of approaches to be followed in the event of occurrence of similar defects & problems in the future.
  • Creation of comprehensive plans with a view to refine the process of Testing.
  • Identification & fixing of newly cropped up errors on continuous basis.

Winding up of the test environment & restoration of all test equipment to the original base line conditions. 

What is SDLC (Software Development Life Cycle)

SDLC - Software Development Life Cycle :

Software products, which don’t happen to be user friendly just, don’t find any place in a highly competitive market of this modern era, although they might have been developed with the help of the best available technology. The ease of use of the product is of paramount importance compared to its internal technology, which the customer is not going to see.

Thus for the creation of Innovative Software products, the Development Life Cycle undergoes six phases like:

1) Initial Phase 
2) Analysis Phase
3) Design phase
4) Coding Phase
5) Testing Phase
6) Delivery and Maintenance phase

Phase – 1: Initial Phase: Involves Interaction with the customer and capturing all the requirements.
Personnel Involved: 1) Business Annalist – BA & 2) Engagement Manager - EM
Process Involved: This phase begins with a technical meeting between the Business Analyst & the customer. The Business Analyst (BM) understands all the requirements from the customer & prepares comprehensive requirements document with the help of standard templates & check sheets used by the company. The requirements document forms the basis for further study & action by the Engagement Manager (EM). 

The Engagement Manager tries to hunt for extra requirements if any, which might not be apparent immediately but might involve extra cost. To resolve ambiguous requirements if any, the Engagement Manager organizes demonstration of a prototype if necessary. Such action of quick demonstration of a prototype, which is nothing but a rapidly developed model for the customer is found extremely helpful to remove ambiguities from the requirements on one hand & help winning the confidence of the customer on the other.

Ultimate objective of this phase is to prepare a most comprehensive customer requirements document. Many companies call it with different names like: 
# BRS: Business Requirement Specification.
# FRS: Functional Requirement Specification.
# URS: User Requirement Specification.
# CRS: Client / Customer Requirement Specification.
# BDD: Business Design Document.
# BD  : Business Document.
Depending upon the system followed by various companies, sometimes a single document is maintained, while some companies may go in for two documents. In this case, Broad / outlining information is recorded in the BRS (Business Requirement Specification), while detailed information is recorded in FRS (Functional Requirement Specification).
                                    
Phase – 2: Analysis Phase: Involves Feasibility Study, Broad Planning, Technology selection, Requirement analysis etc.
Personnel Involved: 1) System Annalist – SA, 2) Project Manager – PM & 3) Team Manager -TM

Process Involved: To understand the nature of the program to be developed, the System Annalist focuses on understanding the information domain of the software, its necessary functions, behaviors, performance and necessary interfaces etc. The major objective of the analysis phase is to find out the need and to define the problem, which needs to be solved.
The process covers four distinct analytical operations like:
1) Feasibility Study: Involves detailed study of all the requirements to ascertain as to whether it is possible to meet all the requirements or not. There may be a need for the development team to visit the customer place for study of their system. They development team may investigate the need for possible software automation within the boundaries of the given system. 
2) Broad Planning: Involves an outline document on planning of all resource and time wise planning.
3) Technology Selection: Involves identification, analysis & compilation of various tools & technologies, which would be needed to accomplish the project successfully.
4) Requirement analysis: Involves identification & compilation of various requirements of human resources, hardware & software, which would be needed to accomplish the project successfully.
Ultimate objective of this phase is to prepare a most comprehensive document called SRC or Software Requirement Specification.

Phase – 3: Design Phase: Involves hard core design activities like 1) HLD - High Level Designing & 2) LLD - Low Level Designing
Personnel Involved: 1) Chief Architect – CA is responsible for High Level Designing, 2) Technical Lead – TL is responsible for Low Level Designing

Process Involved: The Chief Architect – CA, starts The entire designing process. This involves subdivision of the entire project into various modules & the process is adequately explained with the help of flow charts & diagrams. Thereafter, the Technical Lead – TL further subdivides these main Modules into sub modules with the help of Unified Modeling Language - UML. The technical lead is responsible for creating the Pseudo Code which is a comprehensive set of instructions written in English language & are meant for guiding the actual code developers.

Ultimate objective of this phase is to prepare a Technical Design Document - TDD.

Phase – 4: Coding Phase: Involves actual Programming or Coding.

Personnel Involved: Code Developers or Programmers 

Process Involved: The design needs to be translated into a machine-readable form. There comes the process of code generation. With the help of Pseudo Code written by the Technical Lead – TL during the Design Phase, Developers carry out the development of the actual source code. The entire coding process is bound by stipulated coding standards defined by the company.

Ultimate objective of this phase is to prepare a Source Code Document - SCD.

Phase – 5: Testing Phase: Involves rigorous testing of the application developed by the programmers.

Personnel Involved: Testing Engineers. 

Process Involved: Different testing methodologies are practiced to detect the software bugs, which happen to take birth during the previous phases. Various testing tools and methodologies are available these days. Some companies create their own testing tools, which are custom made to suit their own development functions.

# In fact the testing process begins right from the customer requirement document. A good test engineer starts his work by thorough study of the requirement document. In case of any doubt arising during understanding of customer requirements, the test engineer raises a Review Report –RR, which contains details of all the doubts.

# Having clarified all the doubts & ambiguities, and after having a thorough understanding of the requirements, the test engineer shall write the test cases with the help of company specific test case templates.
# Execution of the test cases upon the release of the first build by the developers. This follows recording of defects in a defect profile document.
# The defect profile document is transferred to the developers for improvements / eradication of defects found by them. The testing process halts here till next build with improvements is released by the developers.
# The entire testing process involving execution of test cases is repeated on the new build. This process of code improvement, subsequent testing on new builds & finding of defects continues again and again till the product is free from defects.
# The testing process is decided to be stopped after gaining reasonable confidence of product being defect free
Ultimate objective of this phase is to produce a Quality Product.

Phase – 6: Delivery and Maintenance phase: Involves Installing the newly developed application under the client environment.

Personnel Involved: Senior Testing Engineers who are entrusted the task of Deployment Engineers.
Process Involved: 
# Delivery: After the code is appropriately tested, it is approved for release, it is deployed into a production environment. The deployment of application is done with the help of guidelines provided in the application deployment document.

# Maintenance: After the deployment of the application, client may encounter many task-based problems. 

Maintaining and enhancing the software to cope up with newly discovered problems or new requirements can take far more time than the initial development of the software. It may be necessary to add some code, which does not fit the original design to correct an unforeseen problem. It may be that the customer is requesting more functionality, and some code can be added to take care of his requests.