Software Testing & Other Concepts

  • Published on
    14-Apr-2018

  • View
    213

  • Download
    0

Embed Size (px)

Transcript

<ul><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 1/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page1</p><p>What is a Software Methodology?</p><p>A methodology is a package of methods. In simple words, its a bundle of practical ideas and proven</p><p>practises which help in efficient software project management.</p><p>Software Test Methodology: The important Software Test Methodologies are discussed below </p><p>Waterfall model</p><p>What is it?</p><p>In the waterfall model, software development progress through various phases like Requirements Analysis,</p><p>Design etc. - sequentially.</p><p>In this model, next phase begins only when the earlier phase is completed.</p><p>What Is The Testing Approach?</p><p>The first phase in waterfall model is the requirements phase in which all the project requirements are</p><p>completely defined before starting the testing. During this phase, the test team brainstorms the scope of</p><p>testing , test strategy and drafts a detailed test plan.</p><p>Only once the design of software is complete, the team will move on to execution of the test cases to</p><p>ensure that the developed software behaves as it expected.</p><p>In this methodology, the testing team proceeds to the next phase only when the previous phase is</p><p>completed.</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 2/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page2</p><p>Advantages</p><p>This model is very simple to plan and manage. Hence, projects where requirements are clearly defined and</p><p>stated beforehand can be easily tested using waterfall model.</p><p>Disadvantages</p><p>In the waterfall model, you can begin with the next phase only once the previous phase is completed.</p><p>Hence, this model cannot accommodate unplanned events and uncertainty.This methodology is not suitable</p><p>for projects where the requirements change frequently.</p><p>Iterative development</p><p>What is it?</p><p>In this model, a big project is divided into small parts, and each part is subjected to multiple iterations of</p><p>the waterfall model. At the end of iteration, a new module is developed or an existing module is enhanced.This module is integrated into the software architecture and the entire system is tested all together</p><p>What is the testing Approach?</p><p>As soon as iteration is completed, the entire system is subjected to testing. Feedback from testing is</p><p>immediately available and is incorporated in next cycle. The testing time required in successive iterationcan be reduced based on the experience gained from past iterations.</p><p>Advantages</p><p>The main advantage of iterative development is the test feedback is immediately available at the end ofeach cycle.</p><p>Disadvantages</p><p>This model increases communication overheads significantly since at the end of each cycle, feedback about</p><p>deliverables, effort etc. must be given.</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 3/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page3</p><p>Agile methodology</p><p>What is it?</p><p>Traditional software development methodologies work on the premise that software requirements remain</p><p>constant throughout the project. But with increase in complexity, the requirements undergo numerous</p><p>changes and continuously evolve. At times, the customer himself is not sure what he wants. Though</p><p>iterative model addresses this issue, its still based on the waterfall model.</p><p>In Agile methodology , software is developed in incremental, rapid cycles. Interactions amongst</p><p>customers, developers and client are emphasized rather than processes and tools. Agile methodology</p><p>focuses on responding to change rather than extensive planning.</p><p>What Is The Testing Approach?</p><p>Incremental testing is used in agile development methods and hence, every release of the project is testedthoroughly. This ensures that any bugs in the system are fixed before the next release.</p><p>Advantages</p><p>It is possible to make changes in the project at any time to comply with the requirements.This incrementaltesting minimizes risks.</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 4/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page4</p><p>Disadvantages</p><p>Constant client interaction means added time pressure on all stake holders including the client themselves ,</p><p>software development and test teams .</p><p>Extreme programming</p><p>What is it?</p><p>Extreme programming is a type of agile methodology which believes in short development cycles. A</p><p>project is divided into simple engineering tasks. Programmers code a simple piece of software and get back</p><p>to customer for feedback. Review points from the customer are incorporated and the developers proceed</p><p>with the next task.</p><p>In extreme programming developers usually work in pairs. Extreme</p><p>Programming is used in places where customer requirements are constantly changing.</p><p>What Is The Testing Approach?</p><p>Extreme programming follows a Test-driven development which is described as follows </p><p>1. Add a test case to the test suite to verify the new functionality which is yet to be developed2. Run the all tests and obviously the new test case added must fail since the functionality is not coded yet3. Write some code to implement the feature/functionality4.</p><p>Run the test suite again .This time , the new test case should pass since the functionally has been coded</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 5/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page5</p><p>Advantages</p><p>Customers having a vague software design in mind could use extreme programming</p><p>Continuous testing and continuous integration of small releases ensure software code is delivered is of high</p><p>quality</p><p>Disadvantages</p><p>Meetings amongst the software development team and clients add to time requirements.</p><p>How to setup software testing methodologies?</p><p>Software testing methodologies should not be setup just for the sake of testing software code. The big</p><p>picture should be considered and the prime goal of the project should be satisfied by the testingmethodology.</p><p>Scheduling</p><p>Realistic scheduling is the key to the implementation of successful testing methodology and the schedule</p><p>should meet the needs of every member of the team.</p><p>Defined deliverables</p><p>In order to keep all the members of the team on the same page, well defined deliverables should be</p><p>provided. The deliverables should contain direct content without any ambiguity.</p><p>Test approach</p><p>Once scheduling is complete and defined deliverables are made available, the testing team should be able</p><p>to formulate the right test approach. Definition documents and developer meetings should indicate the team</p><p>about the best test approach that can be used for the project.</p><p>Reporting</p><p>Transparent reporting is very difficult to achieve, but this step determines the effectiveness of the testing</p><p>approach used in the project.</p><p>What Is Software Testing?</p><p> Software testing is a process used to identify the correctness, completeness, and quality ofdeveloped computer software. It includes a set of activities conducted with the intent of finding errors in</p><p>software so that it could be corrected before the product is released to the end users.</p><p> In simple words, software testing is an activity to check whether the actual results match the</p><p>expected results and to ensure that the software system is defect free .</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 6/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page6</p><p>Fundamental Principles of Software Testing</p><p> Consider a scenario where you are moving a file from folder A to Folder B. Think of all thepossible ways you can test this.</p><p> Apart from the usual scenarios, you can also test the following conditions Trying to move the file when it is Open You do not have the security rights to paste the file in Folder B Folder B is on a shared drive and storage capacity is full. Folder B already has a file with the same name, in fact the list is endless Or suppose you have 15 input fields to test ,each having 5 possible values , the number of</p><p>combinations to be tested would be 5^15</p><p> If you were to test the entire possible combinations project EXECUTION TIME &amp; COSTSwill rise exponentially.</p><p> Hence, one of the testing principle states that EXHAUSTIVE testing is not possible. Instead weneed optimal amount of testing based on the risk assessment of the application .</p><p> And the million dollar question is, how do you determine this risk? To answer this lets do an exercise In your opinion, which operations are most likely to cause your Operating system to fail? I am sure most of you would have guessed Opening 10 different application all at the same time. So if you were testing this Operating system you would realize that defects are likely to be found in</p><p>multi-tasking and needs to be tested thoroughly which brings us to our next principle Defect</p><p>Clustering which states that a small number of modules contain most of the defects detected. By experience you can identify such risky modules. But this approach has its own problems If the same tests are repeated over and over again , eventually the same test cases will no</p><p>longer find new bugs</p><p> This is the another principle of testing calledPesticide Paradox To overcome this, the test cases need to be regularly reviewed &amp; revised, adding new &amp;</p><p>different test cases to help find more defects.</p><p> But even after all this sweat &amp; hard work in testing, you can never claim you product is bug free.To drive home this point , lets see this video of public launch of Windows 98</p><p> You think a company like MICROSOFT would not have tested their OS thoroughly &amp; would risktheir reputation just to see their OS crashing during its public launch!</p><p> Hence, testing principle states that - Testing shows presence of defects i.e. Software Testingreduces the probability of undiscovered defects remaining in the software but even if no</p><p>defects are found, it is not a proof of correctness.</p><p> But what if , you work extra hard , taking all precautions &amp; make your software product 99% bugfree .And the software does not meet the needs &amp; requirements of the clients.</p><p> This leads us to our next principle, which states that- Absence of Error is a Fallacy i.e. Finding and fixing defects does not help if the system build is</p><p>unusable and does not fulfil the users needs &amp; requirements</p><p> To fix this problem , the next principle of testing states that Early Testing - Testing should start as early as possible in the Software Development Life</p><p>Cycle. so that any defects in the requirements or design phase are captured as well more on this</p><p>principle in a later training tutorial.</p><p> And the last principle of testing states that the Testing is context dependent which basicallymeans that the way you test a e-commerce site will be different from the way you test a</p><p>commercial off the shelf application</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 7/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page7</p><p>Summary of the Seven Testing Principles</p><p>Principle 1 Testing shows presence of defects</p><p>Principle 2 Exhaustive testing is impossible</p><p>Principle 3 Early Testing</p><p>Principle 4 Defect Clustering</p><p>Principle 5 Pesticide Paradox</p><p>Principle 6 Testing is context dependent</p><p>Principle 7 Absence of errors - fallacy</p><p>Integration Testing</p><p>In Integration Testing, individual software modules are integrated logically and tested as a group.</p><p>A typical software project consists of multiple software modules, coded by different programmers.</p><p>Integration testing focuses on checking data communication amongst these modules.</p><p>Hence it is also termed as I &amp; T (Integration and Testing), String Testing and sometimes ThreadTesting.</p><p>Need of Integration Testing:</p><p>Although each software module is unit tested, defects still exist for various reasons like</p><p> A Module in general is designed by an individual software developer who understanding andprogramming logic may differ from other programmers. Integration testing becomes necessary to</p><p>verify the software modules work in unity</p><p> At the time of module development, there wide chances of change in requirements by the clients.These new requirements may not be unit tested and hence integration testing becomes necessary.</p><p> Interfaces of the software modules with the database could be erroneous External Hardware interfaces, if any, could be erroneous Inadequate exception handling could cause issues.</p><p>Integration Test Case:</p><p>Integration Test case differs from other test cases in the sense it focuses mainly on the interfaces &amp; flow</p><p>of data/information between the modules. Here priority is to be given for the integrating links rather</p><p>than the unit functions which are already tested.</p><p>Sample Integration Test Cases for the following scenario: Application has 3 modules say Login Page,</p><p>Mail box and Delete mails and each of them are integrated logically.</p><p>Here do not concentrate much on the Login Page testing as its already being done. But check how its</p><p>linked to the Mail Box Page.</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 8/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page8</p><p>Approaches/Methodologies/Strategies of Integration Testing:</p><p>The Software Industry uses variety of strategies to execute Integration testing , viz.</p><p> Big Bang Approach : Incremental Approach: which is further divided into following</p><p>o Top Down Approacho Bottom Up Approacho Sandwich Approach - Combination of Top Down and Bottom Up</p><p>Below are the different strategies, the way they are executed and their limitations as well advantages.</p><p>Big Bang Approach:</p><p>Here all component are integrated together at once, and then tested.</p><p>Advantages:</p><p> Convenient for small systems.Disadvantages:</p><p> Fault Localization is difficult. Given the sheer number of interfaces that need to be tested in this approach, some interfaces links to</p><p>be tested could be missed easily.</p><p> Since the integration testing can commence only after all the modules are designed, testing teamwill have less time for execution in the testing phase.</p><p> Since all modules are tested at once, high risk critical modules are not isolated and tested onpriority. Peripheral modules which deal with user interfaces are also not isolated and tested on</p><p>priority.</p><p>Test Case ID Test Case ObjectiveTest Case</p><p>DescriptionExpected Result</p><p>1</p><p>Check the interface</p><p>link between theLogin and Mailbox</p><p>module</p><p>Enter login</p><p>credentials andclick on the Login</p><p>button</p><p>To be directed to the Mail Box</p><p>2</p><p>Check the interface</p><p>link between the</p><p>Mailbox and Delete</p><p>Mails Module</p><p>From Mail box</p><p>select the an email</p><p>and click delete</p><p>button</p><p>Selected email should appear in the</p><p>Deleted/Trash folder</p></li><li><p>7/30/2019 Software Testing &amp; Other Concepts</p><p> 9/27</p><p>Basic Concepts</p><p>Prepared By: Lajish Lakshmanan | Page9</p><p>Incremental Approach:</p><p>In this approach, testing is done by joining two or more modules that are logically related. Then the other</p><p>related modules are added and tested for the proper functioning. Process continues until all of the modules</p><p>are joined and tested successfully.</p><p>This process is carried out by using dummy programs calledStubs and Drivers. Stubs and Drivers do not</p><p>implement the entire programming logic of the software module but just simulate data communication with</p><p>the calling module.</p><p>Stub: Is called by the Module under Test.</p><p>Driver: Calls the Module to be tested.</p><p>Incremental Approach in turn is carried out by two different Methods:</p><p>o Bottom Upo Top D...</p></li></ul>

Recommended

View more >