174
Pre-ILP Home Assurance Lounge Logout Course Completion Quiz Assurance 1.Introduction to Testing Q 2.SDLC and STLC Q 3.Testing as a career Q 4.Qualities of a Tester Q 5.Database Concepts Q 6.Data Query Language Q 7.DDL, DML & TCL Q 8.Single Row, Aggregate / Group functions in SQL Q 9.Categories of testing Q 10.Testing Techniques Q 11.Levels of testing & test cases Q 12.Defect Management Q 13.Automation Testing Q 1.Introduction to Testing Objective Introduction to Software Testing Importance of Software Testing What is testing? A procedure for critical evaluation or a means of determining the presence, quality, or genuineness of something is termed as testing. In general, Campus Commune 8/5/2014 https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-testing-0 1 / 174

Assurance Lounge

Embed Size (px)

DESCRIPTION

testing pdf

Citation preview

Page 1: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

1.Introduction to Testing

ObjectiveIntroduction to Software Testing

Importance of Software Testing

What is testing?

A procedure for critical evaluation or a means of determining the presence, quality, or genuineness of something is termed as testing. In general,

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-testing-0 1 / 174

Page 2: Assurance Lounge

testing is finding out how well something works.

What is Software?

Software is a set of instructions to perform some task. Software is used in many applications of the real world. Some of the examples are

Application software, such as word processors

Firmware in an embedded system

Middleware, which controls and co-ordinates distributed systems

System software such as operating systems

Video Games

Websites

Software is both a product and a vehicle for delivering a product (information). It is not manufactured but engineered. As time goes, the softwaredeteriorates during changing conditions and requirements.

All of these software applications need to run without any error and provide a quality service to the user of the application. In this regard thesoftware has to be tested for its accuracy and correctness.

Introduction to Software Testing

Software Testing is the process which ensures that the system or application is free from the inconsistency or unusual behaviour and working as perthe expected behaviour or requirements. It is a critical element in the software development life cycle and has the potential to save time and moneyby identifying problems early and to improve customer satisfaction by delivering a more defect-free product.

Software Testing can be defined in simple words as “Performing Verification and Validation of the Software Product” for its correctness and accuracyof working.

IEEE Definition

Software testing is the process of analysing a software item to detect the differences between existing and required conditions (that is, bugs) and

to evaluate the features of the software item.

Importance of Software Testing

“A clever person solves a problem. A wise person avoids it.”

Albert Einstein

Why is testing necessary?

Complexity of software makes it error prone

Untested or weakly tested software can cause losses in real life.

To learn about reliability of software

To stay in business

Software testing answers questions that development and code reviews cannot.

Does it really work as expected?

Does it meet the users’ requirements?

Is it what the users expect?

Do the users like it?

Is it compatible with our other systems?

How does it perform?

How does it scale when more users are added?

Which areas need more work?

Is it ready for release?

Examples of Importance of Software Testing.

ISRO calls off GSLV launch after fuel leak.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-testing-0 2 / 174

Page 3: Assurance Lounge

Because of the final flight test ISRO could identify the problem and called off the launch and thus saved millions and millions of RS

http://www.thehindu.com/news/national/isro-calls-off-gslv-launch-after-fuel-leak/article5038402.ece

NASA Mars Polar Lander

NASA Mars Polar Lander – 1999 – Malfunction due to an unexpected setting of a single data bit

Disney’s Lion King

Disney’s Lion King – 1994 – 1995- The software did not work on the most common systems that the public had

Related Videos

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-testing-0 3 / 174

Page 4: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

2.SDLC and STLC

ObjectiveIntroduction to Software Development Life Cycle(SDLC)

SDLC Phases

SDLC Models

Introduction to Software Testing Life Cycle(STLC)

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/course-2-sdlc-and-stlc 4 / 174

Page 5: Assurance Lounge

STLC Phases

2.1 Introduction to Software Development Life Cycle

2.2 SDLC Models

2.3 Introduction to Software Testing Life Cycle

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/course-2-sdlc-and-stlc 5 / 174

Page 6: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

2.1. Introduction to Software Development Life CycleSoftware Development Life Cycle (or SDLC) is the process which is followed to develop a software product. It is a structured way of buildingsoftware applications. Most organizations have a process in place for developing software; this process may, at times, be customized based on theorganizations requirement and framework followed by organization. Life Cycle Model is one specific embodiment of a software process

SDLC Phases

The software development life cycle (SDLC) is a framework defining tasks performed at each step in the software development process.

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-development-life-cycle 6 / 174

Page 7: Assurance Lounge

The software development life cycle (SDLC) is a framework defining tasks performed at each step in the software development process.

It consists of a detailed plan describing how to develop, maintain, replace and alter or enhance specific software.

The life cycle defines a methodology for improving the quality of software and the overall development process.

The following picture depicts the phases that are part of a development cycle.

Requirements Gathering

A Software Requirement Specification or SRS is a document which records expected behavior of the system or software which needs to bedeveloped.

Design

Software design is the blueprint of the system, which once completed can be provided to developers for code development.

Based on the components in design, they are translated into software modules/functions/libraries, etc and these pieces together form a softwaresystem.

Coding

During this phase, the blueprint of the software is turned to reality by developing the source code of the entire application.

Time taken to complete the development depends on the size of the application and number of programmers involved.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-development-life-cycle 7 / 174

Page 8: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

2.2. SDLC ModelsThere are various software development life cycle models defined and designed which are followed during software development process.

These models are also referred as "Software Development Process Models".

Each process model follows a Series of steps unique to its type, in order to ensure success in process of software development.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/sdlc-models 8 / 174

Page 9: Assurance Lounge

Waterfall Model

In the Waterfall model, the different phases of the software development life cycle are explicitly recognized as mentioned in picture below: .

In this model, the project takes a straight line path.Since different phases are explicitly recognized,the finalisation of the Contract is seen withreference to delivery and payment schedules of different phases.

The waterfall model is the oldest and most widely used in software development life cycle. It is also known as sequential model. Each phase must becompleted before the next phase begins. At the end of each review takes place to determine if the project is on the right track or not.

Since requirement validation is not done in an explicit manner,it may result in design and development of large quantities of unusable code. It mayalso result in extensive rework later,as document-driven standards, force elaborate specifications of poorly understood user interfaces and decision-support functions.

Advantages

Below are some of the advantages of the Waterfall ModelSimple and easy to use.Easy to manage due to the rigidity of the model – each phase has specific deliverable and a review process.Phases are processed and completed one at a time.Works well for smaller projects where requirements are very well understood.

Disadvantages

Adjusting scope during the life cycle can kill a projectNo working software is produced until late during the life cycle.High amounts of risk and uncertainty.Poor model for complex and object-oriented projects.Poor model where requirements are at a moderate to high risk of changing.

V-Model

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/sdlc-models 9 / 174

Page 10: Assurance Lounge

V- model is a sequential path of execution of processes. Each phase must be completed before the next phase begins. Testing is emphasized in thismodel more so than the waterfall model though. The testing procedures are developed early in the life cycle before any coding is done, during eachof the phases preceding implementation. Testing of the product is planned in parallel with a corresponding phase of development.

Advantages

Simple and easy to useEach phase has specific deliverableHigher chance of success over the waterfall model due to the development of test plans early on during the life cycleWorks well for where requirements are easily understood

Disadvantages

Very inflexible, like the waterfall modelLittle flexibility and adjusting scope is difficult and expensiveSoftware is developed during the implementation phase, so no early prototypes of the software are producedModel does not provide a clear path for problems found during testing phases

The Spiral ModelA well-managed development project should take a straight line approach,right from feasibility report to analysis, design, testing, and acceptance tooperation. But in actuality, the project needs to proceed iteratively by taking a spiral path. The project starts with the analysis phase, then proceedstowards design, moves back to analysis and then design, followed by coding (version 1.0) and back to design and so forth.

The basic idea behind this model is that you start on a small scale,in the middle of the core functionality, explore the risks (such as poorlyunderstood requirements and architecture, potential performance problems, problems in underlying technology etc.) and then make a plan tohandle the risks. This should be followed by a commitment to approach, for the next iteration. Each iteration moves your project to a larger scale.One layer of the project is rolled first, to check what was actually wanted, and then, work on the next layer is started.

Each iteration involves the following steps:

- To determine objectives, alternatives and constraints

- To identify and resolve risks

- To evaluate alternatives

- To develop the deliverables for that iteration, and to verify their correctness

- To plan the next iteration

- To commit to an approach for the next iteration

Advantages

Good for large projects and also for medium to high risk projectsHigh amount of risk analysis hence avoidance of risk is enhancedString approval and documentation controlAdditional functionality can be added at a later dateSoftware is produced early in the software life cycle.

Disadvantages

Can be a costly model to use.Risk analysis requires highly specific expertise.Project’s success is highly dependent on the risk analysis phase.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/sdlc-models 10 / 174

Page 11: Assurance Lounge

Doesn’t work well for smaller projects.

Incremental modelThe whole requirement is divided into various builds. Multiple development cycles make the life cycle a “multi-waterfall” cycle. Cycles are divided upinto smaller, more easily managed modules. Each module passes through the requirements, design, implementation and testing phases. A workingversion of software is produced during the first module. Each subsequent release of the module adds function to the previous release. The processcontinues till the complete system is achieved

Advantages

Generates working software quickly and early during the software life cycle.More flexible – less costly to change scope and requirements.Easier to test and debug during a smaller iteration.Customer can respond to each built.Lowers initial delivery cost.Easier to manage risk because risky pieces are identified and handled during each iteration.

Disadvantages

Needs good planning and design.Needs a clear and complete definition of the whole system before it can be broken down and built incrementally.Expensive than waterfall model

Agile ModelAgile model is also a type of Incremental model which is used for time critical applications. Software is developed in incremental, rapid cycles. Thisresults in small incremental releases with each release building on previous functionality. Each release is thoroughly tested to ensure softwarequality is maintained. Extreme Programming (XP), Scrum are some of the most well known agile development model

https://help.rallydev.com/sites/default/files/multimedia/videos/agile_primer.swf

Advantages

People and interactions are emphasized rather than process and tools. Customers, developers and testers constantly interact with eachother.Working software is delivered frequently (weeks rather than months).Face-to-face conversation is the best form of communication.Close, daily cooperation between business people and developers.Continuous attention to technical excellence and good design.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/sdlc-models 11 / 174

Page 12: Assurance Lounge

Open Doubts Closed Doubts

Regular adaptation to changing circumstances.Even late changes in requirements are welcome.

Disadvantages

In case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the softwaredevelopment life cycle.There is lack of emphasis on necessary designing and documentation.The project can easily get taken off track if the customer representative is not clear what final outcome that they want.Only senior programmers are capable of taking the kind of decisions required during the development process. Hence it has no place for newprogrammers, unless combined with experienced resources.

Different software development models have their own advantages and disadvantages. The right model or combination of models has to be chosenbased on the project and all other related factors.

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SANGEETA DUTTAWhat does "string approval and documentation control" mean as written as an advantage of the spiral model?Thanks in advance :)

� � � about 23 hours ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/sdlc-models 12 / 174

Page 13: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

2.3. Introduction to Software Testing Life CycleThe process of testing a software in a well-planned and systematic way is known as Software testing life cycle (STLC)

Software testing life cycle is an integral part of the software development life cycle.

The overall aspect of STLC phase deals with testing and rectifying any error code generating within the program under various test conditions.

In STLC process, different activities are carried out to improve the quality of the product.

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-testing-life-cycle 13 / 174

Page 14: Assurance Lounge

STLC Phases

