Software Testing & Quality Assurance Slides - Week 2
Date Published: 05/02/2019
In these slides, we will learn about what is manual testing, what is the test scenario and how to write the test case with an example. We will take a real-world scenario to understand what is a Software Testing Life Cycle and what we do on each phase, what is the exit criteria (when we are ready to move to next phase) and what are output artifacts of each phase.


Summary of the Last Class
  • Qualities of a good QA Tester
  • Technical skills required to become a QA tester
  • Responsibilities of a QA Tester
  • Software Types
  • Computer Languages
  • Software Development Team
  • Software Development Life Cycle [SDLC]

    Agenda
    • Manual Testing
    • Test Scenario
    • Test Case
    • Exercise

      Manual Testing
      • Manual testing is the process of manually testing software for defects. It requires a tester to play the role of an end user and use all features of the application to ensure correct behavior. 
      • To ensure completeness of testing, the tester often follows a written test plan that leads them through a set of important test cases.

        Test Scenario
        • The scenario is any functionality that can be tested.
        • Also called Test Condition or Test Possibility
        • To test an application first its “test scenarios” are identified.
        • Test scenario simply means “what to test”
        • A test scenario is derived from a functional requirement.
        • It is usually one line statement.

          Test Scenario – Examples
          • Check login functionality: Validate the login functionality of the site and make sure only registered users can log in.
          • User must be able to view current balance and transaction history.
          • User must be able to transfer balance.
          • If points exist then the user must be able to redeem them.
          • User must be able to pay bills and set recurring payments.
          • Find out all test scenarios in Photo-World web site.

            Test Cases
            • A Test Case is a set of actions executed to verify a particular feature or functionality of your software application.
            • 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 is working as it was originally established for it to do.
            • A Test Case is “How to test”
            • A Test Case contains detailed information about testing a particular functionality.
            • Test Case is derived from a test scenario.
            • One Test Scenario has many test cases associated with it.

              Sample Test Case
              Test ScenarioTest CasePre ConditionsTest StepsTest DataExpected ResultsActual ResultsPass/Fail

              Check login functionality






              Check response on entering valid user name and password




              Website/login page must be loaded





              1. Enter user name
              2. Enter password
              3. Press “Login” button


              User name: testUser1!

              Password: MERCURY23




              Login must be successful





              Login Successful






              Pass








              Table Explanation
              • Test Scenario: In this column write out the name of the test scenario to which test case belongs.
              • Test Case: One line description of the test case.
              • Pre – Conditions: specifies things that must be in place before the test can run
              • Test Steps: In detail, write out what needs to be done to test this test case. Suppose the author of the test case has left the organization or is on a vacation or is sick and off duty or is very busy with other critical tasks and you are recently hired and have been asked to execute the test case. Since you are new, it would certainly help to have test steps documented.
              • Test Data: Data required to test. It is the job of the tester to find out or prepare data to the test case.
              • Expected Result: Specifies the condition or state of the application after the test case completes successfully.
              • Actual Results: You will document the results observed in the Actual Results column and may even attach some screenshots.
              • This entire table may be created in Word, Excel or any other Test management tool.

                Test Cases – How to Develop
                • Test Cases can be identified and developed from
                  • Documentation: Read the documentation to find out client’s requirements
                  • Application Under Testing [AUT]: If documentation is not available or it's not detailed enough to develop test cases then use the application as an end user to identify Test Cases.
                  • Experience: There are some functionalities that are repeatedly used in many software applications. For example, login functionality, payment through credit card, etc. To develop Test Cases of such functionalities tester can user his/her prior experience



                Test Basis

                Exercise
                • Identify and create Test Cases of the Test Scenarios identified in the last exercise.

                  Software Testing Life Cycle (STLC)
                  • Software Testing is not a single activity. 
                  • It’s a series of different activities performed throughout the software development process. 
                  • These activities are called Software Testing Life Cycle (STLC).


                  Software Testing Life Cycle (STLC)

                    STLC Scenario
                    • Let's take a scenario; the client comes with requirements:
                      • Make me a website where anybody can list his extra parking or storage space for rental.
                      • User should be able to search parking or storage by address or zip code.
                      • Information about parking or storage e.g. pictures, videos, size, number of units, dimensions, covered or open space, availability dates, etc. should be displayed.
                      • User should be able to rent parking or storage according to their desired dates and pay through PayPal.
                    • The Project Name is www.ParkOStore.com.


                      STLC – Requirements Analysis
                      • The testing team studies the requirements from a testing point of view to identify testable requirements.
                      •  A QA team may interact with Client, Business Analyst, Team Leads, System Architects to understand the requirements. 
                      • Requirements can be Functional (Software must do) or non-functional (performance or security).
                      • Automated testing tool feasibility analysis & selection is done in this phase.
                      • Entry Criteria
                        • Requirements, Application Architecture documents should be available.


                        STLC – Requirements Analysis
                        • 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 – Automated Testing Tool (if required).
                        • Exit Criteria
                          • Signed off RTM
                          • Test automation feasibility report signed off by the client
                        • Deliverables
                          • RTM (Software requirements -> Tests to be performed)
                          • Automation feasibility report. (if applicable)


                          STLC – Requirements Analysis Example
                          • According to ParkOStore’s client's requirements, this phase may have the following information based on the requirements document (BRD & SRS).
                            • Parking and Storage listing, searching and renting modules are prioritized to be tested in order.
                            • Unit, System, Integration, Regression, Security, GUI and API Testing would be performed.
                            • RTM Document is created.
                              • Business Requirement -> System Requirement -> Test Cases 

                            Software Testing Life Cycle (STLC)

                              STLC – Test Planning
                              • Also called Test Strategy phase.
                              • Senior QA manager will determine effort and cost estimates for the project.
                              • The final project plan is prepared in this phase.
                              • Entry Criteria
                                • Requirements document
                                • Requirement traceability matrix document
                                • Test automation feasibility document. 


                                STLC – Test Planning
                                • Activities
                                  • Preparation of test plan/strategy document for various types of testing.
                                  • Test tool selection. 
                                  • Test effort estimation. 
                                  • Resource planning and determining roles and responsibilities.
                                  • Training requirement.
                                • Exit Criteria
                                  • Approved test plan/strategy document.
                                  • Effort estimation document signed off.
                                • Deliverables
                                  • Test plan / strategy document.
                                  • Effort estimation document.



                                  STLC – Test Planning Example
                                  • For searching and verifying addresses in ParkOStore, Google Map and Address API would be used. So the SOAPUI tool would be used for testing APIs.
                                  • For performance testing, HP LoadRunner is selected to be used.
                                  • The total estimated effort for the testing complete product is 160 hours.
                                  • One Automated testing tool and two manual testing resources are assigned to the project.

                                    Software Testing Life Cycle (STLC)

                                      STLC – Test Case Development
                                      • This phase involves creation, verification, and rework of test cases & test scripts.
                                      • Test data, is identified/created and is reviewed and then reworked as well.
                                      • Entry Criteria
                                        • Requirements Documents
                                        • RTM and test plan
                                        • Automation analysis report
                                      • Activities
                                        • Create test cases, automation scripts (if applicable)
                                        • Review and baseline test cases and scripts 
                                        • Create test data (If Test Environment is available)

                                        STLC – Test Case Development
                                        • Exit Criteria
                                          • Reviewed and signed test Cases/scripts
                                          • Reviewed and signed test data
                                        • Deliverables
                                          • Test cases/scripts 
                                          • Test data

                                          STLC – Test Case Development Example
                                          • Once resources are assigned to the project, they start working on this project and create the following test cases and test data for them. E.g.
                                            • Add Parking/Storage Listing with Valid Data Test Case
                                            • Verify Parking/Storage Listing Address with Invalid Data Test Case
                                            • Search Parking/Storage Listing with Invalid Data Test Case
                                            • Rent Parking/Storage Listing with Valid Data Test Case etc.
                                          • LoadRunner Testing Script
                                            • Created test script for 1000 simulated users.
                                          • Test Case Document Architecture
                                            • Test Case ID
                                            • Test Scenario
                                            • Test Steps
                                            • Test Data
                                            • Expected Result
                                            • Actual Result
                                            • Pass/Fail

                                            Software Testing Life Cycle (STLC)

                                              STLC – Test Environment Setup
                                              • Test environment decides the software and hardware conditions under which a work product is tested.
                                              • Test environment set-up is one of the critical aspects of the testing process and can be done in parallel with Test Case Development Stage. 
                                              • If the client/customer provides a test environment, the test team may not need to do it.
                                              • Entry Criteria
                                                • System Design and architecture documents are available.
                                                • Environment set-up plan is available.
                                              • Activities
                                                • Understand the required architecture, environment set-up and prepare hardware and software requirement list for the Test Environment. 
                                                • Setup test Environment and test data 
                                                • Perform a smoke test on the build 
                                              • Deliverables
                                                • Completed RTM with execution status 
                                                • Test cases updated with results 
                                                • Defect reports 

                                                STLC – Test Environment Setup Example
                                                • New QA server is configured to test ParkOStore application with 32GB RAM and Windows Server 2012 R2.
                                                • LoadRunner and SoapUI are installed in the server.

                                                  Software Testing Life Cycle (STLC)

                                                    STLC – Test Execution
                                                    • During 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 the development team for correction and retesting will be performed.
                                                    • Entry Criteria
                                                      • Baselined RTM, Test Plan, Test case/scripts are available
                                                      • A test environment is ready
                                                      • Test data set up is done
                                                      • Unit/Integration test report for the build to be tested is available

                                                      STLC – Test Execution
                                                      • Activities 
                                                        • Execute tests as per plan
                                                        • Document test results, and log defects for failed cases 
                                                        • Map defects to test cases in RTM 
                                                        • Retest the defect fixes 
                                                        • Track the defects to closure
                                                      • Exit Criteria
                                                        • All tests planned are executed
                                                        • Defects logged and tracked to closure
                                                      • Deliverables
                                                        • Completed RTM with execution status 
                                                        • Test cases updated with results 
                                                        • Defect reports 

                                                        STLC – Test Execution Example
                                                        • Since test cases/test data has been prepared along with QA Server configuration for ParkOStore application. Its time to test all identified test cases.
                                                        • Example Defect: Test team found that when the user is adding new Parking/Storage listing, even for wrong address it is allowing the user to complete its listing. 
                                                        • All identified defects are sent to developers and after fixing, retested functionality. 
                                                        • Test team creates defects report of all identified bugs.

                                                          Software Testing Life Cycle (STLC)

                                                            STLC – Test Cycle Closure
                                                            • The testing team will meet, discuss and analyze testing artifacts to identify strategies that have to be implemented in the future.
                                                            • Taking lessons from the current test cycle.
                                                            • The idea is to remove the process bottlenecks for future test cycles and share best practices for any similar projects in the future.
                                                            • Entry Criteria
                                                              • Testing has been completed
                                                              • Test results are available
                                                              • Defect logs are available

                                                              STLC – Test Cycle Closure
                                                              • Activities
                                                                • Evaluate cycle completion criteria based on Time, Test coverage, Cost, Software, Critical Business Objectives, and Quality.
                                                                • Prepare test metrics based on the above parameters. 
                                                                • Document the learning out of the project 
                                                                • Prepare Test closure report 
                                                                • Qualitative and quantitative reporting of the quality of the work product to the customer. 
                                                                • Test result analysis to find out the defect distribution by type and severity.


                                                                STLC – Test Cycle Closure
                                                                • Exit Criteria
                                                                  • Test Closure report signed off by the client.
                                                                • Deliverables
                                                                  • Test Closure report 
                                                                  • Test metrics

                                                                  STLC – Test Cycle Closure Example
                                                                  • The testing team learned a lesson from ParkOStore project is that they would get early training of any new technology used in projects for better testing. E.g. Google Address & Google Map.
                                                                  • The testing team learned a lesson is that they would more participate in meeting with clients for updated or changed requirements to keep their test cases and document up to date.

                                                                    V Model Testing
                                                                    • The costs of fixing a defect increases across the development life cycle. The earlier in the life cycle a defect is detected, the cheaper it is to fix it.
                                                                    • To address the Waterfall Model problem, the V model of testing was developed for every phase, in the Development life cycle, there is a corresponding Testing phase.


                                                                      V Model Testing

                                                                      • The left side is SDLC and the right side is STLC (Software Test Life Cycle).
                                                                      • V Model: Every phase should be tested until the final product development.

                                                                        V Model Testing (V-Shaped SDLC)
                                                                        • Advantages
                                                                          • Simple and easy to use.
                                                                          • Testing activates happen parallel to development, save time and a higher chance of success over Waterfall SDLC.
                                                                          • Early defect tracking & avoid downwards flow of the defects.
                                                                          • Good for small project with well-understood client’s requirements.
                                                                        • Disadvantages
                                                                          • Less flexible and rigid.
                                                                          • No prototype since the software is developed in the implementation phase.
                                                                          • Requirements change also affect the corresponding testing documents update.
                                                                        • When to Use
                                                                          • Small to medium size project with well-understood requirements.
                                                                          • Have highly skilled technical resources.

                                                                          Agile Development Life Cycle - Overview
                                                                          • Mostly used SDLC in the IT industry.
                                                                          • Agile development model is a type of Incremental model.
                                                                            • Incremental Model: Divide full software development into various small builds (Multi Waterfall Cycles)

                                                                            Agile Development Life Cycle - Overview
                                                                            • Software is developed in incremental, rapid cycles.
                                                                            • This results in small incremental releases with each release building on previous functionality. 
                                                                            • Each release is thoroughly tested to ensure software quality is maintained.
                                                                            • Advantages
                                                                              • Customer satisfaction by continues delivery of the working product.
                                                                              • Strong interaction between Customer, developer, and testers.
                                                                              • Late requirements changings are welcomed.
                                                                            • Disadvantages
                                                                              • Difficult to estimate the total cost of the complete software.
                                                                            • When to use an Agile model
                                                                              • Continues changing requirements

                                                                              Agile Development Life Cycle - Overview


                                                                                Software Testing in SDLC

                                                                                    Question?


                                                                                    Keywords: software testing, software testing tutorial, software testing lifecycle, test case, test case tutorial, how to write test case, stlc, v model testing, v model