CMPE/SE 131 Software Engineering April 11 Class Meeting

Slides:



Advertisements
Similar presentations
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Advertisements

Test Yaodong Bi.
Test process essentials Riitta Viitamäki,
Lecture 8: Testing, Verification and Validation
Chapter 4 Quality Assurance in Context
Software Architecture Prof.Dr.ir. F. Gielen
Illinois Institute of Technology
1 Testing. 2 About Testing  The reason the program is in testing is that it probably doesn’t work!  We test to find bugs before our users and hope that.
SE 555 Software Requirements & Specification Requirements Validation.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Chapter 11: Testing The dynamic verification of the behavior of a program on a finite set of test cases, suitable selected from the usually infinite execution.
Introduction to Software Testing
Software Testing & Strategies
Issues on Software Testing for Safety-Critical Real-Time Automation Systems Shahdat Hossain Troy Mockenhaupt.
Functional Testing Test cases derived from requirements specification document – Black box testing – Independent testers – Test both valid and invalid.
ECE 355: Software Engineering
CS 160: Software Engineering November 10 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
1 Software Testing (Part-II) Lecture Software Testing Software Testing is the process of finding the bugs in a software. It helps in Verifying and.
March 13, 2001CSci Clark University1 CSci 250 Software Design & Development Lecture #15 Tuesday, March 13, 2001.
CompSci 230 Software Design and Construction
Software testing basic. Main contents  Why is testing necessary?  What is testing?  Test Design techniques  Test level  Test type  How to write.
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
Team Skill 6: Building the Right System From Use Cases to Implementation (25)
Software Testing Testing principles. Testing Testing involves operation of a system or application under controlled conditions & evaluating the results.
 CS 5380 Software Engineering Chapter 8 Testing.
Testing Basics of Testing Presented by: Vijay.C.G – Glister Tech.
Testing Workflow In the Unified Process and Agile/Scrum processes.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
University of Palestine software engineering department Testing of Software Systems Testing throughout the software life cycle instructor: Tasneem.
Software Construction Lecture 18 Software Testing.
MANUAL TESTING KS SESSION PRESENTED BY 26/11/015 VISHAL KUMAR.
Chapter 2: Testing in Software Life Cycle MNN1063 System Testing and Evaluation.
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
What is a level of test?  Defined by a given Environment  Environment is a collection of people, hard ware, software, interfaces, data etc.
Software Quality Assurance and Testing Fazal Rehman Shamil.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
CS 160 and CMPE/SE 131 Software Engineering April 12 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
Testing and Evolution CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS 160 and CMPE/SE 131 Software Engineering May 12 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
Software Testing Strategies for building test group
Software Testing.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
PREPARED BY G.VIJAYA KUMAR ASST.PROFESSOR
CompSci 230 Software Construction
Testing Verification and the Joy of Breaking Code
Software Engineering (CSI 321)
Testing More In CS430.
SOFTWARE TESTING OVERVIEW
Chapter 9, Testing.
SEVERITY & PRIORITY RELATIONSHIP
Software Quality Engineering
IEEE Std 1074: Standard for Software Lifecycle
Applied Software Implementation & Testing
Introduction to Software Testing
Lecture 09:Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
Software Testing & Quality Management
CSE 303 Concepts and Tools for Software Development
Baisc Of Software Testing
Welcome to Corporate Training -1
Applying Use Cases (Chapters 25,26)
Applying Use Cases (Chapters 25,26)
Chapter 11: Integration- and System Testing
System analysis and design
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Chapter 11: Integration and System Testing
Software Testing Strategies
Presentation transcript:

CMPE/SE 131 Software Engineering April 11 Class Meeting Department of Computer Engineering San José State University Spring 2017 Instructor: Ron Mak www.cs.sjsu.edu/~mak

“Swing Project” Cartoon

“Swing Project” Cartoon, cont’d

“Swing Project” Cartoon, cont’d

“Swing Project” Cartoon, cont’d http://projectcartoon.com/about/

Millions of Lines of Code See http://cdn.makeuseof.com/wp-content/uploads/2014/01/million-lines-of-code-large.jpg?f7c509

One Month to Go! Review your project schedule. Prioritize tasks and put off lower priority ones. Agree upon a release candidate (RC) and make that your primary goal. Define the next RC when you’ve achieved the current one. Each RC should be something you can turn in. It’s better to turn in a working application, even if it doesn’t have all the features, than one that doesn’t work at all.

One Month to Go! cont’d Stability is critical. Do frequent builds. Be wary of major last-minute changes. Your final project documentation can include release notes that describe any missing features.

The Cost of Correcting Defects The cost to correct a defect increases the later it is corrected. 50 to 200 times more expensive to correct later than sooner An iterative (agile) process catches defects soon after they’re made.

Make Small Mistakes Early Make a carefully planned series of small mistakes early to avoid making unplanned large mistakes later. Make and correct early mistakes because they cost much less than late mistakes. Example: Create four conceptual design alternatives in the beginning and throw three of them away = 3 small early mistakes. Example: Fail to do adequate design in the beginning and later rewrite the code three times = 3 large expensive mistakes.

Software Validation and Verification (V&V) Work with the client to make sure that the product requirements are complete and correct. Make sure that the proposed product meets all the requirements. “Are we building the right product?” Verification Work with the developers to make sure that the product is being developed with high quality standards. “Are we building the product right?”

Software Reliability Reliable software has a low probability of failure while operating for a specified period of time under specified operating conditions. The specified time period and the specified operating conditions are part of the nonfunctional requirements. For some applications, reliability may be more important than the other requirements. mission-critical applications medical applications