Requirement AnalysisDuring this phase, test team studies the requirements from a testing point of view to identify the testable requirements. The QA team may interactwith various stakeholders (Client, Business Analyst, Technical Leads, System Architects, etc) to understand the requirements in detail. Requirementscould be either Functional (defining what the software must do) or Non Functional (defining system performance /security availability). Automationfeasibility for the given testing project is also done in this stage.

Activities:

Identify types of tests to be performed.Gather details about testing priorities and focus.Prepare Requirement Traceability Matrix (RTM).Identify test environment details where testing is supposed to be carried out.Automation feasibility analysis (if required).

Deliverables:

RTMAutomation feasibility report. (if applicable)

Test PlanningThis phase is also called Test Strategy phase. Typically, in this stage, a Senior QA manager will determine effort and cost estimates for the projectand would prepare and finalize the Test Plan.

Activities:

Preparation of test plan/strategy document for various types of testingTest tool selectionTest effort estimationResource planning and determining roles and responsibilities.Training requirement

Deliverables:

Test plan /strategy document.Effort estimation document.

Test DesignThis phase involves creation, verification and rework of test cases & test scripts. Test data, is identified/created and is reviewed and then reworkedas well.

Activities:

Create test cases, automation scripts (if applicable)Review and baseline test cases and scriptsCreate test data (If Test Environment is available)

Deliverables:

Test cases/scriptsTest data

Test Environment SetupTest environment decides the software and hardware conditions under which a work product is tested. Test environment set-up is one of the criticalaspects of testing process and can be done in parallel with Test Case Development Stage. Test team may not be involved in this activity if thecustomer/development team provides the test environment in which case the test team is required to do a readiness check (smoke testing) of the

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-testing-life-cycle 14 / 174

Page 15: Assurance Lounge

Open Doubts Closed Doubts

given environment.

Activities:

Understand the required architecture, environment set-up and prepare hardware and software requirement list for the Test Environment.Setup test Environment and test dataPerform smoke test on the build

Deliverables:

Environment ready with test data set upSmoke Test Results.

Test ExecutionDuring this phase test team will carry out the testing based on the test plans and the test cases prepared. Bugs will be reported back to thedevelopment team for correction and retesting will be performed.

Activities:

Execute tests as per plan.Document test results and log defects for failed casesMap defects to test cases in RTMRetest the defect fixesTrack the defects to closure

Deliverables:

Completed RTM with execution statusExecute tests as per plan.Test cases updated with results

Test Cycle ClosureTesting team will meet, discuss and analyze testing artifacts to identify strategies that have to be implemented in future, taking lessons from thecurrent test cycle. The idea is to remove the process bottlenecks for future test cycles and share best practices for any similar projects in future.

Activities:

Evaluate cycle completion criteria based on Time, Test coverage, Cost, Software, Critical Business objectives and QualityPrepare test metrics based on the above parameters.Document the learning out of the projectPrepare Test closure reportQualitative and quantitative reporting of quality of the work product to the customer.Test result analysis to find out the defect distribution by type and severity

Deliverables:

Test Closure reportTest metrics

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

JAYA BOSEWhat is the meaning of Automation Feasibility?

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-testing-life-cycle 15 / 174

Page 16: Assurance Lounge

INDERJEET KAUR“Feasibility analysis in automation testing refers to a checklist on basis of which we can decide that we shouldproceed with the automation of the test cases or not.”

� � � about 3 days ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-software-testing-life-cycle 16 / 174

Page 17: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.Testing as a career

ObjectiveNeed for Testing as a separate streamTesting as a professionBuilding career in testingProfessional certifications in testingRoles and ResponsibilitiesLatest trends in Testing

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-as-a-career 17 / 174

Page 18: Assurance Lounge

Course Content

3.1 Need for Testing as a separate stream and Testing as a Profession

3.2 Building a career in Testing

3.3 Professional Certifications in Testing

3.4 Roles and Responsibilities

3.5 Latest trends in Testing

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-as-a-career 18 / 174

Page 19: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.1. Need for Testing as a separate stream and Testing as a ProfessionTesting is part of overall Quality Assurance – It covers the Quality Control aspect of ensuring Quality. It provides sufficient information to the stakeholders for decision making regarding release of the software/ system, for the next development step or handover to customers. Testing is not justplain documentation. It is understanding the domain and application functionality. coding in case of Automation.Testing is breaking the code tomake better solutions.

Need for Testing as a separate stream

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/need-for-testing-as-a-separate-stream-and-testing 19 / 174

Page 20: Assurance Lounge

The testing team needs to be independent and empowered in order to be effective.Separate Testing team would have people having sufficient knowledge and ability to test the software Testers would have independent view about the work products derived from requirement statementDevelopers tend to be optimistic while developing s/w that right and correct input will be given to the s/w while testing.There may be blindfolds while understanding requirements or selection of approach, and developers may not be willing to find more defects.Understanding approach related defects may not be found by developers.Platform or database related defects may not be uncovered as developers may feel that as a technological limitations. As per developers,technology is creating problems.Developers have more of creation skills while testing needs more of a destruction skillSpecial skills required for doing special tests would be available in independent testing teams.

Testing as a Profession

The Wrong Notion:

The Reality:

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/need-for-testing-as-a-separate-stream-and-testing 20 / 174

Page 21: Assurance Lounge

Open Doubts Closed DoubtsThere are no doubts yet

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/need-for-testing-as-a-separate-stream-and-testing 21 / 174

Page 22: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.2. Building a career in TestingThe below points to be noted for building a career in Testing

Understand the Testing PrinciplesHave the right mind set and set up own goalsLearn testing processes & methodologiesTake training on testing toolsTake professional training on software testing

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/building-a-career-in-testing 22 / 174

Page 23: Assurance Lounge

Complete software testing certificationsLearn the DomainMove up in the hierarchy

Behind every great Developer there is an equally great Tester.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/building-a-career-in-testing 23 / 174

Page 24: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.3. Professional Certifications in TestingTraining & Certification makes a better Test Professional. Assurance Academy which is part of the Assurance Services Unit caters to the competencydevelopment in software testing in TCS.

Below is the list of some of the widely taken up certifications in Testing.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/professional-certifications-in-testing 24 / 174

Page 25: Assurance Lounge

Open Doubts Closed Doubts

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

MAYUR SAPREwhat is the purpose of assurance academy..??

� � � about 1 day ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/professional-certifications-in-testing 25 / 174

Page 26: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.4. Roles and Responsibilities

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/roles-and-responsibilities 26 / 174

Page 27: Assurance Lounge

Test Engineer / Tester

Execute test cases as per test plans and log defectsWork closely with Test Lead / Analyst to achieve desired objectives

Test Analyst

Develop Test Cases, Test Scripts and Test DataPrepare traceability matrixWork closely with Testing team to achieve the desired test result

Test Lead

Develop and manage Test PlansMonitor test execution and track defectsEstablish Testing Environment, processes and implement methodologiesReport status of testing and co-ordinate with end-users, testers and test manager

Test Automation Engineer

Prepare test automation design based on the test automation architecture and framework defined for the projectDefine standards and guidelines for automation

Test Strategist

Design testing framework including automated testingReview testing deliverablesAnalyze testing tools and recommend for useDefine test strategyDefine Metrics

Test Process Consultant

Assess testing processes and recommend improvement action planAssess test automation feasibilityPrepare assessment plan and coordinate with the project/program stakeholders

Test Manager

Develop test strategyPlanning, effort estimation, resource management and trainingManage and deliver the Testing team activitiesEstablish, track and improve process efficienciesIdentifying risks and formulating mitigation strategies

Business Analyst

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/roles-and-responsibilities 27 / 174

Page 28: Assurance Lounge

Open Doubts Closed Doubts

Prepare high level test scenarios based on business scenarios and requirementsAnalyze requirements for accuracy and completeness from a business perspectiveReview high level test scenarios prepared

Test Consultant

Assess testing processes and recommend improvement action planPrepare assessment plan and coordinate with the project/programme stakeholdersPre-sales/ business development

Test Automation Consultant

Automation feasibility analysis and tool evaluationAutomation approach and roadmapPre-sales/ business developmentCreation of assetsProduct review/ keep abreast of developments in product space

Test Center Delivery Manager

End-to-end management of testing delivery for multiple projects / initiativesIdentify and monitor issues, risks and concerns at test centre levelReporting to Customer ManagementEstablish Client expectationsEnd-to-end management of testing deliveryIdentify and monitor issues, risks and concerns at test centre levelReporting to Customer Management

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SANGEETA DUTTAIs there any difference between test strategy and test plan ??Thanks in advance!

SHABANA FATHIMAyeah there is.

test plan is the way you want to carry out testing.

test strategy gives you idea of how your testing process is progessing.it gives you an overall view of testing anddefects.

� � � about 12 hours ago

ARAVINDAN KRRISHNAN sir,

thank you for the comprehensive explanation of the testing hairarchy,but i would like to know what designation we will begiven as soon as we finish our training.

� � � about 23 days ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/roles-and-responsibilities 28 / 174

Page 29: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

3.5. Latest trends in TestingSome of the major trends in software testing are as follows.

Mobile Usability testingClient side performance testingAutomated cross browser testingMobile performance testingExploratory Testing

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/latest-trends-in-testing 29 / 174

Page 30: Assurance Lounge

Open Doubts Closed Doubts

Testing in the cloud

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

JAYA BOSEWhat is Automated Cross browser testing?

� � � about 2 days ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/latest-trends-in-testing 30 / 174

Page 31: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

4.Qualities of a Tester

ObjectiveAttributes to become a good Tester

Not just anyone can claim to be an exceptional software tester. Software testing requires a unique skill set, and the best software testers are theones that continuously strive to expand their knowledge and hone their testing strategies. In short, good testers always want to get better.

A Great Tester is one who wants to know more than the developers know to have that breaking edge.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/qualities-of-a-tester 31 / 174

Page 32: Assurance Lounge

Skills required to become a Software Tester

Following skills are indispensable to become a good software Tester.

Analytical Skills

Technical skills

Communication skills

Attitude

Productivity

Passion

Analytical Skills:

A good software tester should have sharp analytical skills. Analytical skills will help break up a complex software system into smaller units to gain abetter understanding and create corresponding test cases.

Technical skills:

A good software tester must have strong technical skills. It helps the testers to have a real insight into the kinds of bugs that come into softwareand the likeliest place to find them. Also Technical skills help in test Automation.

Communication skills:

A good software tester must have a good verbal and written communication skills. It helps in creation of Testing artifacts like test cases, test plans,test strategies, bug reports. Also in communicating with developers, clients and management (Negotiation and Soft skills).

Attitude:

A good software tester should have a GREAT attitude. An attitude to Test to break, detail orientation, willingness to learn, suggest processimprovements,

upgrade technical skills with the changing technologies and work independently without much supervision.

Productivity:

A software tester must efficiently manage workload, have high productivity, exhibit optimal time management and organization skills.

Passion:

A software tester must have a great degree of passion for Testing. The passion should be, to make a career in testing but not just to treat it as ajob. Only then one can excel in this profession.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/qualities-of-a-tester 32 / 174

Page 33: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

5.Database Concepts

ObjectiveIntroductionDatabase Management SystemTraditional Data Processing SystemNeed of a Database Management SystemTypes of DBMSRelational Database Management System TerminologyKeys

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/database-concepts 33 / 174

Page 34: Assurance Lounge

Related Videos

5.1 Introduction

5.2 Types of DBMS

5.3 RDBMS terms

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/database-concepts 34 / 174

Page 35: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

5.1. IntroductionWhat is a data ?

