CMPE/SE 131 Software Engineering April 13 Class Meeting

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

Object Oriented Analysis And Design-IT0207 iiI Semester
Test process essentials Riitta Viitamäki,
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Software Quality Assurance Plan
APPLICATION DEVELOPMENT BY SYED ADNAN ALI.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Testing - an Overview September 10, What is it, Why do it? Testing is a set of activities aimed at validating that an attribute or capability.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
CS 235: User Interface Design February 17 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CS 160: Software Engineering November 24 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
CS 235: User Interface Design October 8 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Week 14 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
CS 174: Web Programming November 25 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Instructions & Documentation: Telling People How to Do Stuff Since the Dawn of Print and into the Digital Age.
Chapter 10 Algorithmic Thinking. Learning Objectives Explain similarities and differences among algorithms, programs, and heuristic solutions List the.
Software Quality Assurance and Testing Fazal Rehman Shamil.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
CS 160 and CMPE/SE 131 Software Engineering April 12 Class Meeting Department of Computer Science Department of Computer Engineering San José State University.
Introduction to Software Testing Maili Markvardt.
Chapter 25 – Configuration Management 1Chapter 25 Configuration management.
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Software Testing Kobla Setriakor Nyomi Faculty Intern (Programming II)
Software Development.
ICE Integrated Cloud Environment Cloud Scanning and Mobile Printing
Development Environment
Software Testing.
CMPE 280 Web UI Design and Development August 29 Class Meeting
SOFTWARE TESTING OVERVIEW
Topics Introduction to Repetition Structures
Different Types of Testing
The Software Development Cycle
Guide To UNIX Using Linux Third Edition
– Officiating Management Software
Topics Introduction to Repetition Structures
Design by Contract Fall 2016 Version.
Designing and Debugging Batch and Interactive COBOL Programs
Strategies For Software Test Documentation
Introduction to Software Testing
Lecture 09:Software Testing
Automated Testing Environment
CIS16 Application Development Programming with Visual Basic
Testing and Test-Driven Development CSC 4700 Software Engineering
A Few Review Questions.
Topics Introduction Hardware and Software How Computers Store Data
Quality Assurance in an Agile Development Team Michelle Wu 2018 PNSQC
Chapter 1 Introduction(1.1)
UmbrellaDB v0.5 Project Report #3
Programming.
LESSON 01 Hands-on Training Execution
Homework Reading Programming Assignments Finish K&R Chapter 1
CMPE/SE 131 Software Engineering May 9 Class Meeting
CMPE/SE 131 Software Engineering February 21 Class Meeting
Topics Introduction to Repetition Structures
Krug Chapter 2 How We Really Use the Web and Web Site Design
CMPE/SE 131 Software Engineering April 11 Class Meeting
Test Cases, Test Suites and Test Case management systems
CMPE 152: Compiler Design March 19 Class Meeting
The Software Development Cycle
CMPE 152: Compiler Design September 17 Class Meeting
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

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

Profiling Collect statistics about your program execution. How many times was each statement executed? How long does your program spend in each method? How many bytes and how many objects of each type does your program create? Google “Rails profiling tools”

A Good Book on Web Usability

Definitions of Usability Useful Does it do something people need done? Learnable Can people figure out how to use it? Memorable Do they have to relearn it each time they use it? Effective Does it get the job done?

Definitions of Usability, cont’d Efficient Does it do it with a reasonable amount of time and effort? Desirable Do people want it? Delightful Is using it enjoyable, or even fun? “A person of average (or even below average) ability and experience can figure out how to use the thing to accomplish something without it being more trouble than it’s worth.” Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Don’t Make Me Think You don’t want to force your users to think about your page. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Don’t Make Me Think, cont’d Things should be immediately obvious. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Don’t Make Me Think, cont’d What is clickable? Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Don’t Make Me Think, cont’d Booking a flight. Be consistent. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Users Don’t Read Pages Users scan web pages. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Users Scan Web Pages Users use the web to get something done. Users know they don’t have to read everything. Scanning is a basic skill. Therefore, it must be easy to find the key components of a web page. Format pages to facilitate scanning.

