Saturday, November 26, 2011

Software Testing Life Cycle


Six Sequential Phases of  STLC:

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.

Monday, November 21, 2011

Web Crawler

A Web crawler is a computer program that browses the World Wide Web in a methodical, automated manner or in an orderly fashion. Other terms for Web crawlers are ants, automatic indexers, bots,Web spiders,Web robots,or—especially in the FOAF community—Web scutters

This process is called Web crawling or spidering. Many sites, in particular search engines, use spidering as a means of providing up-to-date data. Web crawlers are mainly used to create a copy of all the visited pages for later processing by a search engine that will index the downloaded pages to provide fast searches. Crawlers can also be used for automating maintenance tasks on a Web site, such as checking links or validating HTML code. Also, crawlers can be used to gather specific types of information from Web pages,such as harvesting e-mail addresses (usually for sending spam).

A Web crawler is one type of bot, or software agent. In general, it starts with a list of URLs to visit, called the seeds. As the crawler visits these URLs, it identifies all the hyperlinks in the page and adds them to the list of URLs to visit, called the crawl frontier. URLs from the frontier are recursively visited according to a set of policies.

The large volume implies that the crawler can only download a fraction of the Web pages within a given time, so it needs to prioritize its downloads. The high rate of change implies that the pages might have already been updated or even deleted.

The number of possible crawlable URLs being generated by server-side software has also made it difficult for web crawlers to avoid retrieving duplicate content. Endless combinations of HTTP GET (URL-based) parameters exist, of which only a small selection will actually return unique content. For example, a simple online photo gallery may offer three options to users, as specified through HTTP GET parameters in the URL. If there exist four ways to sort images, three choices of thumbnail size, two file formats, and an option to disable user-provided content, then the same set of content can be accessed with 48 different URLs, all of which may be linked on the site. This mathematical combination creates a problem for crawlers, as they must sort through endless combinations of relatively minor scripted changes in order to retrieve unique content.

As Edwards et al. noted, "Given that the bandwidth for conducting crawls is neither infinite nor free, it is becoming essential to crawl the Web in not only a scalable, but efficient way, if some reasonable measure of quality or freshness is to be maintained." A crawler must carefully choose at each step which pages to visit next.

The behavior of a Web crawler is the outcome of a combination of policies:
  • a selection policy that states which pages to download,
  • a re-visit policy that states when to check for changes to the pages,
  • a politeness policy that states how to avoid overloading Web sites, and
  • a parallelization policy that states how to coordinate distributed Web crawlers.

Wednesday, November 9, 2011

Quality assurance engineer's Job & Difference between the testing and quality assurance job


In  quality standards literature we have total three teams. They are -
1. Testing  team
2. Quality Assurance team and
3. Quality engineering team

In the above case, testing team has minimum set of responsibilities and Quality Engineering team has maximum set of responsibilities over all.

Testing team is responsible to develop and execute test cases with "test to break" attitude and find bugs before product/project is released to customers. Thus they are responsible for test development/execution activities.

Quality Assurance (QA) team is actually responsible to cross check whether everyone is following the standards defined by QE team or not. They comment on quality of the product with different analysis. Thus these people are responsible for overall product quality.
The planned systematic activities necessary to ensure that a component, module, or system conforms to established technical requirements.
All actions that are taken to ensure that a development organization delivers products that meet performance requirements and adhere to standards and procedures.
The policy, procedures, and systematic actions established in an enterprise for the purpose of providing and maintaining some degree of confidence in data integrity and accuracy throughout the life cycle of the data, which includes input, update, manipulation, and output.
 (QA) The actions, planned and performed, to provide confidence that all systems and components that influence the quality of the product are working as expected individually and collectively


Quality Engineering (QE) team is responsible to define the set of processes which everyone involved in project/product development should follow. This may include development standards, documentation standards, communication standards, source control standards, various templates and tools that need to be used in this process. Thus these people are responsible to define a quality process.



Tuesday, November 8, 2011

Rollback,Commit,Truncate Example