Any factual information in raw and disorganized form is called data.

What is a database?

A database is a collection of related data organized in a way that data can be easily accessed ,managed and updated.

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-17 35 / 174

Page 36: Assurance Lounge

Database Management System

A general-purpose Database Management System(DBMS) is a software system designed to allow the definition, creation, querying, updatingand administration of databases.

Well-known DBMS's include MySql,Oracle,Microsoft SQL server,Foxpro,SQLite, FileMaker Pro.

The primary goal of a Database Management System(DBMS) is to provide a way to store and retrieve database information that is bothconvenient and efficient.

Traditional File Processing System

A file system is a method of storing and organizing computer files and the data they contain and to make it easy to find and access them.

Limitations of File processing System:

1. Separated and Isolated Data

2. Data Redundancy

3. Data Dependence

4. Difficulty in representing data from the user's view

5. Inflexibility in retrieving the Data

6. Data Security

7. Transactional Problems

8. Concurrency problems

Need of a Database Management System

To overcome the limitations of the traditional file processing system , the modern DBMS was created.

Functions of DBMS :

1. Minimal Data Redundancy

2. Data Consistency

3. Data Integration

4. Data Sharing

5. Application Development Ease

6. Better Controls

7. Data Independence

8. Reduced Maintenance

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-17 36 / 174

Page 37: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

5.2. Types of DBMSCommonly used databases are:

1. Hierarchical Database

2. Network model database

3. Object relational database

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/types-of-dbms 37 / 174

Page 38: Assurance Lounge

4. Relational database Model

Hierarchical DBMS:

1. A DBMS is said to be hierarchical if the relationships among data in the database are established in such a way that one data item is presentas the subordinate of another one or a sub unit.

2. The data structure "tree" is followed by the DBMS to structure the database.

Network Model DBMS:

1. A DBMS is said to be a Network DBMS if the relationships among data in the database are of type many-to-many and appears in the form ofa network.

2. Thus the structure of a network database is extremely complicated because of these many-to-many relationships in which one record can beused as a key of the entire database.

Object Oriented Relational Database :

1. Object Oriented DBMS add database functionality to object oriented programming languages.

2. They bring much more than persistent storage of programming language objects.

3. As a result, applications require less code, use more natural data modelling, and code bases are easier to maintain.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/types-of-dbms 38 / 174

Page 39: Assurance Lounge

Relational Database Management System:

1. A Data Base Management System that is based on a relational model is called as Relational Database Management System.

2. Relational model is the most successfully used Data Base Management System Model (DBMS) model.

3. Relational model represents data in the form of tables.

4. Some popular examples are Oracle, Microsoft SQL Server and Microsoft Access.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/types-of-dbms 39 / 174

Page 40: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

5.3. RDBMS termsRelation:

The Relation is a collection of related data entries and it consists of columns and rows.

Tuple:

A tuple, also called a row of data, is each individual entry that exists in a table.

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/rdbms-terms 40 / 174

Page 41: Assurance Lounge

Open Doubts Closed Doubts

Fields:

Every table is broken up into smaller entities called fields.

A field is a column in a table that is designed to maintain specific information about every record in the table.

Keys in DBMSKeys are used to establish and identify relation between tables

Super Key:

A Super key is any combination of fields within a table that uniquely identifies each record within that table.

Candidate Key:

1. A candidate is a subset of a super key.

2. A candidate key is a single field or the least combination of fields that uniquely identifies each record in the table.

3. The least combination of fields distinguishes a candidate key from a super key.

Primary key:

1. A primary key is a candidate key that is most appropriate to be the main reference key for the table.

2. It is a key that uniquely identifies a record in a table.

Foreign key:

1. A foreign key is the field that generally references values from primary key field of other table

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SIKRUTI MOHANTYwhat is the difference between a super key and candidate key?

� � � about 3 hours ago

VINEET JINDALHere it is given that

A Super key is any combination of fields within a table that uniquely identifies each record within that table.

In one book I read that A super key is a combination of all the fields within the table that uniquely identifies each recordwithin that table.

Which one is correct??

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/rdbms-terms 41 / 174

Page 42: Assurance Lounge

NARENDRA BOYANAPALLII think a super key is any combination of fields within a table that uniquely identifies each record in that tablebecause a table can have more than one super key. And all fields combined together can form only one super keyfor each table.

ANITA JASA super key is a combination of one or more fields which uniquely identifies each record in a table. For example,we have three fields namely customer_id, customer_name, customer_address.customer_id is super key as it uniquely identifies each customer. customer_name cannot be a super key as twocustomers can have the same name. But <customer_name, customer_address> form a super key as canuniquely identify a customer. Also, <customer_id, customer_name, customer_address> all these fields whentaken together definitely forms a super key as it can uniquely identify a customer.

So a super key contains one, more than one or ALL the fields. Its quite obvious that if all the fields are takentogether, it will definitely form a super key!!!

� � � about 4 days ago

PRASANT SUKUMARWhat does the unloaded image between the "Foreign key" para and the "related videos" mean ?Upon clicking that image,itopens a new tab for a quiz on the topic "Introduction to Java". Am i supposed to take that test? If yes,then where can i findthe study materials for the same?

SURYATEJA AMARAsame doubt.

INDERJEET KAURsame doubt

� � � about 22 days ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/rdbms-terms 42 / 174

Page 43: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.Data Query Language

ObjectiveIntroduction to SQLData Query Language (DQL) : SELECTDQL : ProjectionDQL : SelectionUsing DISTINCT KeywordUsing ORDER BY KeywordUsing Concatenation Operator

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-query-language 43 / 174

Page 45: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.1. Introduction to SQLStructured Query Language or SQL is a tool for organizing, managing, and retrieving data stored in a computer database.

SQL Statements can be divided into following sub categories:

Data Definition Language (DDL)Data Manipulation Language (DML)Data Query Language (DQL)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-sql 45 / 174

Page 46: Assurance Lounge

Data Control Language (DCL)Transaction Control Language (TCL)

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-sql 46 / 174

Page 47: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.2. Data Query Language : SELECTThe Data Query Language (DQL) is used to retrieve the data from one or more tables.The SELECT statement is the only DQL statement.Using SELECT statement the following operation can be performedProjection : The operation results subset of columnsSelection : The operation results subset of rows

Projection means selecting set of columns from a table. In the below table, 3 columns marked with yellow colour suggesting that those columns are

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-query-language-select 47 / 174

Page 48: Assurance Lounge

selected.

Selection means selecting set of rows from a table. In the below table, 3 rows marked with yellow colour suggesting that those rows are selected.

A Typical SELECT statement may consists of six clauses.

Syntax:

SELECT column_name [, column_list]

FROM table_name

[WHERE search_condition]

[GROUP BY grouping_column_name]

[HAVING aggregated_search_condition]

[ORDER BY sorting_column]

1. The SELECT and FROM clauses of the statement are mandatory. The remaining four clauses are optional.

Consider the following table

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-query-language-select 48 / 174

Page 49: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.3. SELECT Statement (Projection & Selection)To display all records from table SELECT keyword with asterisk(*) is used:

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/select-statement-projection 49 / 174

Page 50: Assurance Lounge

The above query displays all the records from customer_details

To retrieve selected columns from the table, specific column names separated by commas(,) are used

The above query displays only id, name and salary columns from customer_details

SELECT Statement (selection)The where clause can be used to refine selection results by adding a search criteria.

Restricting Selection using comparison operators:

SELECT name, age FROM customer_details WHERE salary>50000;

The above query displays name and age of customers whose salary more than 50000 From customer_details table

Restricting Selection using IN keyword:

SELECT name,location FROM customer_details WHERE location IN ('Kolkata','Delhi');

The above query displays name and location of customers who are from Kolkata and Delhi

Restrict based on pattern matching:

SELECT name,location FROM customer_details WHERE name LIKE '_a%';

The above query displays name and location of customers whose name's second character is a.

'_' identifies that one character can appear before 'a' and ' % ' identifies that any numbers of character can appear after 'a'.

Restricting Selection using BETWEEN … AND keyword:

SELECT name,location FROM customer_details WHERE age BETWEEN 20 AND 40;

The above query displays name and location of customers whose age ranging from 20 to 40

Restricting based on NULL value:

In Database terminology NULL is referred as value which is unspecified or unavailable

Based on database configuration, NULL value may not display anything but it should not be misunderstood as zero or blank space.

Condition on NULL value can be given using the keyword IS.

SELECT name, age FROM customer_details WHERE location IS NULL;

The above query displays name and age of customers whose location not specified

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/select-statement-projection 50 / 174

Page 51: Assurance Lounge

Open Doubts Closed DoubtsThere are no doubts yet

SELECT name, age FROM customer_details WHERE age IS NOT NULL;

The above query displays name and age of customers whose age available

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/select-statement-projection 51 / 174

Page 52: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.4. DISTINCT KeywordTo eliminate duplicate rows DISTINCT keyword is used in the SELECT statement.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/distinct-keyword 52 / 174

Page 53: Assurance Lounge

The above query displays only the different age values.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/distinct-keyword 53 / 174

Page 54: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.5. ORDER BY ClauseORDER BY clause in the SELECT statement is used to sort the results.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/order-by-clause 54 / 174

Page 55: Assurance Lounge

Open Doubts Closed DoubtsThere are no doubts yet

1. Name, age and salary of the customers displayed as per the ascending order of their salary.

2. DESC keyword can be used to display the list in descending order

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/order-by-clause 55 / 174

Page 56: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.6. GROUP BY ClauseThe GROUP BY statement is used to group the result-set by one or more columns.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/group-by-clause 56 / 174

Page 57: Assurance Lounge

The above query displays number of customers present in particular age group.

Note: Group By Statements will be discussed in detail later

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/group-by-clause 57 / 174

Page 58: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.7. Concatenation OperatorThe concatenation( || ) operator can be used to combine character strings and values from table.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/concatenation-operator 58 / 174

Page 59: Assurance Lounge

The Name, age and the strings are displayed as single output columns

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/concatenation-operator 59 / 174

Page 60: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

6.8. Column AliasColumn heading in the result set can be changed with Column aliases using the keyword AS.

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/column-alias 60 / 174

Page 61: Assurance Lounge

1. The columns name and id are displayed as customer_name and customer_id in the result set.

2. Column headings in the table is unchanged.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/column-alias 61 / 174

Page 62: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

7.DDL, DML & TCL

ObjectiveIntroduction to DDLData typesTypes of Data Definition LanguageIntroduction to DMLINSERT statementUPDATE statementDELETE statement

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language 62 / 174

Page 63: Assurance Lounge

Introduction to Transaction ControlTransaction Control Statements

7.1 Data Definition Language (DDL)

7.2 Data Manipulation Language(DML)

7.3 Transaction CONTROL Language (TCL)

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language 63 / 174

Page 64: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

7.1. Data Definition Language (DDL)Data Definition Language (DDL)DDL statements define the data structure such as tables, views etc.. that make up the database. All DDL statements are auto committed means thechanges will become permanent and database objects created are available to all users.

Commonly used DDL statements are:

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language-ddl 64 / 174

Page 65: Assurance Lounge

CREATEALTERDROPRENAMETRUNCATE

Data TypesA data type identifies or classifies a particular type of information or data.

Some commonly used data types are:

CHAR (size) - Used to store character strings values of fixed length.VARCHAR2 (size) – Used to store variable length string data.NUMBER (size, precision) – Used to store numbers(fixed or floating point)DATE – Used to represent date and time.LONG – Used to store large variable length strings(upto 2GB).

DDL statement: CREATEThe CREATE keyword is used for creating database objects like tables, views, triggers, and indexes.