Users Scan Web Pages, cont’d Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Users “Satisfice” Users don’t make optimal choices when looking for desired items on web pages. Instead, users “satisfice” – they make the first reasonable choice. satisfice = a made-up word that combines “satisfy” + “suffice”

Follow Conventions Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Follow Conventions, cont’d Even if you don’t read Japanese, you can figure out what’s on this page. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Create Effective Visual Hierarchies The more important something is, the more prominent it should be. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Create Effective Visual Hierarchies, cont’d Things that are related logically should be related visually. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Create Effective Visual Hierarchies, cont’d Use nesting to show what is part of what. Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Create Effective Visual Hierarchies, cont’d Don’t Make Me Think, Revisited by Steve Krug New Riders, 2014

Usability Testing: The German Newton The Apple Newton MessagePad was an “iPad” developed in the early 1990s. Besides the English version, there was a German and a Japanese version. It was too far ahead of its time and was killed by Steve Jobs shortly after he returned to Apple.

Usability Testing: The German Newton, cont’d A key feature of the Newton was its handwriting recognition. Handschrifterkennung in the German version. The Newton recognized successive words in a sentence using an algorithm that tracked the movement of the stylus. Not by optical pattern recognition. Cultural differences between Americans and Germans.

Usability Testing: The German Newton, cont’d The way the Germans write their letters: In order to demo the German Newton, I had to buy a child’s handwriting book in order to learn to write like a German.

Usability Testing: The German Newton, cont’d The way the Germans write words, especially the (many) compound words Example: Geschäftsreise “business trip”). Philosophical differences with regards to personal handwriting. Americans were willing to alter their handwriting in order to make the Newton recognize their words. The Germans, on the other hand …

Beta Testing: NASA Mars Rover Mission Beta testing for the Collaborative Information Portal (CIP) software system. NASA’s Jet Propulsion Laboratory (JPL) conducted several Operational Readiness Tests (ORTs) before the actual rovers landed.

Beta Testing: NASA Mars Rover Mission, cont’d Operational Readiness Tests (ORTs) A working rover was inside of a large “sandbox” in a separate warehouse building at JPL. Mission control personnel communicated with and operated the sandbox rover as if it were actually on Mars. A built-in delay simulated the signal travel time between Earth and Mars.

Beta Testing: NASA Mars Rover Mission, cont’d Mission scientists accessed and analyzed the data and images downloaded by the sandbox rover. All mission software, including CIP, was intensely tested in this simulated environment.

System Testing Test the entire application in its operating environment. Part of beta testing. Rerun all regression tests Installation testing Performance testing Stress testing Usability testing

Acceptance Testing Can be performed by the clients. Signoff by stakeholders, clients, and customers.

When can you stop testing? “Testing can prove the presence of bugs, but never their absence.” Stop testing when: All the regression tests pass. Testing finds only “acceptable” bugs. Put on the Known Bugs list. Have workarounds. When you’ve run out of time.

Test Plan Part of the project plan documentation. Which includes the project schedule. Describe each functional, performance, and stress test case. Each test case should be traceable to a functional or nonfunctional requirement or to a use case. Describe how the unit tests will be generated. Describe each regression test script.

Test Plan, cont’d How to run each test: Input data Manual operations (text input, menu selection, button press, etc.) Expected output. Acceptance criteria (success/failure). The plan must be understandable and doable by someone (such as a QA engineer) who did not write the code.

Test Plan, cont’d Integration testing procedure. Description of each usability test. Who will be the guinea pigs? Description of each system test. What are the beta test sites? Description of each acceptance test. Signoff checklist

Example Functional Test Case Specification Name Compute Square Root Purpose Test that the “Square Root Calculator” website can compute the square root of a value that is zero or positive. Preconditions The website is running. The “Input number” page is currently displayed.

Example Test Case Specification, cont’d Manual operation #1 Enter 0 or a valid positive number into the text field. The number may have a + sign and a single decimal point. The maximum value of the number can be 99999999 Press the Submit button. Expected result #1 THE SQUARE ROOT OF number IS sqrt where number is the number entered into the text field and sqrt is the correct square root of the number. Acceptance criteria #1 The square root is accurate to within 8 significant digits.