/* CREATE TABLE */
CREATE TABLE TRUNTEST(ID INT)
/* INSERT TABLE VALUES */
INSERT INTO TRUNTEST  VALUES(5)
/*SELECT TABLE*/
SELECT * FROM TRUNTEST
/* BEFORE SELECT BEGIN TRAN*/
BEGIN TRAN
TRUNCATE TABLE TRUNTEST
SELECT * FROM TRUNTEST
/*TRUNCATE AFTER ROLLBACK TRANSACTION*/
ROLLBACK TRAN
SELECT * FROM TRUNTEST
/*COMMIT TRANSACTION*/
BEGIN TRAN
COMMIT TRAN
SELECT * FROM TRUNTEST

Thursday, November 3, 2011

Types of Software Testing

Black box testing
 Internal system design is not considered in this type of testing. Tests are based on requirements and functionality.
White box testing
 Testing based on an analysis of internal workings and structure of a piece of software. Also known as Glass box Testing. Internal software and code working should be known for this type of testing. Tests are based on coverage of code statements, branches, paths, conditions.
Unit testing
Testing of individual software components or modules. Typically done by the programmer and not by testers, as it requires detailed knowledge of the internal program design and code. may require developing test driver modules or test harnesses.
Integration testing
 Testing of integrated modules to verify combined functionality after integration. Modules are typically code modules, individual applications, client and server applications on a network, etc. This type of testing is especially relevant to client/server and distributed systems.
Incremental integration testing
 Bottom up approach for testing i.e continuous testing of an application as new functionality is added; Application functionality and modules should be independent enough to test separately. done by programmers or by testers.
Functional testing
This type of testing ignores the internal parts and focus on the output is as per requirement or not. Black-box type testing geared to functional requirements of an application.
System testing
 Entire system is tested as per the requirements. Black-box type testing that is based on overall requirements specifications, covers all combined parts of a system.
End-to-end testing
Similar to system testing, involves testing of a complete application environment in a situation that mimics real-world use, such as interacting with a database, using network communications, or interacting with other hardware, applications, or systems if appropriate.
Sanity testing
 Testing to determine if a new software version is performing well enough to accept it for a major testing effort. If application is crashing for initial use then system is not stable enough for further testing and build or application is assigned to fix.
Regression testing
Testing the application as a whole for the modification in any module or functionality. Difficult to cover all the system in regression testing so typically automation tools are used for these testing types.
Acceptance testing
Normally this type of testing is done to verify if system meets the customer specified requirements. User or customer do this testing to determine whether to accept application.
Load testing
Its a performance testing to check system behavior under load. Testing an application under heavy loads, such as testing of a web site under a range of loads to determine at what point the system’s response time degrades or fails.
Stress testing
System is stressed beyond its specifications to check how and when it fails. Performed under heavy load like putting large number beyond storage capacity, complex database queries, continuous input to system or database load.
Performance testing
 Term often used interchangeably with ‘stress’ and ‘load’ testing. To check whether system meets performance requirements. Used different performance and load tools to do this.
Usability testing
User-friendliness check. Application flow is tested, Can new user understand the application easily, Proper help documented whenever user stuck at any point. Basically system navigation is checked in this testing.
Deployment  testing
 Tested for full, partial, or upgrade install/uninstall processes on different operating systems under different hardware, software environment.
Recovery testing
 Testing how well a system recovers from crashes, hardware failures, or other catastrophic problems.
Security testing
Can system be penetrated by any hacking way. Testing how well the system protects against unauthorized internal or external access. Checked if system, database is safe from external attacks.
Compatibility testing
 Testing to ensure compatibility of an application or Web site with different browsers, OSs, and hardware platforms. Compatibility testing can be performed manually or can be driven by an automated functional or regression test suite.
Comparison testing
Comparison of product strengths and weaknesses with previous versions or other similar products.
Alpha testing
Testing of an application when development is nearing completion, Minor design changes may still be made as a result of such testing. Alpha Testing is typically performed by end-users or others, not by programmers or testers.
Beta testing
 Testing when development and testing are essentially completed and final bugs, problems need to be found before the final release. Beta Testing is typically done by end-users or others, not by programmers or testers.
Database Testing
Database testing done manually in real time, it check the data flow between front end back ends. 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 there’ front-end check back-end that addition of record is effected or not. So same for delete, update, Some other database testing checking for mandatory fields, checking for constraints and rules applied on the table , some time check the procedure using SQL Query analyzer