Syntax:

CREATE TABLE table_name

(

column_name1 DATATYPE(Size) ,

column_name2 DATATYPE(Size),

column_name3 DATATYPE(Size)

);

Ex: Create Table Employee

(

Emp_id number(4) NOT NULL,

Name varchar2(20) NOT NULL,

Salary number(8),

E_Mail varchar2(30),

Country varchar2(20),

);

Table created.

The above statement creates a table named Employee with columns Emp_id, Name,Salary,E_Mail and Country.

DDL statement: ALTERAlter statement is used to modify the structure of database or database objects like tables, views etc..

Alter table statement - to add column to a table:

The above statement adds a new column 'age' of number data type with constraint not null.

Modifying the column:

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language-ddl 65 / 174

Page 66: Assurance Lounge

Open Doubts Closed Doubts

Ex: ALTER TABLE Employee MODIFY salary number(10,2);

Table Altered.

Rename and Drop a Column:

Using the alter statement we can rename a column and also the drop any column.

The above statements renames the column name salary to em_sal and drops column age.

DDL statements: TRUNCATE, DROP, RENAMETruncate Table:

Remove all the rows and resets schema of the table.

TRUNCATE TABLE Employee;

Drop table :

Deletes table entirely from the database.

DROP TABLE Employee;

Renaming a Table:

RENAME Employee to Emp_table;

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SAMAPTI SINHAMAHAPATRAWhat is schema?

PRASANT SUKUMARa schema is the organization or structure for a database.

� � � about 24 days ago

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language-ddl 66 / 174

Page 67: Assurance Lounge

JAYA BOSESchema is the structure of the database.eg in the student table(stu_id,stu_name,stu_clg) forms the schema and (101,Ram,cvrce) is one row which contains data according to theschema specified.

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-definition-language-ddl 67 / 174

Page 68: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

7.2. Data Manipulation Language(DML)Introduction

1. Data Manipulation Language(DML) is a structured query language which is used for inserting, updating and deleting data in the databaseobjects like table or view.

2. DML comprises the SQL change statements which modifies the stored data but not the database object.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-manipulation-language-0 68 / 174

Page 69: Assurance Lounge

3. DML consist of three SQL statements namely-

InsertUpdateDelete

INSERT statementInsert statement is used for inserting data into table.Insertion of data can be done in multiple ways.

Syntax:

INSERT INTO table_name[(column1, column2,...)]

VALUES(value1, value2,....);

Ex:

If values in all the columns inserted in proper order, column names are not mandatory.

Syntax-:INSERT INTO table_name VALUES(value1, value2,....);

Ex:

Insertion can also be done in interactive way.

The records can be inserted in interactive manner also

Syntax:

INSERT INTO table_name VALUES(&value1, &value2, …..);

Ex:

UPDATE statementUpdate command is used to change or modify data of one or more records in a table.

Syntax:

UPDATE Table_name SET Column_name1=value1 [,Column_name2=value2,...]

[WHERE Condition];

Ex.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-manipulation-language-0 69 / 174

Page 70: Assurance Lounge

DELETE statement1. Delete statement is used to remove one or more records from a table.

2. A subset may be defined for deletion using a condition, otherwise all records are removed.

Syntax:

DELETE FROM Table_Name

[WHERE Condition];

Delete statement using WHERE condition.

Ex:

Note: Delete statement without where condition deletes all the rows from table.

Example-

Related Videos

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-manipulation-language-0 70 / 174

Page 71: Assurance Lounge

Open Doubts Closed Doubts

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SUGANTHI SEKARwhether the following two are correct for delete the particular column from the table

1. delete from table-name where condition;

2.alter table table-name drop column column-name;

VIJAYAN KANNAN Best Answer

I think 2 is correct. Because Alter is DDL which will modify the structure of table. But delete is used to just deletethe data. It will not remove entire column

SHANMUGAPRIYA GANESANI think DELETE is used to remove records i.e rows,ALTER table is used to remove the column.

NARENDRA BOYANAPALLII think only 1 is correct because, in 2 "column" keyword is used which is not present in sql.(alter table table-name drop column column-name;).

� � � about 1 month ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/data-manipulation-language-0 71 / 174

Page 72: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

7.3. Transaction CONTROL Language (TCL)Introduction to TransactionOracle server ensures data consistency based upon transactions.

Transactions consist of DML statements that make up one consistent change to the data.

Transaction Start and End Scenarios:

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/transaction-control-language-tcl 72 / 174

Page 73: Assurance Lounge

A Transaction begins when the first executable sql statement is encountered.

The Transaction terminates when the following specifications occur.

A COMMIT or ROLL BACK issued.

A DDL statement issued

A DCL statement issued

Failure of machine or system crashes

A DDL or DCL statement is automatically committed and hence implicitly ends a Transaction.

Explicit Transaction Control StatementsCOMMITSAVEPOINTROLLBACK

COMMIT:

It ends the current Transaction by making all pending data changes permanent.

Syntax:COMMIT;

Once commit is issued, data changes will become permanent.

The previous state of the data is permanently lost.

All users can view the results of the recent transactional changes.

Ex: UPDATE employee SET salary =1000 WHERE emp_id = 10;

COMMIT;

SAVEPOINT:

It marks a savepoint with in the current Transaction.

We can create multiple savepoints in single Transaction.

Savepoints can be used to control the reverting of changes.

Syntax:SAVEPOINT <NAME>;

Ex: SAVEPOINT S1;

ROLLBACK:

It ends the current Transaction by discarding all pending data changes.

The data changes are undone.

The previous state of data is restored.

The locks on the affected rows are automatically released.

Syntax: ROLLBACK or ROLLBACK to <SAVEPOINT NAME>;

Ex: UPDATE employee SET salary =1000 WHERE emp_id = 10;

ROLLBACK;

using savepoint the Transaction can be discarded up to the marker by using rollback statement.

Ex: INSERT INTO employee VALUES(10,'JHON',3000);

INSERT INTO employee VALUES(10,'KELLY',2000);

SAVEPOINT S1;

INSERT INTO employee VALUES(10,'WILSON',4000);

ROLLBACK TO S1;

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/transaction-control-language-tcl 73 / 174

Page 74: Assurance Lounge

Open Doubts Closed Doubts

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

VINITA SHEWALEThe question asked in quiz was- Which is the Explicit Transaction Control Statement?

Options were-

COMMITSAVEPOINTROLLBACK all the options were correct. What to do? Similarly, Most of the questions were marked as right, But it hasgiven all of them as wrong. My first attempt was not cleared due to that all mess up...

NARENDRA BOYANAPALLIFor options COMMIT and ROLLBACK it is given right.

� � � about 3 days ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/transaction-control-language-tcl 74 / 174

Page 75: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.Single Row, Aggregate / Group functions in SQL

ObjectiveIntroduction to Oracle Built-in FunctionsSingle Row Functions and typesConversion FunctionsCharacter FunctionsNumeric FunctionsDual tableABS and MOD function

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/single-row-functions-in-sql 75 / 174

Page 76: Assurance Lounge

POWER and SQRT functionFLOOR and CEIL functionTRUNC and ROUND functionNumeric functions examplesGroup functionsUsing GROUP BY statementUsing WHERE clauseUsing HAVING clause

8.1 Introduction to Oracle Built-in Functions

8.2 Single Row Functions

8.3 Conversion Functions

8.4 Character Functions

8.5 Numeric Functions

8.6 Dual table

8.7 Aggregate / Group functions

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/single-row-functions-in-sql 76 / 174

Page 77: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.1. Introduction to Oracle Built-in FunctionsOracle Built-in Functions are the functions supplied by Oracle that can be used to manipulate data items and return a result.

There are two types of Built-in functions available in Oracle.

Single Row Functions: Single row or Scalar functions return a value for every row that is processed.

Group Functions: These functions group the rows of data based on the values returned by the query, performs the aggregate function(sum,avg

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-oracle-built-in-functions 77 / 174

Page 78: Assurance Lounge

etc.) on each group and return one value per group of rows.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-oracle-built-in-functions 78 / 174

Page 79: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.2. Single Row FunctionsSingle row or Scalar functions return a value for every row that is processed .

There are four different types of single row functions-

1)Conversion Functions: These are functions that help us to convert a value in one form to another form. For Example: a null value into anactual value, or a value from one data type to another data type like NVL,TO_CHAR, TO_NUMBER, TO_DATE etc...

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/single-row-functions 79 / 174

Page 80: Assurance Lounge

2)Character or Text Functions: These are functions that accept character input and can return both character and number values.

3)Numeric Functions: These are functions that accept numeric input and return numeric values.

4)Date Functions: These are functions that take values that are of data type DATE as input and return values of data type DATE, except for theMONTHS_BETWEEN function, which returns a number.

Consider the following table Employee:

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/single-row-functions 80 / 174

Page 81: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.3. Conversion FunctionsNVLNVL2NULLIF

NVL: let us replace null with a string in the results of a query .

Syntax : NVL( string1, replace_with).

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/conversion-functions 81 / 174

Page 82: Assurance Lounge

Open Doubts Closed DoubtsThere are no doubts yet

If string1 is null, then NVL returns replace_with .

If string1 is not null, then NVL returns string1.

Ex: SELECT NVL(emp_name,'NA') FROM Employee;

The above query will display 'NA' wherever emp_name is null.

We can also replace with another column.

Ex: SELECT NVL(emp_name,dep_name) FROM Employee;

The emp_name and dep_name should belongs to same data type family.

The above query will display dep_name wherever emp_name is NULL.

Ex: SELECT NVL(salary,0) FROM Employee;

The above query returns 0 only if the salary is defined as NUMBER and is NULL.

NVL2: NVL2 function extends the functionality found in the NVL Function.

It lets you substitutes a value when a null value is encountered as well as when a non-null value is encountered.

Syntax : NVL2(string1,value_if_not_null,value_if_null)

if string1 is not null then NVL2 returns value_if_not_null.

if string1 is null then NVL2 returns value_if_null.

Ex: SELECT NVL2(emp_name,dep_name,'NOT AVAILABLE') FROM Employee;

NULLIF: NULLIF compares expr1 and expr2. If they are equal, then the function returns null. If they are not equal, then the function returnsexpr1 .

Syntax : NULLIF(expr1,expr2)

Ex: SELECT NULLIF( dep_name,'HR') FROM Employee;

The above query returns NULL if dep_name field consists of 'HR', otherwise it returns job.

You cannot specify the literal NULL for expr1.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/conversion-functions 82 / 174

Page 83: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.4. Character FunctionsThere are two types of character functions.

Character to character functions accept string as input and will give string as output.

INITCAPLOWERUPPER

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/character-functions 83 / 174

Page 84: Assurance Lounge

CONCATLPAD,RPADTRIMSUBSTRREPLACE

Character to number functions accept string as input and will give number as output.

LENGTHINSTR

INITCAP: This function sets the first character in each word to upper case and the rest to lower case.

Syntax : INITCAP(expr1)

Ex: SELECT INITCAP(emp_name) FROM Employee:

Amit

Ajay

Sima

Dipa

Anuj

The above query returns all the employee names with the first letter in upper case and rest other characters in lower case.

LOWER: This function converts all letters in the specified string to lower case. If there are characters in the string that are not letters, they areunaffected by this function.

Syntax : LOWER(expr1)

Ex: SELECT LOWER (emp_name) FROM employee:

amit

ajay

sima

dipa

anuj

The above query returns all the characters of the employee name in lower case.

UPPER:This function converts all letters in the specified string to uppercase. If there are characters in the string that are not letters, they areunaffected by this function.

