Thursday, April 21, 2011

Testing basics

Software Testing: Software testing is more than just error detection. Software testing is the process, or a series of process used to measure the quality of developed computer software. It is designed to make sure computer code does, what it was designed to do, and that it does not do anything unintended. Software should be predictable and consistent, offering no surprises to users.
“Testing is the process of establishing confidence that a program does what it is supposed to do.”

Purpose of testing: The purpose of testing is verification, validation and error detection in order to find problems – and the purpose of finding those problems is to get them fixed.
“The purpose of testing is to show that a program performs its intended functions correctly.”
“The purpose of software testing is to deliver a bug free product, which meets the all the customer requirements, with maximum customer satisfaction” 

Manual Software Testing: Manual testing is the method used to check software for defects manually. A tester plays the role of an end user, verifies and validates the software behavior/functionality through running the application manually. Normally. For the completeness of testing, the tester follows a written test plan that leads through a set of test cases.
 "The part of software testing that requires human inputs, analysis, or evaluations."

Stages of Manual Testing:  The entire process of manual testing goes through four phases.
  1. Unit Testing: It is the job of the developer to test the units of the code written by the developer himself.
There is no syntax or logical or runtime error in there coding”
  1. Integration Testing: It is carried out, when bigger chunks of codes are integrated to form a bigger block of code. Either black box or white box testing is carried out in this phase.
Test is to ensure that various system parts of related components and programs work properly together.
  1. System Testing: The software is tested for all possibilities to rule out any kind of abnormality in the system. Normally black box testing technique is used in the system testing phase.
Validate the requirement of software in all aspects and environment
  1. User Acceptance Testing: In this phase, the software is tested keeping the end user in mind. There are two types of acceptance testing, which are used, namely alpha testing and beta testing.
UAT testing should certify that the requirements meet user expectations.

Software Development Life Cycle: The Software Development Life Cycle is a step-by-step process involved in the development of a software product. The whole process is generally classified into a set of steps and a specific operation will be carried out in each of the steps.
1)     Planning
2)     Analysis
3)     Design
4)     Development
5)     Implementation
6)     Testing
7)     Deployment
8)     Maintenance

Software Testing Life Cycle: Software testing life cycle consists of the various stages of testing through which a software product goes. 

1) Requirements stage
     a.Requirement Specification documents
     b.Functional Specification documents
     c.Use case Documents
     d.Test Trace-ability Matrix for identifying Test Coverage.
 
2) Test Plan
     a.Test Scope, Test Environment
     b.Different Test phase and Test Methodologies
     c.Manual and Automation Testing
     d.Defect Mgmt, Configuration Mgmt, Risk Mgmt. Etc
 
3) Test Design
    a.Test Case preparation.
    b.Test Traceability Matrix for identifying Test Cases
    c.Test case reviews and Approval
 
4) Test Execution
    a.Executing Test cases 
    b.Capture, review and analyze Test Results
 
5)  Defect Tracking
    a.Find the defect & tracking for its closure.
 
6)  Bug Reporting
    a.Report the defect on tool/Excels

Software Testing Strategy: A Test Strategy document is a high level document and normally developed by project manager. This document defines “Testing Approach” to achieve testing objectives. The Test Strategy is normally derived from the Business Requirement Specification document.

The Test Strategy document is a static document meaning that it is not updated too often. It sets the standards for testing processes and activities and other documents such as the Test Plan draws its contents from those standards set in the Test Strategy Document.

Some companies include the “Test Approach” or “Strategy” inside the Test Plan, which is fine and it is usually the case for small projects. However, for larger projects, there is one Test Strategy document and different number of Test Plans for each phase or level of testing.
Test Strategy is a company level document developed by quality analyst people. This document defines the testing approach to be followed by the testing team. It consists of

1) Scope and objective: The purpose of testing in an organization
2) Business issues: Budget control for testing
3) Testing approach: That is the TRM (Test responsibility Matrix)
4) Test Deliverables: Names of the testing documents to be prepared by the Testing Team.
5) Roles and Responsibilities: Names of jobs in the testing team and their responsibilities
6)Communication and status reporting: Required negotiation between two jobs in a team
7) Test automation and Tools: Availability of testing tools and purpose of automation
8) Defect reporting and Tracking: required negotiation between testing and development teams
9) Risks and Mitigations: Expected failures during testing and solutions to overcome
10) Change and Configuration management: How to handle sudden changes in customer requirements.
11) Training plan

Software Testing Techniques: Black box and white box are two software testing methods.