Software Reliability, cont’d Reliable software is the result of good software quality assurance (SQA) throughout an application’s life cycle. Design Good requirements elicitation Good object-oriented design and analysis Good architecture

Software Reliability, cont’d Development Good management (e.g., source control, reasonable schedules) Good coding practices (e.g., design patterns) Good testing practices Deployment Preventive maintenance (e.g., training) Performance monitoring Failure analysis (when failures do occur)

Software Testing What is testing? What is a successful test? Who does testing? When does testing occur? What are the different types of testing? What testing tools are available? How do you know your tests covered everything? When can you stop testing?

What is testing? Testing is a systematic procedure to discover faults in software in order to prevent failure. Failure: A deviation of the software’s behavior from its specified behavior, according to its requirements. Can be minor to major (such as a crash).

What is testing? Erroneous state: A state that the operating software is in that will lead to a failure. Example: low on memory Fault: What caused the software to enter an erroneous state. AKA: defect, bug Example: a memory leak fault  erroneous state  failure

What is a successful test? A successful test is one that finds faults (bugs). A failed test is a successful test. Testing is the opposite of coding. Coding: Create software and try to get it to work. Testing: Break the software and demonstrate that it doesn’t work.

Testing Mindset Testing and coding require different mindsets. It can be very difficult for developers to test their own code. If you wrote the code, you psychologically want it to work and not see it break. Since you know how the code should be used, you may not think to try using it in ways other than as you intended.

Who does testing? Developers Testers As difficult as it may be, you must test your own code. unit testing Test each other’s code peer testing Testers Members of the quality assurance (QA) department. Software engineers who did not write the code. Manual writers and trainers who create examples and demos.

Who does testing? cont’d Users As beta testers As customers

When does testing occur? XXX Recall the Old Waterfall Model: Requirements Design Implementation Testing In the new Agile Methodology, testing is part of each and every iteration. Testing occurs throughout development, not just at the end.

When does testing occur? cont’d

What are the different types of testing? Functional testing Does the code do what it’s supposed to do? Tests derived from use cases. Unit testing Developers test an individual “unit”. Unit: A small set of related components. Regression testing Rerun previous tests to ensure that the latest code changes didn’t break something. Often run automatically from scripts.

Different types of testing, cont’d Integration testing Developers test how well their units work together with other units. Usability testing Is the user interface easy to use?

Different types of testing, cont’d System testing Test how an entire system works. Performance testing How quickly does the system respond? Stress testing How much can the system tolerate before breaking?

Alpha Testing vs. Beta Testing Usability and system testing of a nearly complete application in the development environment. Beta testing Usability and system testing of a complete or nearly complete application in the user’s environment. It is not uncommon for software companies to release an application to the public for beta testing. New releases of web-based applications are put “into beta” by software companies.

Black Box Testing vs. White Box Testing Deals only with the input/output behavior of the unit. Calling parameters Return values The internals of the unit are not considered. Commonly known as functional testing. White box testing Tests the internal behavior of the unit. execution paths state transitions Part of each developer’s unit testing.

Unit Testing Each unit test focuses on components created by a developer. Done by the developer before committing the code to the source repository. Easier to find and fix bugs when there are fewer components. Bottom-up testing. Developers create test cases to do unit tests.

Unit Testing: Test Cases Test case: A set of input values for the unit and a corresponding set of expected results. Input values for a unit of a GUI application can include user actions. A test case can be run within a testing framework (AKA test bed, test harness) consisting of a test driver and one or more test stubs.

Unit Testing: Test Cases, cont’d Test driver Simulates the part of the system that calls the unit. Calls the unit and passes in the input values. Test stub Simulates the components that the unit depends on. When called by the unit, a test stub responds in a correct or “reasonable” manner in order to allow the unit to continue operating.

Unit Testing: Testing Framework STUB calls UNIT (What’s being tested) TEST DRIVER calls TEST STUB calls TEST STUB calls

Writing and Running Unit Tests Developers are responsible for writing unit tests during each iteration. Whenever you design and write a new class, write a unit test that tests that class. Developers are responsible for running the unit tests.

Rails Support for Testing Chapter 10 of Rails Crash Course Switch from the Rails development environment to the Rails test environment. Preconfigured for testing Uses a separate database for running tests. Automatically recreated before each test run. Ensures that tests don’t depend on data already in the database. Run all the tests in file test/models/user_test.rb: bin/rake test test/models/user_test.rb

Integration Testing After your code has passed all the unit tests, you must do integration testing to see how your unit works with other units. Other units written either by you or by other developers. Not too hard to do if you’ve been doing continuous integration all along.

Stress Testing AKA load testing How well does the application behave under stress? Will its performance be acceptable?

Stress Testing, cont’d Add a test driver that pushes your application beyond what is possible with manual testing. Input values at or just beyond their limits Large number of input values Large database tables Large number of clients Large number of requests Large number of concurrent requests High frequency of requests Large number of types of requests

Stress Testing, cont’d Push your application until it breaks. Know what the breaking point is. If you don’t find out before deployment, the users will! Understand the behavior of your application under stress. Recognize when it’s about to break so you have time to mitigate.

Stress Testing, cont’d Use a multi-threaded test program to simulate a large number of simultaneous users of a web application. Measure the response time of each simulated user as the number of users increases.

Stress Testing Example: Mars Rover Mission Simulate multiple users performing client operations simultaneously. Can the server handle a heavy load?

Regression Testing Make a collection of unit tests. Run all the tests whenever you make a code change. Make sure your application did not lose functionality or “regress”. Make sure a bug fix did not introduce new bugs. Programmers are much less reluctant to improve their code if they can run regression tests to verify their changes.