Syntax : UPPER(expr1)

Ex: SELECT UPPER (emp_name) FROM Employee:

AMIT

AJAY

SIMA

DIPA

ANUJ

The above query returns all the characters of the employee name in upper case.

CONCAT: This function allows you to concatenate two strings together.

Syntax : CONCAT(expr1,expr2)

Ex: SELECT CONCAT(emp_name,dep_name) full_name FROM Employee;

The above query returns the emp_name & dep_name concatenated into a single string.

SUBSTR: Returns specified characters from a string, starting from specific position to required characters length.

Syntax : SUBSTR(col/expr,m,n)

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/character-functions 84 / 174

Page 85: Assurance Lounge

If 'm' is positive,oracle counts from beginning of string, If it is negative Oracle counts from the end of string.

If 'n' is omitted, Oracle returns all characters to end of the string starting from m.

Ex: SELECT SUBSTR(emp_name,3,2) FROM Employee.

The above query starts searching from the third position of the employee name from the starting of the string and displays two characters fromthere.

Ex: SELECT SUBSTR('abcdefg'-4,2) FROM dual;

dc

The above query starts searching from the fourth position of the given string from the end of the string and display two characters from there.

REPLACE: It returns the every occurrence of search_string replaced by the replacement_string.

If the replacement string is omitted or null all occurrences of search string will be removed.

Syntax : REPLACE(string,search_string,replace_string)

Ex: SELECT REPLACE(branch_name,'Mumbai','Kolkata') FROM Employee WHERE dep_name = 'HR';

The above query replaces branch name to 'Kolkata' wherever 'Mumbai' is available for the HR department .

LPAD,RPAD:

LPAD pads the character value right justified to a total width of n character positions.

Syntax : LPAD(expr1,padded_length,padded_string)

RPAD pads the character value left justified to a total width of n character positions.

Syntax : RPAD(expr1,padded_length,padded_string)

The default padding character is space.

Ex: SELECT LPAD('jhon',8) FROM dual;

jhon

Since the third parameter is not specified in the result of the above query will be by default space padded for the previous four positions.

Ex2: SELECT LPAD('jhon',8 ,'x') FROM dual;

xxxxjhon

The above query fills the four blank spaces with 'x' left of the given string.

Ex3: SELECT RPAD('jhon',8 ,'x') FROM dual;

jhonxxxx

The above query fills the four blank spaces with 'x' right of the given string.

TRIM: It enables to trim leading or trailing characters or both from a string.

If we don’t specify anything, it will trim spaces.

Syntax : TRIM( [LEADING | TRAILING | BOTH] character FROM string)

LTRIM : Removes the leading characters

RTRIM : Removes the trailing characters

TRIM : Removes both

Ex: SELECT RTRIM('s' from 'ssmithss') FROM dual;

ssmith

The above query removes 'trailing' 's' from the given string.

Ex: SELECT LTRIM('s' from 'ssmithss') FROM dual;

mithss

The above query removes 'leading' 's' from the given string.

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/character-functions 85 / 174

Page 86: Assurance Lounge

Ex: SELECT TRIM('s' from 'ssmiths') FROM dual;

mith

The above query removes 'trailing' & 'leading' 's' from the given string.

Ex: SELECT TRIM(' smith ') FROM dual;

Smith

The above query removes 'trailing' & 'leading' spaces from the given string.

INSTR: This function returns the location of a sub string in a given string.

Syntax : INSTR( string, sub_string [, start_position [, nth_appearance ] ] ).

start_position and nth_appearance are optional. If not specified, always INSTR starts with first position and will give first appearance.

Ex: SELECT INSTR('internet','e') FROM dual;

4

The above query returns the first position of 'e' searched from the start of the given string.

Ex: SELECT INSTR('internet','e',1,2) FROM dual;

7

The above query returns the second position of 'e' searched from the start of the given string.

Ex: SELECT INSTR('internet','e',5,1) FROM dual;

3

The above query returns the first position of 'e' searched from the fifth position of the given string.

LENGTH: Returns number of characters in a value.

Syntax : LENGTH(column)

Ex: SELECT LENGTH(branch_name) FROM Employee;

The above query returns number characters in the branch_name field for each and every record.

Ex: SELECT LENGTH('jhon') FROM dual;

4

The above query returns the number of characters from the given string.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/character-functions 86 / 174

Page 87: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.5. Numeric Functions1. Numeric functions are used to perform operations on numbers.2. They accept numeric values as input and return numeric values as output.3. Following are the few examples of Numeric functions available in Oracle.

a. ABS and MODb. POW and SQRTc. FLOOR and CEIL

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/numeric-functions 87 / 174

Page 88: Assurance Lounge

d. TRUNC and ROUND

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/numeric-functions 88 / 174

Page 89: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.6. Dual table1. This is a single row and single column dummy table provided by oracle. This is used to perform mathematical calculations without using a

table.2. Oracle presents the output of every operations in a tabular format so that it seems to the user that the output comes from a table

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dual-table 89 / 174

Page 90: Assurance Lounge

ABS and MOD Function

The ABS function returns the absolute value of the parameter passed.

Syntax : ABS(number)

Ex: SELECT ABS(-10) FROM dual;

10

The above query returns the absolute value of the given 'number'.

The MOD function returns the remainder value of the parameter passed.

Syntax : MOD(number1,number2)

Ex: SELECT MOD(10,4) FROM dual;

2

The above query returns the remainder when 10 is divided by 4.

POWER and SQRT Function

POWER function returns the argument raised to the specified power.

Syntax : POWER(number1,number2)

Ex: SELECT POWER(4,3) As Cube FROM dual;

64

The above query returns the output when 4 is raised to the power of 3.

SQRT function returns the square root of a number passed as parameter.

Syntax: SQRT(number)

Ex: SELECT SQRT(64) As “Square Root” FROM dual;

8

The above query returns the square root value of 64.

FLOOR and CEIL Function

The FLOOR function returns the largest integer less than or equal to the value

passed in parameter.

Syntax: FLOOR(decimal number)

Ex: SELECT FLOOR(7.14), FLOOR(7.84) FROM dual;

7 7

The above query returns the largest integer nearest to 7.14 & 7.84.

Ex: SELECT FLOOR(-7.14) FROM dual;

-8

The above query returns the largest integer nearest to -7.14.

The CEIL function returns the smallest integer greater than or equal to the value

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dual-table 90 / 174

Page 91: Assurance Lounge

Open Doubts Closed Doubts

mentioned in parameter.

Syntax: CEIL(decimal number)

Ex: SELECT CEIL(7.14), CEIL(7.84) FROM dual;

8 8

The above query returns the smallest integer nearest to 7.14 & 7.84.

Ex: SELECT CEIL(-7.14) FROM dual;

-7

The above query returns the smallest integer nearest to -7.14.

TRUNC and ROUND Function

1) The TRUNC function truncates the value present in the column, expression up to decimal places mentioned in first parameter.

2) If the second argument is 0 or is missing, the value is truncated to zero decimal places.

Syntax: TRUNC(decimal number,number of places)

Ex: SELECT TRUNC(137.5738,3) As Rounded FROM dual;

137.573

The above query returns the decimal number with three digits after the decimal point.

Ex: SELECT TRUNC(137.5738,0) As Rounded FROM dual;

137

The above query returns the integer value.

The ROUND function round off the value present in the column, expression up to decimal places mentioned in first parameter.

If the second argument is 0 or is missing, the value is rounded to zero decimal places.

Syntax: ROUND(decimal number,number of places)

Ex: SELECT ROUND(137.5738,3) As Rounded FROM dual;

137.574

The above query returns the decimal number with three digits after the decimal point where 4 digit is rounded.

SQL> SELECT ROUND(137.5738,0) As Rounded FROM dual;

138

The above query returns the integer value rounded to the next highest value.

If the second argument is negative number, the value is rounded up specified decimal places to the left (rounded to the nearest unit of 10).

Ex: SELECT ROUND(137.5748,-1) As Rounded FROM dual;

140

The above query returns the integer value which is the nearest tens value.

Ex: SELECT ROUND(137.5748,-2) As Rounded FROM DUAL;

100

The above query returns the integer value which is the nearest hundreds value.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

th

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dual-table 91 / 174

Page 92: Assurance Lounge

SAMAPTI SINHAMAHAPATRAWhat exactly dual table is?

MOHIT THAKURsuppose u are creating a script which has multiple sql queries , now u need to use a formula to calculate a value anduse it in another query , what will u do , either u will create another table to perform such task , which would beinconvenient in case your script is run on different databases , so dual table is a table which is already there to beused for such temporary calculations .

� � � about 20 days ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dual-table 92 / 174

Page 93: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

8.7. Aggregate / Group functionsAggregate / Group Functions

Group Functions, as the name suggests, are functions that operate on groups(sets) of values and returns one result per group.Group function returns a single result row for every group of queried rows.Based on the query statement it may return single or multiple rows.

The functions that are used as Aggregate Functions are:

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/aggregate-group-functions 93 / 174

Page 94: Assurance Lounge

SUM AVG MAX MIN COUNT

Consider the following table: Employee

AVG: Returns an average value, ignoring null values.

Syntax: AVG([DISTINCT] column_name)

Ex: SELECT AVG(salary) as “Average Salary” FROM Employee;

21500

The above query displays the average salary of all the employees in the table Employee

MAX: Returns the maximum value, ignoring null values.

Syntax: MAX([DISTINCT] column_name)

Ex: SELECT MAX(salary) as “Maximum Salary” FROM Employee where Dep_Name='HR';

16000

The above query displays the maximum salary of all the employees in HR Department in the table Employee.

MIN: Returns the minimum value, ignoring null values.

Syntax: MIN([DISTINCT] column_name)

Ex: SELECT MIN(salary) as “Minimum Salary” FROM Employee where Dep_Name='HR';

10000

The above query displays the minimum salary of all the employees in HR Department in the table Employee.

COUNT: Returns the count of not null values ignoring null values.

Syntax: COUNT([DISTINCT] column_name)

Ex: SELECT COUNT(DISTINCT Dep_name) Departments FROM Employee;

3

The above query displays the count of different departments in the table Employee.

COUNT:(*) Count function with asterisk returns the count of total number of rows including null values

Syntax: COUNT(*)

Ex: SELECT COUNT(*) FROM Employee;

5

The above query displays the total number of rows in table Employee.

GROUP BY clauseCreates a data set, containing several sets of records grouped together based on a condition.

Syntax: SELECT <columnName1>[,<columnName2>], AGGREGATE FUNCTION(<expression>) FROM Table_Name GROUP BY<columnName1>[,<columName2>] ;

Ex: SELECT dep_name,COUNT(emp_id) "No of Employee" FROM Employee GROUP BY dep_name;

HR 2

Marketing 2

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/aggregate-group-functions 94 / 174

Page 95: Assurance Lounge

Open Doubts Closed Doubts

Admin 1

The above query displays the number of employee in each department.

WHERE clause Used to apply a filter condition before the Grouping the rows.

Syntax: SELECT <columnName1>[,<columnName2>], AGGREGATE FUNCTION(<expression>) FROM Table_Name WHERE<condition_before_grouping_rows> GROUP BY <columnName1>[,<columName2>] ;

Ex: SELECT Dep_Name,COUNT(Salary) FROM Employee WHERE Salary>15000 GROUP BY Dep_Name;

HR 1

Marketing 1

Admin 1

The above query displays department wise count of salary more than 15000.

HAVING clauseUsed to apply a filter condition on Aggregate values.

