Wednesday, 7 December 2022

Basic of Software Testing and Testing Methods

1  Introduction 

  • Testing is natural universal process followed by every entity in the universe. Every engineering application for every branch of engineering ,sciences and non-engineering fields need to be tested.
  • Software testing is necessary because we all make mistakes. Some of those mistakes are unimportant, but some of them are or dangerous. We need to check  everything  and anything we produce because  things can always go wrong-humans make mistakes all the time.
  • Since , we assume that our work may have mistakes, hence we all need to check our own work.. However some mistakes come from bad assumptions and blind spots, so we might the same mistakes when we check our own work as we made we did it.                                     
1.1 Software Testing  

  • Testing is defined as 'execution of a work product with intent to find a defect'. The primary role of software testing is not to demonstrate  the correctness  of software product, but to expose hidden defects so that they can be fixed.
  • The purpose of software testing is assurance of quality. Software testing can be stated  as the process of validating and verifying that a computer program/ application /product/service  to meet the requirements /expectation of user/customer.
1.2 Objectives of Testing
  1. Finding  Error : Testing is a process of executing a program with the intent of finding an error . A successful test is one that uncover and undiscovered  errors.
  2. Creating Good Test Case : A good test case is one that has a high probability of finding  Undiscovered error .
  3. quality Improvement : Testing  should systematically uncover different classes of errors in a minimum amount of time and with a minimum amount of effort.
  4. Satisfying Customer Requirements : A secondary benefit of testing is that it demonstrates that the software appear to be working as stated in the specifications.
  5. Reliability and Quality: The data collected through testing  can also provide an indication  of the software's reliability  and quality. But, testing cannot show the absense of defect-- it can only show that software defects are present .
1.1.2 Testing principles
  1. Principle #1: Testing shows presence of defects: Testing can show that defects are present ,but cannot provide  that are no defects. Testing reduces the probability of undiscovered defects remaining in the software but, even if no defects are found ,it is not a proof of correctness
  2. Principle #2: Exhaustive  testing is impossible:  Testing everything (all combination  of inputs and precondition) is not feasible expect for trivial cases. Instead of exhaustive testing, we use risks and priorities to focus testing efforts.
  3. Principle #3: Early testing: Testing activities should start as early as possible in the software or system development  life cycle and should be focused on defined objectives.
  4. Principle #4 : Defect clustering : A small number of modules contain most of the defects discovered during prerelease testing or show the most operational failures.
  5. Principle#5: Pesticide paradox:  If the same tests are repeated over and over again, eventually the same set of test cases will no longer find any new bugs. T overcome this 'pesticide paradox' the test cases need to be regularly reviewed and revised and new and different tests need to be written  to exercise different parts of the software or system to potentially find more defects.
  6. Principle#6: Testing is context dependent: Testing is done differently in different contexts .For example safety-critical software is tested differently from an e-commerce  site.
  7. Principle#7: Absence-of errors fallacy: Finding and fixing detects does not help if the system built is unusable and does not fulfill the user's needs ad expectation.
1.1.4 Goals Of Software Testing
     
    1. Immediate Goals : These goals are also called as short term goals. These testing goals are the                immediate result after testing .These goals contain:

       (i)  Bug Discovery: Is the immediate goal of software testing to find error at any stage of software                    development .Number of the bugs are discovered in early stage of testing.
       (ii) Bug Prevention: Is the consequent action of bugs discovery .

    2.Long Term Goals : These testing goals affect the software product quality in the long term. 

       (i) Quality: These goals enhance quality of the software product.
       (ii)Customer Satisfaction: These goals verifies the customer satisfaction for developed software .
       (iii)Reliability: It is a matter of confidence that the software  will not fail. In short reliability                         means  to gain the confidence of the customer by providing them a quality product.
        (iv)Risk  Management: Risk must be done to reduce the failure of product and to manage risk in 
             different  situation.
     3. Post Implemented Goals: These goals are important after the software product released. Some               of  them are listed below:
        (i)Reduce Maintenance Cost : Post-released error are costlier to fix and difficult to identify.
        (ii)Improved Software Testing Process: These goals improve the testing process for future use                  or software projects. These goals are known as post-implementation goals.

1.1.5 Software Testing Life Cycle
  1. Requirements Analysis: Testing should begin in the requirement phase of the software development life cycle. During the design phase ,testers work with developers in determining what aspects of a design are testable and with what parameters those tests work.  
  2. Test Planning : Test strategy ,test plan ,tested  creation. Since many activities will be carried out during testing, a plan is needed.
  3. Test Development: Test procedures, test scenarios, test cases, test datasets, test  script to use in testing  software.
  4. Test  Execution: Testers execute the software based on the plans and test documents then report any errors found to the development team.
  5. Test Reporting :  Once, testing is completed, testers generate metrics and make final reports on their test effort and whether or not the software tested is ready for release.
  6. Test Result  Analysis: It is also called as defect analysis. It is done by the development team usually along with the client ,in order to decide what defects should be assigned, fixed ,rejected or deferred to be dealt with later.
  7. Defect Retesting :  Once, defect has been dealt with by the development team .it is retested by the testing team.
  8. Regression Testing : It is common t have a small test program built of the subset of test for each integration of new ,modified, or fixed software, in order to ensure that the latest delivery  has ot ruined anything , and that the software product as a whole is still working correctly.
  9. Test Closure: Once, the test meets the exit criteria, the activities such as capturing the key outputs, lessons learned ,results ,logs documents related to the project are archived and used as a reference  for fortune projects.

Basic of Software Testing and Testing Methods

1  Introduction  Testing is natural universal process followed by every entity in the universe. Every engineering application for every bran...