Example Test Case Specification, cont’d Manual operation #2 Enter a negative number into the text field. Press the Submit button. Expected result #2 Message ERROR: number MUST BE POSITIVE where number is the number entered into the text. Acceptance criteria #2 The error message appears. Another number can be entered (the program did not crash).

Assignment #7 Write 10 functional test cases for your project. Each test case should have: Name Purpose Preconditions Input parameters or manual operations Expected results Acceptance criteria Submit to Canvas: Assignment #7 Due Friday, April 21. Repeat 4, 5, and 6 as often as necessary within a single test case.

Test-Driven Development (TDD) A programming practice originally from the Extreme Programming (XP) methodology but which is starting to catch on elsewhere. Basic idea: Before adding a new feature to your application, first write a unit test for it. Of course, the test will fail, because you haven’t written the code for the feature yet.

Test-Driven Development (TDD), cont’d Writing the test case first forces you to: Understand what the feature is supposed to do based on its requirements and use cases. Design a good API for the feature. … before writing the code.

Test-Driven Development (TDD), cont’d “Traditional” agile programming cycle: TEST CODE COMMIT DESIGN TDD programming cycle: TEST CODE COMMIT DESIGN Your goal as a developer: Make your code pass its test.

Logging Add special logging statements to your application. Generate output to a log file. Can be just simple print statements. Each logging statement logs (writes) a message containing useful information about the application’s execution. “I am here.” – Execution reached this point. Status information at that point. The log file provides a history of the application’s execution.

Logging, cont’d Logs are useful if a failure occurred. Status of the erroneous condition leading up to the failure. Status at the point (or just before) the failure occurred. Turn logging off before deployment, or leave it on. Perform “log mining” to glean useful information about how the application is used and how it’s behaving.

Log Example: Mars Rover Mission 2004-12-20 20:23:33,435 INFO : mjane: Streamer.putDataFile(/opt/bea/user_projects/cip/ conf/preferences/m.preferences) 2004-12-20 20:23:33,439 DEBUG: Begin upload of file '/opt/bea/user_projects/cip/conf/ preferences/sthompso.preferences' 2004-12-20 20:23:39,140 DEBUG: Completed upload of file '/opt/bea/user_projects/cip/conf/ preferences/sthompso.preferences': 35659 bytes '/opt/bea/user_projects/cip/conf/global.properties': 13453 bytes 2004-12-20 20:28:57,516 INFO : jdoe: Streamer.getPreferences(user) 2004-12-20 20:29:29,721 INFO : jdoe: Streamer.getFileInfo() 2004-12-20 20:29:30,784 INFO : jdoe: Streamer.getFileInfo(/oss/merb/ops/ops/surface/ tactical/sol) 2004-12-21 19:17:43,320 INFO : jqpublic: Streamer.getDataFile(/global/nfs2/merb/ops/ops/ surface/tactical/sol/120/opgs/edr/jpeg/1P138831013ETH2809P2845L2M1.JPG) 2004-12-21 19:17:43,324 DEBUG: Begin download of file '/global/nfs2/merb/ops/ops/surface/ tactical/sol/120/opgs/edr/jpeg/1P138831013ETH2809P2845L2M1JPG' 2004-12-21 19:17:44,584 DEBUG: Completed download of file '/global/nfs2/merb/ops/ops/ surface/tactical/sol/120/opgs/edr/jpeg/1P138831013ETH2809P2845L2M1.JPG': 1876 bytes Timestamp, user name, method name Information about the uploaded or downloaded file

“Log Mining” Example: Mars Rover Mission

Rails Support for Logging and Debugging Look in file log/development.log. The Rails logger uses severity levels: :debug :info :warn :error :unknown Set the desired severity level. The logger adds to the log only those messages whose severity level is higher than the official severity level. Learn to use Rail’s logger and debugger. See Chapter 13 of the Rails Crash Course book.