Syntax: SELECT <columnName1>[,<columnName2>], AGGREGATE FUNCTION(<expression>) FROM Table_Name WHERE<condition_before_grouping_rows> GROUP BY <columnName1>[,<columName2>] HAVING <condition_on_grouped_result>;

Ex: SELECT Dep_Name, SUM(Salary) FROM Employee WHERE Salary>12000

GROUP BY Dep_Name HAVING SUM(Salary)<30000;

HR 16000

Marketing 20000

The above query displays the departments for which total salary is less 30000 excluding the Admin department, total salary for which is 40000.

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SAMAPTI SINHAMAHAPATRAWhat is the significance of using [DISTINCT] in aggregate functions?

NARENDRA BOYANAPALLIDISTINCT is the keyword that allows you to consider only those rows which have different values. It eliminates therows with same values.

� � � about 20 days ago

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/aggregate-group-functions 95 / 174

Page 96: Assurance Lounge

VIJAYAN KANNANWhat is the difference between WHERE and HAVING clauses? Shall we use the both in single query?

MEGHANA MHAISEKAR Moderator

WHERE is used for filtering before the grouping of rows , and HAVING if you need to filter after the Aggregationis applied . It can be used in a single query

SELECT Dep_Name, SUM(Salary) FROM Employee WHERE Salary>12000

GROUP BY Dep_Name HAVING SUM(Salary)<30000;

� � � about 1 month ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/aggregate-group-functions 96 / 174

Page 97: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

9.Categories of testing

ObjectiveStatic TestingDynamic Testing

9.1 Introduction

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/categories-of-testing 97 / 174

Page 98: Assurance Lounge

9.2 Static Testing

9.3 Dynamic Testing

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/categories-of-testing 98 / 174

Page 99: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

9.1. IntroductionTesting is broadly categorised into two namely Static and Dynamic Testing. Dynamic Testing is again categorised into Black Box and White BoxTesting.

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/static-testing 99 / 174

Page 100: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/static-testing 100 / 174

Page 101: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

9.2. Static TestingStatic Testing is testing of software work products either manually or by usage of tools. In this case, the work products are not executed. It startsearly in the life cycle and is a part of verification process. It does not require a computer as there will not be execution of the software workproducts.

The following are the static testing techniques

Reviews

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dynamic-testing 101 / 174

Page 102: Assurance Lounge

WalkthroughsInspections

Of the above mentioned techniques, Peer reviews and Walkthroughs are informal reviews whereas Inspection is a formal review process.

Formal Technical Review Objectives

Uncover errors in function, logic, or implementation for any representation of the softwareVerify that the software under review meets its requirementsEnsure that the software has been represented according to predefined standardsAchieve software that is developed in a uniform mannerMake projects more manageableServe as a training ground, enabling junior engineers to observe different approaches to software analysis, design, and implementationServes to promote backup and continuity because a number of people become familiar with parts of the software that they may not haveotherwise seen

Formal Technical Reviews

Involves 3 to 5 people (including reviewers)Advance preparation (no more than 2 hours per person) requiredDuration of review meeting should be less than 2 hoursFocus of review (walkthrough or inspection) is on a discrete work productReview leader organizes the review meeting at the producer's requestReviewers ask questions that enable the producer to discover his or her own error (the product is under review not the producer)Producer of the work product walks the reviewers through the productRecorder writes down any significant issues raised during the reviewReviewers decide to accept or reject the work product and whether to require additional reviews of product or not

Formal Technical Review Guidelines

1. Review the product not the producer.2. Set an agenda and maintain it.3. Limit rebuttal and debate.4. Enunciate problem area, but don’t attempt to solve every problem noted.5. Take written notes.6. Limit number of participants and insist on advance preparation.7. Develop a checklist for each product that is likely to be reviewed.8. Allocate resources and schedule time for all reviewers.9. Conduct meaningful training for all reviewers.

10. Review your early reviews,

In a recap of above techniques ,

Informal - Peer Review:

Peer Reviews are documented and uses a defect detection process that has peers and technical specialist as part of the review process.The Review process does not involve management participation.It is usually led by trained moderator who is NOT the author.The report is prepared with the list of issues that needs to be addressed.

Informal - Walkthrough:

It is not a formal process. It is led by the authors.Author guides the participants through the document according to his or her thought process to achieve a common understanding and togather feedback.Useful for the people if they are not from the software discipline, who are not used to or cannot easily understand software developmentprocess.Especially useful for higher level documents like requirement specification, etc.

Formal – Inspection:

It is the most formal review type. It is led by the trained moderators.During inspection the documents are prepared and checked thoroughly by the reviewers before the meeting.A separate preparation is carried out during which the product is examined and the defects are found.The defects found are documented in a logging list or issue log.A formal follow-up is carried out by the moderator applying exit criteria.

External reference - http://www.cs.toronto.edu/~sme/CSC444F/slides/L09-Inspections.pdf

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dynamic-testing 102 / 174

Page 103: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

9.3. Dynamic TestingTesting the software by dynamically executing the application is termed as dynamic testing. Dynamic testing is a method of assessing the feasibilityof a software program by giving input and examining output (I/O). The dynamic method requires the code be compiled and run. It comes underthe validation.

Dynamic Testing Consists of Two Types:

1) White-Box testing

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dynamic-testing-0 103 / 174

Page 104: Assurance Lounge

1) White-Box testing

2) Black-Box testing

White Box TestingWhite Box testing can be outlined as below.

Testing that takes into account the internal mechanism of a system or component.Checks out the paths and statements, branches that are executedRequires knowledge of the internal code.

For example, Unit testing can be termed as a White box testing where in the developer would test the paths, branches that are part of code isconforming to the functionality the program is supposed to do.

Key Note: White box tests can be designed only after Component –level design ( source code ) is available. The logical details of the programmust be available

White-Box Testing Questions

The following questions need to be asked by testers to themselves before designing the white box test cases.

Can it be guaranteed that all independent paths within a module will be executed at least once?Can all logical decisions be exercised on their true and false branches?Will all loops execute at their boundaries and within their operational bounds?Can internal data structures be exercised to ensure their validity?

Black Box TestingBlack box testing is the testing that ignores the internal mechanism of a system or component and focuses solely on the outputs generated inresponse to the selected inputs and execution conditions. It is conducted to evaluate the compliance of a system or component with specifiedfunctional requirements. Requirements are the only test basis and knowledge of the internal code is not required.

Some of the Black box testing types:

Integration TestingSystem TestingAcceptance Testing

These testing levels will be detailed later in the course.

Black-Box Testing Questions

Following would be some of the questions that a black box tester to consider before designing the test cases.

How is functional validity tested?How is system behavior and performance tested?What classes of input will make good test cases?Is the system particularly sensitive to certain input values?How are the boundaries of a data class isolated?What data rates and data volume can the system tolerate?What effect will specific combinations of data have on system operation?

Related Videos

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dynamic-testing-0 104 / 174

Page 105: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/dynamic-testing-0 105 / 174

Page 106: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.Testing Techniques

ObjectiveUnderstand what is Testing TechniqueWhy to use Testing TechniquesCategories of Testing TechniquesUnderstand some of the Testing Techniques.

Course Content

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-techniques 106 / 174

Page 107: Assurance Lounge

10.1 What is Testing technique

10.2 Why to use Testing Techniques

10.3 Categories of Testing Techniques.

10.4 Equivalence partitioning technique

10.5 Boundary Value Analysis technique

10.6 Statement coverage technique

10.7 Branch Coverage technique

10.8 Multiple Condition Coverage technique

10.9 Loop Coverage technique

10.10 Call Coverage technique

10.11 Path Coverage technique

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-techniques 107 / 174

Page 108: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.1. What is Testing technique Testing technique is a procedure for selecting or designing tests. It is based on the functional or structural model of the software. Thetechniques have a high success rate of finding faults. It is a way of deriving the test cases which also helps in measuring the testing effortquantitatively.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/what-is-testing-technique 108 / 174

Page 109: Assurance Lounge

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/what-is-testing-technique 109 / 174

Page 110: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.2. Why to use Testing TechniquesTo ease the development of test cases, we use different testing techniques that have evolved as per different business scenarios. The reason whytesting techniques are used is because there would be large number of test scenarios and finite time which would make it impossible to test.

Hence the usage of software testing techniques reduce the number of tests to be run whilst providing the sufficient coverage of system under test.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/why-to-use-testing-techniques 110 / 174

Page 112: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.3. Categories of Testing Techniques.There are two types of test design techniques:

Black Box techniquesWhite Box techniques

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/categories-of-testing-techniques 112 / 174

Page 113: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/categories-of-testing-techniques 113 / 174

Page 114: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.4. Equivalence partitioning techniqueEquivalence partitioning technique is to partitioning the input domain of a program into a finite number of classes [sets], to identify a minimal setof well selected test cases to represent these classes.

There are two types of input equivalence classes, valid and invalid.

Equivalence class technique can significantly reduce the number of test cases that must be created and executed

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/equivalence-partitioning-technique 114 / 174

Page 115: Assurance Lounge

Illustration for EP

EP may be best explained with an example of a function which has the pass parameter "month" of a date. The valid range for the month is 1 to 12,standing for January to December. This valid range is called a partition. In this example there are two further partitions of invalid ranges.

The first invalid partition would be <= 0 and the second

invalid partition would be >= 13.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/equivalence-partitioning-technique 115 / 174

Page 116: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.5. Boundary Value Analysis techniqueA selection technique in which test data are chosen to lie along "boundaries“ of the input domain [or output range] classes, data structures,procedure parameters is known as Boundary Value Analysis Technique.

Choices often include maximum, minimum, and trivial Values .This technique mainly focus on the boundaries of the input.

Illustration for BVA

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/boundary-value-analysis-technique 116 / 174

Page 117: Assurance Lounge

If the same example of a function which has the pass parameter "month" of a date

Valid Class is 1<= month <=12

Invalid Class 1 is month <1

Invalid Class 2 is month >12

When compared to EP, which says select any test case within a range and any on either side of it , in BVA the emphasis is on the ‘edges’.

1 and 12 for the ‘edges’ of the Valid class

0 and 13 for the Invalid class

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/boundary-value-analysis-technique 117 / 174

Page 118: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.6. Statement coverage techniqueIt is a technique to satisfy the criterion that each statement in a program to be executed at least once during program testing. Coverage is 100percentage when a set of test cases causes every program statement to be executed at least once.

The chief disadvantage of statement coverage is that it is insensitive to some control structures.

Example

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/statement-coverage-technique 118 / 174

Page 119: Assurance Lounge

1 int select ( int a[], int n, int x)

2 {

3 int i = 0;

4 while ( i < n && a[i] < x )

5 {

6 if (a[i] < 0)

7 a[i] = - a[i];

8 i++;

9 }

10 return 1;

11 }

One test case n=1, a[0]=-7, x=9 covers everything ,

Flow 1 - > 2 - > 3 - > 4 - > 5 - > 6 - > 7 - > 8 - > 9 - > 10 - > 11

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/statement-coverage-technique 119 / 174

Page 120: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.7. Branch Coverage techniqueIn Branch Coverage Technique execution of decisions is considered rather than execution of each statement. The result of decisions determineswhich statement will be executed next.

Test every Decision Output both Then and Else part of IF, all possibilities for a CASE statement, loops i.e execution of the loop body, bypassing ofthe loop body and return to the beginning of the loop.

Example:

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/branch-coverage-technique 120 / 174

Page 121: Assurance Lounge

Example:

1 int select ( int a[], int n, int x)

2 {

3 int i = 0;

4 while ( i < n && a[i] < x )

5 {

6 if (a[i] < 0)

7 a[i] = - a[i];

8 i++;

9 }

10 return 1;

11 }