The White-Box testing techniques are: -
1)     Statement coverage.
2)     Decision coverage.
3)     Condition coverage.
4)     Decision-condition coverage.
5)     Multiple condition coverage.
6)     Basis Path Testing.
7)     Loop testing.
8)     Data flow testing.

The most popular Black box testing techniques are:-
1)     Equivalence Partitioning.
2)     Boundary Value Analysis.
3)     Cause-Effect Graphing.
4)     Error-Guessing.
  
Software Testing Methodologies: There are different software testing models, which the software testing team can choose from. Each of these models has different methods, as they are based on different principles. A number of factors are taken into consideration, before a particular model is chosen. 

The different models that are used are:
1)     Waterfall model
2)     V model
3)     Spiral model
4)     RUP
5)     Agile model
6)     RAD

Software Testing Approached: The test approach defines the scope and general direction of the test effort. It is a high-level description of the important issues needing to be covered in the test plan and test scripts. 

For each testing phase, a detailed test plan shall be developed that identifies the testing requirements specific to that phase. Specific items to be identified in each test plan shall include:

  1. Test Items
  2. Test Execution Procedures
  3. Test Deliverables
  4. Test Data Management
  5.  Test Schedule
  6. Test Environment

Test Plan: The Test Plan document is usually prepared by the Test Lead or Test Manager and the focus of the document is to describe what to test, how to test, when to test and who will do what test.

It is not uncommon to have one Master Test Plan which is a common document for the test phases and each test phase have their own Test Plan documents.
Test Manager is “controlling” the activities, the test plan should be updated to reflect any deviation from the original plan. After all, Planning and Control are continuous activities in the formal test process.

1. Test Plan Identifier 
2. References 
3. Introduction 
4. Test Items 
5. Software Risk Issues 
6. Features to be Tested 
7. Features not to be Tested 
8. Approach 
9. Item Pass/Fail Criteria 
10. Suspension Criteria and Resumption Requirements 
11. Test Deliverables 
12. Remaining Test Tasks 
13. Environmental Needs 
14. Staffing and Training Needs 
15. Responsibilities 
16. Schedule 
17. Planning Risks and Contingencies 
18. Approvals 
19. Glossary 

This is a standard approach to prepare test plan and test strategy documents, but things can vary company-to-company.


Test scenario: Test scenarios and test cases are used as synonymously. Test scenarios are the name of test cases that insures the business process flows are tested from end to end. Test scenarios is the independent tests, that follow each other where each of them dependent upon the output of previous one.

Test case: Test case is the subset of the test scenarios, which is derived from SRS/FRS. A test case a set of conditions or variables under which a tester will determine whether an application or software is working correctly or not.

Following are the element of test cases:
1)     Pre conditions
2)     Step to execute
3)     Executed behavior
4)     Pass/ Fail criteria

For Example:
Test scenario – User login
Test condition – User name max length is 8 characters and passwords must not be greater than 8 characters and it should be alphabetic.
Test case –    1. Enter valid user name and password.
                        2. Enter invalid username and valid password.
                        3. Enter Valid username and invalid password.
                        4. Enter invalid user name and invalid password.


Test Suite: Test suite is nothing, a set of test cases, which is especially colleted for validating the behavior of an application area or module.  



Test Case: A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system is working correctly or not. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle.

Or

A set of test data and test programs (test scripts) and their expected results. A test case validates one or more system requirements and generates a pass or fail.

A test case is also defined as a sequence of steps to test the correct behavior of a functionality/feature of an application" 



Test case components:

  • Project and Module name
  • Test case created by
  • Test case verified by
  • Test environment
  • Pre condition post condition
  • Steps of the test case
  • Expected results
  • Status
  • Comments

Test case Vs Test Scenarios: A set of test cases that ensure that the business process flows are tested from end to end. They may be independent tests or a series of tests that follow each other, each dependent on the output of the previous one. The terms "test scenario" and "test case" are often used synonymously.



Bug life cycle: In software testing, every bug is going to fix through a process, here process contains multiple steps taken by testers, developer and their lead. This process of closing the bug prom its beginning is called bug life cycle.

Bug life cycle contain the following status

  • New
  • Assigned
  • Resolved
  • Verified
  • Closed
  • Reopened

Severity and Priority

Severity: Severity describes the impact of the defect on application or impact on its business process. How much it is affecting the user.

Priority: Severity describes the urgency of issue in terms of fixing, means when the development team is going to fix the issue.
 

No comments:

Post a Comment