Test Data:

Flow A : 1 - > 2 - > 3 - > 4 - > 5 - > 6 - > 7 - > 8 - > 9 - > 10 - > 11

Flow B : 1 - > 2 - > 3 - > 4 - > 10 - > 11

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/branch-coverage-technique 121 / 174

Page 122: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.8. Multiple Condition Coverage techniqueA test coverage criteria which requires enough test cases such that all possible combinations of condition outcomes in each decision, and all pointsof entry, are invoked at least once.

A large number of test cases may be required for full multiple condition coverage.

Example:

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/multiple-condition-coverage-technique 122 / 174

Page 123: Assurance Lounge

1 int select ( int a[], int n, int x)

2 {

3 int i = 0;

4 while ( i < n && a[i] < x )

5 {

6 if (a[i] < 0)

7 a[i] = - a[i];

8 i++;

9 }

10 return 1;

11 }

Test Data:

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/multiple-condition-coverage-technique 123 / 174

Page 124: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.9. Loop Coverage techniqueA test coverage criteria which checks whether loop body executed zero times, exactly once or more than once.

Example:

main ( )

{

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/loop-coverage-technique 124 / 174

Page 125: Assurance Lounge

int i, n, a[10],x;

printf (“Enter the values”);

scanf (“%d %d %d %d”, &i, &n, &a[i], &x);

while ( i < n && a[i] < x )

{

if (a[i] < 0)

a[i] = - a[i];

i++;

}

printf (“%d” , a[i] );

}

Test Data:

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/loop-coverage-technique 125 / 174

Page 126: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.10. Call Coverage techniqueA test coverage criteria which checks whether function called zero times, exactly once or more than once. Since probability of failure is more infunction calls, each function call is executed.

Example:

main ( )

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/call-coverage-technique 126 / 174

Page 127: Assurance Lounge

{

int a, b, i ;

printf (“Enter the value of a, b, i”);

scanf (“ %d %d %d “, &a ,&b, &i);

if ( i < 10 )

{

sample ( a, b);

i = i + 1;

}

}

sample ( int x , int y )

{

If ( x > 10 )

x = x + y ; break ;

if ( y > 10 )

y = y + x ; break ;

}

Test Data:

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/call-coverage-technique 127 / 174

Page 128: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

10.11. Path Coverage techniqueTesting to satisfy coverage criteria that each logical path through the program be tested. Often paths through the program are grouped into afinite set of classes. One path from each class is then tested

General coverage requires executing all paths, number of paths may be infinite if there are loops

Example:

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/path-coverage-technique 128 / 174

Page 129: Assurance Lounge

Linear Independent Paths

Path 1 -> p1 – d1 – d2 – p4

Path 2 -> p1 – d1 – p2 – p4

Path 3 -> p1 – d1 – d2 – p3 – p4

Sample Program:

1 sample ( int x , int y )

{

2 If ( x > 10 )

3 x = x + y ; break ;

4 if ( y > 10 )

5 y = y + x ; break ;

}

6 printf (“%d %d”, x , y);

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/path-coverage-technique 129 / 174

Page 130: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.Levels of testing & test cases

ObjectiveUnderstanding various levels of TestingTest ScenarioTest CaseClassification of Test Scenario/Test case.Test StepDescription of test case componentsTest Case Example

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/levels-of-testing 130 / 174

Page 132: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.1. Test ScenarioTest design is the crucial phase in the software testing process. It includes writing of test scenarios and test cases.

Test scenario is a high level test condition. Set of test cases that ensure that the business process flows are tested from end to end is defined asTest Scenario.

Test scenarios are derived from requirement documents or use cases. Test Scenario directly verifies a functional/business need without getting toomuch granular level of testing. It can be further broken down into many test cases. Each test scenario depend on output of the previous one. Each

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-scenario 132 / 174

Page 133: Assurance Lounge

much granular level of testing. It can be further broken down into many test cases. Each test scenario depend on output of the previous one. Eachlevel of testing has its corresponding test scenarios. Test scenarios ensure that all process flows are tested from End to End.

Points to remember while writing Test Scenarios:

A good practice is to add both positive and negative test scenarios Each scenario should be specific to a functional behaviorDo not club scenarios together.

Components of Test Scenario:

Requirement ID.Test Scenario ID.Test Scenario NamePurposeAssumptionsModule NamePriorityPrerequisite.Expected Result.

Test Scenario Template

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-scenario 133 / 174

Page 134: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.2. Test caseTest case is the smallest unit of Testing. It is a detailed procedure that fully tests a feature or an aspect of feature. A test case has components thatdescribes an input, action or event and an expected response, to determine if a feature of an application is working correctly.

A test case is a set of conditions or variables under which a tester will determine whether an application, software system or one of its features isworking as it was originally established for it to do.

Test cases are written to keep track of testing coverage of Software. Test cases are usually derived from test scenario

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-case 134 / 174

Page 135: Assurance Lounge

Test cases are written to keep track of testing coverage of Software. Test cases are usually derived from test scenario

IEEE Standard 610 defines test case as follows:

A set of test inputs, execution conditions, and expected results developed for a

particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

IEEE Standard 829 defines test case as follows:

Documentation specifying inputs, predicted results, and a set of execution conditions for a test item.

Objective and Importance of Test Case.

The most extensive effort in preparing to test a software, is writing test cases

It Improves productivity during test execution by reducing the “Understanding” time during test execution.

Test cases should cover valid, invalid, expected and unexpected conditions.

Writing effective test cases is a skill

It requires in-depth study of the application

Breaking down the Test Requirements into Test Scenarios and Test Cases would help the testers avoid missing out certain test conditions

Components of Test Case:

Test Case ID.Test Case DescriptionModulePriorityPurpose Assumptions PrerequisiteTest Scenario ID Test StepTest Step Description.Test DataExpected ResultActual ResultStatus.

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-case 135 / 174

Page 136: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.3. Description of Test case componentsTest Case ID: A Unique Test case identification number.Test Case Name: Summary of the test case.Test Case Description: A brief description of the test case.Module: Function or the Module which is impacted with the test case.Priority: Describes the priority of the test case in order of complexity and execution. Defined by the values – High, Medium & Low.Purpose: The intention of the Test case. Assumptions: Assumptions if any to be included in this field.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/description-of-test-case-components 136 / 174

Page 137: Assurance Lounge

Prerequisite: Any pre-condition that need to be satisfied for executing the test case to be specified in this field. Example, availability of Environment & application under test, test data appropriate to execute the test case etc. Test Scenario ID: ID of the Scenario to which test case belongs to be provided.Test Step: Test Step Number. Usually starts from Step 1, Step 2, Step 3 and so on.Test Step Description: Each and every action that has to be performed to execute the test case. Nothing but execution instruction.Test Data: The data required for execution of the test step.Expected Result: The expected output has to be specified in this field. Usually derived from requirements.Actual Result: The actual output observed while execution to be captured in this field.Status: Status defined as Pass, Fail, Block, In progress, Not Applicable to be provided over here.

Test case template

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/description-of-test-case-components 137 / 174

Page 138: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.4. Classification of Test Scenario and Test CasePriority:

Test Scenarios and Cases are categorized as High, Medium & Low Priority based on the complexity and usage of the functionality in production.

Priority is a mandatory component for Test Case and Test Scenario. It is an important field to be captured as it helps to decide whether to give asign-off for the product during crisis.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/classification-of-test-scenario-and-test-case 138 / 174

Page 139: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/classification-of-test-scenario-and-test-case 139 / 174

Page 140: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.5. Test Step.Detailed description of Test case is a Test step. It’s a mandatory component of Test case. Test case is incomplete without a step. Each and everyaction that a user has to perform while execution of a test case is a test step.

A Test case decomposes into test steps. Test step provides detailed description about test cases, means how to perform that test case. Test stepmay contain either condition or execution instructions.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-step 140 / 174

Page 141: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-step 141 / 174

Page 142: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.6. Test Case exampleExample 1:

Rental Car Application

1. Validate that a Rental can occur.

1.1 Check Customer policy coverage

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-case-example 142 / 174

Page 143: Assurance Lounge

1.2 Query Car availability

1.3 Query Car rates

1.4 Open a Rental ticket

1.4.1 Validate that a customer record can be entered

1.4.2 Validate that credit card approval is obtained

1.4.3 Validate that status on the car record is changed from “waiting” to “rented”

2. Billing Function

3. Reservation Function

Let’s look at the lower levels for the below one

1.4.1 Validate that a customer record can be entered

Understanding functionalities

Example: Rental Car Application

1. Validate that a Rental can occur.

1.4 Open a Rental ticket

1.4.1 Validate that a customer record can be entered

1.4.1.1 Validate that a new customer can be added to the customer table

1.4.1.1.1 Validate that the first name is all alpha

1.4.1.1.2 Validate that the age is > 21.

1.4.1.1.3 Validate that the phone number is Numeric

1.4.1.1.4 Validate area code is an existing area code number.

1.4.1.2 Validate changing an existing customer

In the above example Validate that a Rental can occur is a Business/functional Requirement.

From the business requirements, scenarios which are high level testable conditions are derived. In this example Validate that a new customercan be added to the customer table is a Scenario.

We have multiple conditions to be checked under this scenario like Validate that the phone number is numeric which is nothing but a testcase.

Example 2:

Consider the following set of requirements as an example:

Requirements for calculating Car Insurance Premiums:

R00101 For females less than 65 years of age, the premium is $500 R00102 For males less than 65 years of age, the premium is $3000 R00103 For males between 25 and 64 years of age, the premium is $1000 R00104 For anyone 65 years of age or more, the premium is $1500

Example: Causes & Effect

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-case-example 143 / 174

Page 144: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-case-example 144 / 174

Page 145: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.7. Effective way of writing Test casesPoints to be noted while writing Test cases:

Document sign off – Requirements / Design / Use case document should be signed off before starting with test case writing.

Keep test case simple – Test Cases should be written in simple plain language without any ambiguous or complicated statements.

Detail test cases – Test Cases should be in detail and no generic statements should be included. Which field has to be verified for whatvalue has to be explained clearly.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/effective-way-of-writing-test-cases 145 / 174

Page 146: Assurance Lounge

Open Doubts Closed Doubts

Embed Test Data: Test Data to be used for each of the Test Step should be provided.

Track Test Case changes: Maintain Test Case history to capture changes made to Test Cases

Others will execute your test cases: Test cases should be written presuming others will execute them and hence test cases have to bedetailed.

Test Case Naming Convention: Name Test Cases that will identify objective.

Example: TC_Login_REQ1_3. In this Test Case name, Login page is being tested and requirements Req-01 and Req-03 are being covered.

100% Requirement Coverage is a must: Check and ensure 100% requirement coverage and track the requirements covered. Test caseswritten should be tracked with a Requirements traceability matrix.

Reusable Test Steps: Common and repeated Test Steps can be made as reusable and can be called in other Test Cases.

Example Login, Logout and other common Test Steps can be made as reusable Test Steps and can be called in other Test Cases.

Test Case review is a must: Ensure that all the test cases are reviewed by required stake holders (peer reviewed or SME reviewed or clientreview)

Language Usage: Use Simple and Easy-to-Understand language and use Active voice while writing test cases

Example:

Click on OK buttonNavigate to the account Summary page.

Verify word Must: Use words like “Verify” for starting any sentence in Test Case description

Example:

Verify whether the account information gets displayed on clicking the

“Account Summary” menu

Future Tense Words for Expected Result: Use always words like “Should” and “Must” for Expected Results.

Example:

The application should display the account information screen

Sample ATM test cases

Test Scenario and Test Cases Assignments

Test Scenario and cases Assignments1

Test Scenario and cases Assignments2

Test Scenario and cases Assignments3

Test Scenario and cases Assignments4

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

V PRIYAshould assignments also be completed along with the quiz??will incompetion of assignments lead toany reduction in miles??

� � � about 2 months ago

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/effective-way-of-writing-test-cases 146 / 174

Page 147: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

11.8. Levels of TestingLevels of TestingThere are broadly four levels of testing done in any Testing Project

Unit TestingIntegration TestingSystem Testing

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/levels-of-testing-0 147 / 174

Page 148: Assurance Lounge

Acceptance Testing

Unit Testing

Unit Testing is testing unit of code (program or set of programs) using Unit Test Specifications, after coding is completed. It involves the basictesting of a piece of code, the size of which is often undefined in practice, although it is usually a function or a subroutine. It tests the functionalaspects. It tests smallest testable part of an application. It is done by the developer of the functionality.

Example:

Testing of a cobol program in the reservation system that calculates the price for the ticket requested based on the inputs supplied to the programfrom the calling cobol program.

Integration Testing

The process of testing interfaces and data flows between the programs within a sub system, and between the sub-systems within a system isknown as Integration Testing.

In Integration testing tester must look for bugs in the relationship and the interfaces between pairs of components and groups of componentsunder test.

Example:

Check whether the calling program in previous example passes the right information relating to starting station and destination, date of journey,discounts to be applied and class requested.

System Testing

System Testing is a test, executed by the developer or independent test team in a laboratory environment that should demonstrate that thedeveloped system or subsystems meet the requirements set in the functional and quality specifications.

It is a process of proving that the system meets its stated design specifications (design documents) w.r.t criteria such as recoverability,maintainability and security

Example:

– Comprehensive black box testing of railway reservation system with transactions initiated and validations performed on databases and reportsgenerated after the completion of the transactions

Acceptance Testing

It is a test, executed by the user(s) and system manager(s) in an environment

simulating the operational environment to the greatest possible extent, that should demonstrate that the developed system meets the functionaland quality

requirements.

Non functional and Other types of Testing

Performance testingVolume testingLoad testingLimit testingStress testingDisaster TestingRecovery testingSecurity testingReliability testingInstallation TestingUsability TestingAccessibility TestingRegression testing

Related Videos

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/levels-of-testing-0 148 / 174

Page 149: Assurance Lounge

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/levels-of-testing-0 149 / 174

Page 150: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.Defect Management

ObjectiveTest Execution flowWhat is a Defect?Causes of Software DefectsDefects ClassificationDefect Life Cycle

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-management 150 / 174

Page 152: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.1. Test Execution Workflow

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-execution-workflow 152 / 174

Page 153: Assurance Lounge

Open Doubts Closed Doubts

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

SAMAPTI SINHAMAHAPATRAWhat is meant by regression testing?

� � � about 18 days ago

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/test-execution-workflow 153 / 174

Page 154: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.2. What is a defect?Defect is a variance from a desired product attribute. It is the difference between actual behavior and the desired behavior as stipulated by therequirements specifications.

A Defect that causes an error or negatively impacts a user/ customer is categorized as Failure

Defect can arise in any of the Software Test Life Cycle Phase. Defects arising from each phase should be logged and tracked to closure.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/what-is-a-defect 154 / 174

Page 155: Assurance Lounge

A software bug or defect is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended.

Defects arise on doing verification and validation of the programming products like SRS, Test Specifications & Code. Most defects arise frommistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers which are due to incorrectcode.

A program that contains a large number of bugs that seriously interfere with its functionality, is said to be buggy.

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/what-is-a-defect 155 / 174

Page 156: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.3. Causes of software defectsA human error or mistake produces defects (fault ,bug) in an application, code, in a system or in a document.

When a defect in the code is executed, the system will fail to do what it is intended to do. Defects may result in failures, but not all defects lead tofailures. Failures can also happen because of changing hardware conditions.

Defect may occur because of the following reasons like

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/causes-of-software-defects 156 / 174

Page 157: Assurance Lounge

Fallible nature of human beings Time pressure Complex code Complexity of infrastructure Changed technologies Many system interactions etc

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/causes-of-software-defects 157 / 174

Page 158: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.4. Defect ClassificationAll the defects which are raised would be assigned a severity level and a priority

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-classification 158 / 174

Page 159: Assurance Lounge

* The nomenclature of severity level and Priority may be different in different Defect/ Test management tools

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-classification 159 / 174

Page 160: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

12.5. Defect Life CycleDifferent steps and status of a defect during its life cycle till it is tracked to closure is as below.

Execute the test and compare the actual results to the documented expected results. If a discrepancy exists, it is logged with a status “Open.” Supplementary documentation, such as screen prints or program traces, should be attached if available.

The Test Manager or tester should review the problem log with the appropriate member of the development team to determine if thediscrepancy is truly a defect.

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-life-cycle 160 / 174

Page 161: Assurance Lounge

Assign the defect to a developer for correction. Once the defect is corrected, the developer will usually enter a description of the fix appliedand updates the defect status to “Fixed” or “Resolved”.

The defect is routed back to the testing team for retesting. Additional regression testing is performed as needed based on the severity andimpact of the fix applied.

If the retest results match the expected results, the defect status is updated to “Closed.” If the test results indicate that the defect is still notfixed, the status is changed to “Re-Open” or “Open” and sent back to the developer.

Defect Life Cycle

Defect Life Cycle and Defect Status

Related Videos

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-life-cycle 161 / 174

Page 162: Assurance Lounge

Open Doubts Closed Doubts

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

RAJEEB DASHthere is a picture file icon just above the "related videos " caption on the left side... when clicked opens a quiz portal... Thissuperimposed link to quiz was present in some of the other chapters too... Do we need to attempt those quiz or just ignoreit as a bug ?

� � � about 15 days ago

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/defect-life-cycle 162 / 174

Page 163: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.Automation Testing

ObjectiveIntroduction to Automation Testing

13.1 Introduction to Automation Testing

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/automation-testing 163 / 174

Page 164: Assurance Lounge

13.2 Benefits of Automation Testing

13.3 Choosing an Automation Tool

13.4 Testing Tools

13.5 Manual Testing Vs Automation Testing

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/automation-testing 164 / 174

Page 165: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.1. Introduction to Automation TestingManual Testing of all work flows, all fields, all negative scenarios is time and cost consuming. It is difficult to test for multilingual sites manually.Manual Testing can become boring and hence error prone.

Automation does not require Human intervention. Automated tests can run unattended (overnight). Automation increases speed of test execution.

Automation helps increase Test Coverage.

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-automation-testing 165 / 174

Page 166: Assurance Lounge

Which Test Cases to Automate:

Before going for Automation it should be analysed properly as to which test cases to automate. Factors like risk, repetative and time consumingneed to be taken into consideration for implementation of automation testing process.

The factors to consider for Automation:

High Risk - Business Critical test casesTest cases that are executed repeatedlyTest Cases that are very tedious or difficult to perform manuallyTest Cases which are time consuming

The following category of test cases are not suitable for automation:

Test Cases that are newly designed and not executed manually at least onceTest Cases for which the requirements are changing frequentlyTest cases which are executed on ad-hoc basis.Usability Test casesTest cases that needed to be executed only once

Tests without predictable results

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

���

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/introduction-to-automation-testing 166 / 174

Page 167: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.2. Benefits of Automation TestingFast: Automated tests run significantly faster than human users, 70% faster than the manual testing

? Reliable: Tests perform precisely the same operations each time they are run, thereby eliminating human error

? Repeatable: You can test how the Web site or application reacts after repeated execution of the same operations. Hence automation testingensures consistency.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/benefits-of-automation-testing 167 / 174

Page 168: Assurance Lounge

? Programmable: You can program sophisticated tests that bring out hidden information

? Comprehensive: You can build a suite of tests that covers every feature in your Web site or application. Wider test coverage can be achieved inAutomation

? Reusable: You can reuse tests on different versions of a Web site or application even if the user interface changes

Some more advantages of automation testing over manual testing are mentioned below.

Saves Time and Cost: Automation testing is much faster than manual testing. Hence greater benefit in saving time and cost.

Improves accuracy

Reduction in Human resources: Human Intervention is not required while execution which in turn reduces human resources.

Increases Efficiency

Test Frequently and thoroughly

More cycle of execution can be achieved through automation

Early time to market

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/benefits-of-automation-testing 168 / 174

Page 169: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.3. Choosing an Automation ToolSelecting the right tool is a tricky task. Following criterion will help to select the best tool for the requirement.

Assessment of organizational maturity, strengths and weaknesses and identification of opportunities for an improved test process supportedby tools.

Evaluation against clear requirements and objective criteria.

A proof-of-concept to test the required functionality and determine whether the product meets its objectives.

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/choosing-an-automation-tool 169 / 174

Page 170: Assurance Lounge

Evaluation of the vendor (including training, support and commercial aspects).

Identification of internal requirements for coaching and mentoring in the use of the tool.

Environment Support and Ease of use

Testing of Database

Object identification feature of the tool and verifying against the objects of the application

Image Testing

Error Recovery Testing

Scripting Language Used and the required expertise in the team.

Support for various types of test – including functional, test management, mobile, etc., and also support for multiple testing frameworks.

Debug feature available in the tool. It should be easy to debug the automation software scripts.

Extensive test reports and results

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/choosing-an-automation-tool 170 / 174

Page 171: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.4. Testing ToolsThere are different types of Test automation tools available in the market for Automation testing. Different test tools support different testactivities. Some tools support more than one test activity. Some vendors offer suite of tools that support a large range of test activity. Some toolsare intrusive (they affect the test result)

Some of the Test Automation tools available in the market are:

Functional Testing tools: Following are the some of the tools which can be used for Functional Automation testing:

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-tools 171 / 174

Page 172: Assurance Lounge

Functional Testing tools: Following are the some of the tools which can be used for Functional Automation testing:

HP Quick Test ProfessionalSeleniumIBM Rational Functional TesterWinRunner

Test Management tools: Following are some of the Test Management &

Defect Management Tools

HP Quality CenterTCS Application Life Cycle ManagerIBM Rational Quality ManagerTest Link

Performance Testing tools: Following are the some of the tools which can be used for Performance Automation testing:

LoadRunnerSilk test performerIBM Rational performance testerOpen STAWebload

Defect Tracking tools: Bugzilla is an example of defect tracking tool

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

����

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/testing-tools 172 / 174

Page 173: Assurance Lounge

� Pre-ILP Home

� Assurance LoungeLogout�

� Course Completion Quiz

Assurance

1.Introduction to TestingQ

2.SDLC and STLCQ

3.Testing as a careerQ

4.Qualities of a TesterQ

5.Database ConceptsQ

6.Data Query LanguageQ

7.DDL, DML & TCLQ

8.Single Row, Aggregate / Group functions in SQLQ

9.Categories of testingQ

10.Testing TechniquesQ

11.Levels of testing & test casesQ

12.Defect ManagementQ

13.Automation TestingQ

13.5. Manual Testing Vs Automation Testing

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/manual-testing-vs-automation-testing 173 / 174

Page 174: Assurance Lounge

Related Videos

Ask a doubt (Misuse of 'Ask a Doubt' Section w ill be dealt as per the Terms & Conditions of Campus Commune)

��Q�

Campus Commune 8/5/2014

https://campuscommune.tcs.com/communities/assurance-lounge/content/manual-testing-vs-automation-testing 174 / 174