Software Engn 1 Syst Analysis
Software Engn 1 Syst Analysis CSIS 360
Popular in Course
Popular in Computer Information Systems
This 25 page Class Notes was uploaded by Laurianne White MD on Monday October 12, 2015. The Class Notes belongs to CSIS 360 at Fort Lewis College taught by Staff in Fall. Since its upload, it has received 8 views. For similar materials see /class/221851/csis-360-fort-lewis-college in Computer Information Systems at Fort Lewis College.
Reviews for Software Engn 1 Syst Analysis
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/12/15
CSIS 370 Lecture 6 Announcements Subversion 7 I have it working on Linux but there are still some con guration activities to do I ll hope to be giving a demo on Tuesday Task for you Identify your con guration items Source code 0 java php html SQL scripts Don39t include extraneous les likejava class les or VB Software Testing Chapter 3 Why can software never be perfect The book uses the Windows calculator as an example of how you can t test everything 7 we saw the same thing with the triangle program last time So you have to accept the decision not to test everything But if you don t test everything then you will miss nding bugs So you need to make wise risk based decisions on what to test and what not to Discuss gure 32 and the tradeoffs Note that you can always choose to spend more money to nd more bugs 7 how do you decide where the crossing point should be Say you have a program with 50000 lines of code and there are 500 bugs in it How are bugs distributed in the 50000 lines Is this a high or low bug rate Testers job quotThe goal of a tester is to nd bugs nd them as early as possible and make sure that they get xedquot But on page 42 the author says that not all bugs will be xed Does this mean that a tester can never be successful Can you think of any other reasons why a bug might not be xed Page 43 Do you think that a software problem that no one detects is a bug What did you think about the idea that quotsoftware testers aren39t the most popular members of a project teamquot Discuss adversarial roles and how both sides actually have common goal Veri cation and Validation These terms are not used very consistently in industry Author says Veri cation does software do what the spec says Validation Does it do what it is supposed to do IEEE Software Engineering Glossary Veri cation quot The process of evaluating a system or component to determine whether the products of a given development phase satisfy the conditions imposed at the start of that phasequot Validation quotThe process of evaluating a system or component during or at the end of the development process to determine whether it satisfies specified requirements quot Notice that this definition of validation is nearly identical to the author s definition of verification A succinct definition attributable to Barry Boehm Verification Are we building the product right Validation Are we building the right product As author notes it is better to have consistent meaning within your organization rather than argue over the quotcorrectquot meaning Key Point for a tester quotNever assume that the specification is correctquot page 48 Discuss differences between testing and QA Does anyone work for an organization that uses the term QA to meaning the testing department Quiz questions did anyone try the Windows calculator Is this a bug Why or why not Let s look at the Mac calculator also CSIS 370 Lecture 9 Announcements Exam 1 March 2 Testing Computer Software Chapter 7 This chapter discusses a variety of topics Equivalence testing and boundary values 0 inputs 0 outputs Visible state transitions Race conditions and other time dependencies Load testing Function equivalence testing 0 comparison with other application 0 random testing 0 sensitivity analysis Regression testing Some advice for testing correctly 0 Test procedure must force program to use the data that you enter to see if it is using it correctly Which of these is going to be useful on your projects First page of chapter gives an exercise 7 did anyone do this Let s try it Use MS Word nd some elds font color bullets and numbering others determine the equivalence classes determine the boundary values determine the expected results try it Draw and discuss gure 232 from Software Engineering 7Lh edition Sommerville which shows the test planning process Testers You should be working on your test case design I strongly recommend following the table or outline approach suggested here Goals nd the equivalence classes determine test cases for each equivalence class Boundaries Start documenting your tests CSIS 370 Lecture 9 Announcements Get your source code into Subversion if you haven39t done so already Software Testing Chapter 5 TesttoPass and TesttoFail 7 You will also see the terms positive test case39 and 39negative test case39 for these Why is it good to do testtopass rst Well just to see if the software works under normal conditions If it doesn39t work under normal conditions it s a waste of time to try abnormal ones What s the relationship between boundary conditions and testtopasstesttofail How can you apply the ideas in this chapter to your projects Page 74 Example of writing to a CD 7 can you think of any other boundaries Book uses le size but what other measures might there be Number of les others Page 75 table any comments or observations doesn39t include signed values assumes word is 4 bytes not always true Page 78 Invalid wrong incorrect garbage This is a good idea can nd funny bugs Tell story about my 2 year old daughter Page 85 What are some of the challenges of testing race conditions stress testing etc What if you nd a bug Repeatability can be a big challenge Stress Testing note that this is also a type of boundary testing Speci cation andor marketing literature might provide the boundary values Scenarios Shopping Web Site with search function What are some boundary tests Search with empty result Search with single product result Search with multiple product result What if results are displayed in multiple pages with 10 products per page What if user can change the number of products displayed on a page Scenario 2 System that displays information stored in a DB table What might be some states to consider Empty table Table with 1 row Table with many rows Lesson here test data does not come only from the user interface You may need to have test databases les etc All data sources need to be manipulated Scenario 3 Microsoft Word 7 set margins function What are some boundary conditions here What are some states here CSIS 370 Lecture 1 Quick review of Syllabus Review comments from CSIS 360 student evals What did people like most Project 3 Readings 3 Small activities Discussions 3 Requirements Notes Examples given in class What did people like least Readings boring too long hard to read Book get 1 book or write one Other comments Need more of ce hours couldn t come to mine because of con icts Help motivate team to make progress deadlines Help team understand how they are really doing Explain diagrams better 7 give examples of what they look like Any other comments or suggestions for this semester UML Last semester we looked at some UML I want to get back to that now Class diagram Classes Drawn as a box with 3 parts class name attributes operations Example Class representing a customer order Name Order Attributes Order Number Customer Number Subtotal SalesTax Shipping Total Operations AddItem CalculateSalesTax CalculateShipping CalculateTotal RemoveItem Ship Example Name Employee Attributes empID Name Salary position Operations changeSalary addDependent changePosition Relationships Classes are related to each other in various ways The simplest form is called an association In an association neither class is subordinate to the other It is represented as a line with a label The label describes the relationship usually as a verb or verb phrase Example Employee works in Department The cardinality or multiplicity of the relationship is shown using numbers at each end fo the relationship 1 Indicates that there must be 1 object in the relationship Indicates that there can be any number nm Indicates that the number must be in the range n to m n can be 0 n can be In example Employee works in l department A department can have many employees A relationship can also exist between a class and itself For example the Employee class may be associated with itself because an employee supervises other employees can label the roles to make the diagram more clear superviser subordinate Aggregations If 2 classes have a whole part relationship this is called an aggregation For example a car is made up of parts The relationship is drawn with a small diamond at the end of the line between the two classes at the class which represents the whole Ifthe relationship between two classes can be described using the phrase quotpart of then it is probably an aggregation Two forms loosely bound or shared aggregation and composition Shared The parts and the whole can exist without each other diamond is drawn hollow Team consists of Players If the Team is dissolved the Players may still exist If the Players leave the Team may continue Convoy consists of Ships If a ship leaves the convoy it is still a ship and the convoy still exists When the convoy reaches its destination it goes away but the ships don39t Composition The whole can t exist without the parts and the parts can39t exist without the whole Diamond is drawn lled in Order contains OrderItems It doesn39t make sense for an Order to have no OrderItems and an OrderItem can39t exist without an Order MessageBoxWindow contains 0 or 1 OK button 0 or I cancel Button and 1 text message A MessageBoxWindow can39t exist without the Buttons and text and the text and buttons can t exist without the window Generalization Super Subclass relationship There is a general class and then subclasses that are specializations of the general class The relationship is usually described using the phrase quotisaquot The relationship is drawn using an arrow pointing from the subclass the specialization to the superclass the generalization For example A dog is a mammal a truck is a vehicle Example Customer superclass with attributes name customer ID billingAddress Corporate Customer subclass attributes contactName creditLimit creditRating PersonalCustomer subclass attributes creditCardNumber Example Creating Class Diagram from a UseCase Title Add product to shopping cart Level User Goal StakeHolders Customer Preconditions Customer has searched for and found desired product Main Success Scenario Customer selects AddToCaIt Button 2 System uses product number to add a line item quantity 1 to the customer s shopping cart which may be empty or already contain items 3 System displays the contents of the shopping cart with unit prices line prices and total price not including shipping or taxes Extensions 3a If the item is out of stock the system displays a message indicating this below the item in the shopping cart along with an estimated shipping date Homework On course web site due Thursday Next Time Sequence Diagrams Page Flow Diagrams CSIS 370 Lecture 6 Announcements Design Documentation due Thursday February 9 two weeks from today Description of what I expect on course web site in the Projects section Test Plan Template Your Functional Test Plan will be due in midMarch I have posted an MSWord template on the course web site for you to use Projects section This template is for documenting your formal test plan as opposed to the exploratory tests that we read about in Chapter 1 We will be reading more about this soon At this time you should be thinking about how you are going to test your applications Start making notes about potential tests Think about boundary conditions Use your t criteria to help de ne the tests Testing Computer Software Chapter 2 Objectives and Limits of Testing Key Points Can t test everything pages 1822 Even if you found the last bug in a program you wouldn39t know it A program that satis es its requirements speci cation may still have errors 0 Speci cation incorrect 0 Speci cation incomplete 0 User Interface problems The objective of testing is not to verify that the program works Why not 0 First of all it s mistaken 7 the program has bugs so you can t verify that it works 0 Second of all it s not possible There are too many things to test so it is impossible to verify correctness 0 Third it sets up testers to fail 0 Fourth it encourages an ineffective attitude 7 if you expect a program to work you won t notice some of the bugs quotPurpose of Testing a program is to nd problems in itquot page 25 A test that reveals a problem is a success A test that does not reveal a problem is a waste of time Some questions to ask What is the purpose of testing 0 Isn39t it to show that the program works 0 quotPurpose of Testing a program is to nd problems in itquot page 25 What is goal of testing 0 To get the problems xed so that the overall quality of the program is improved What did you think about the discussion of psychological attitude o What does this suggest that the appropriate attitudes in your group should be Doesn t this set up an adversarial relationship between members of a group that is supposed to be a team Remember teams are supposed to have a common goal 0 Author states that quotA test that reveals a problem is a success A test that does not reveal a problem is a waste of timequot What does this suggest about your approach to testing 0 What kinds of tests are more likely to nd problems CSIS 370 Lecture 5 Announcements Read chapter 3 Subversion problems Discuss Triangle Example Get students to develop test cases What39s a test case list of input values and the expected result If you don t know what you expect how can you know if the so ware is right or wrong positive testing 7 test case that shows software responds as we expect it to when we supply good data negative testing 7 test case that shows that software behaves reasonably when we give it bad data How many test cases do we have just for this simple program Could we test all possible combinations of the 3 input values Book example 39601 combinations of numbers only How could you possibly test a complex application Can t test everything 7 too many combinations What can we do to reduce number oftest cases How do we decide what to test Equivalence classes For example if you test 555 what is likelihood that 777 will produce different results Risk based testing test the things that are the most criticalimportantmost likely to cause serious problems if there are bugs Test the parts of the program that are the most complex Focus effort on these things Boundary testing what are some boundary conditions with triangles o Lengths must be positive so test a small number and 0 0 sum oftwo shorter sides gt longer side so test a b c and a c b and bc a Last bullet item shows that testers need to understand the problem domain In business applications this means that you have to understand what the business is CSIS 370 Lecture 1 Grades from last semester Everyone got at least a C People who received Cs tended to fall in one of two groups 0 The did their share on the project but missed a lot of other class work 0 They did reasonably well on the class work and exams but did not contribute their fair share to the project Review comments from CSIS 360 student evals Comments regarding online text Pro 9 Con 7 Mixed 1 Pro comments Allowed access to many resources for less than price of one textbook easy access no losing or forgetting textbook cool to read and print out for own records good idea because of availability and price keeps cost down due to not including unused parts of books cut down on how many text books we had to carry or buy Con Comments didn t use it enough to justify cost requires students to spend money to print out pages prefer to have online text in book form had to find a computer when I had a reading A printed book is resalable I don t like the fact that we don t get to keep the text 7 I use old textbooks as references helpful and well done but not used frequently enough to spend 40 I like having a complete textbook that I can referenceread instead of a few chapters only Other comments about the course Slightly less circling and slightly more lecture The circle discussions provided good feedback to articles rather than lecture Lectures a bit dull at times Try to find updated material Good exams Go a little easy on the sarcasm Watch for the quotduhquot kind of comments I appreciate bluntness and to the point lectures less dumb readings My favorite CSIS course amp instructor yet Any other comments or suggestions for this semester Quick review of Syllabus Project Comments Keep your customer better informed Communicate with them regularly Meet with them more often Show them progress Make sure workload is even 7 some of you did not put in your fair share of work User Stories Iterations You should be planning your next iteration I39d like to see at least 3 iterations this semester So you need to determine the dates for the end of each iteration and stick to those dates Three parts to a story The card with the story on it The conversation you have with your customer about the story The tests that convey and document details about the story and are used to demonstrate that it is complete One way to think of this is as Card Conversation and Confirmation The story and any questions you might have go on the front of the card The tests go on the back Let s do an example What39s a good story What questions might we have about this story that we need to discuss with our customer What kinds of tests do we need to run to be satisfied that the story is complete Estimating Stories You need to come up with some sort of effort estimate for each story Ways to do this Number of days with precision to the halfday Story Points Either way you want to make sure that none of your stories is too big If so you need to break it down into smaller stories Deciding what stories to include in an iteration Velocity 7 how much work did you get done in previous iteration Customer Priority 7 which stories are more important to the customer How do you determine velocity if you don t have any history Make some assumptions about how much time you have to spend on the project during the iteration Make an estimate of how long each story point will take Use these values to determine the number of story points that you can complete Tracking StoriesCalculating Velocity Need to monitor your work 7 were your estimates correct How many story points did you complete Need this information to help you make better estimates and to determine the number of story points that you can complete in your next iteration Your end dates for iterations are xed 7 the amount of work you accomplish during them can change So if you nd that some stories are taking longer than expected you might move them to the next iteration Or if stories turn out to be easier than expected move stories up from the next iteration don39t just take a break Homework Between now and Thursday you should develop your iteration plan for the iteration you are about to start You need to Determine the end date Document stories including conversation and tests Estimate story points Determine which stories you are going to do in this iteration On Thursday I want to meet with each group to go over the plan The plan needs to be written and include the end date and the list of stories along with their story points I also want to see the story cards CSIS 370 Lecture 5 Testing Computer Software Chapter 1 Key Points Don39t waste time testing a program that doesn39t even do simple things correctly Boundary tests are the most powerful Can t test every combination so you need to pick carefully The reason the program is in testing is that it probably doesn39t work About 1 in 3 attempts to x a bug either doesn t x it or creates another problem The more you know about computer programming the more internal boundaries you can anticipate and test for Page 9 Example of a nonobvious internal boundary condition 7 the values 127 and 128 based on the possibility that the data is stored in a single byte Common programmerproject manager response to some bug reports quotThat39s not a bugquot or quotno one would do thatquot or quotit will never happenquot Why do you think they engage in this behavior What does book suggest doing about this Do you think it would be effective Find test cases that make the bug appear in situations that are so likely to occur that no one would put up with it Measure of best tester one who gets the most bugs xed This requires humility and craftiness 7 don t want to antagonize the developers but you do want to convince them that the bugs need to be xed Discuss Triangle Example Get students to develop test cases What39s a test case list of input values and the expected result If you don t know what you expect how can you know if the software is right or wrong positive testing 7 test case that shows software responds as we expect it to when we supply good data negative testing 7 test case that shows that software behaves reasonably when we give it bad data How many test cases do we have just for this simple program Could we test all possible combinations of the 3 input values Book example 39601 combinations of numbers only How could you possibly test a complex application Can t test everything 7 too many combinations What can we do to reduce number oftest cases How do we decide what to test Equivalence classes For example if you test 555 what is likelihood that 777 will produce different results Risk based testing test the things that are the most criticalimportantmost likely to cause serious problems if there are bugs Test the parts of the program that are the most complex Focus effort on these things Boundary testing what are some boundary conditions with triangles o Lengths must be positive so test a small number and 0 0 sum oftwo shorter sides gt longer side so test a b c and a c b and bc a Last bullet item shows that testers need to understand the problem domain In business applications this means that you have to understand what the business is CSIS 370 Lecture 4 UML Sequence Diagrams Class diagram shows the classes in a system and how they are related but it is static The UML includes some dynamic diagrams also which show what goes on in a system while it is executing Instead of classes the sequence diagram shows objects It shows how objects interact as the system is executing Elements of sequence diagram Objects drawn along the top of the diagram Naming syntax obj ectClass Time ows from the top to the bottom Each object has a lifeline while it exists Objects can be created and destroyed during the time shown in the sequence diagram The lifeline is drawn as a dashed line while the object is inactive and as a narrow rectangle while it is active Communication between objects represented using horizontal arrows between the object s lifelines Last week we looked at this use case and came up with a class diagram that had the following classes Product ShoppingCart LineItem Let s look at how we would develop the sequence diagram for this use case and class diagram Title Add product to shopping cart Level User Goal StakeHolders Customer Preconditions Customer has searched for and found desired product Main Success Scenario 1 Customer selects AddToCaIt Button 2 System uses product number to add a line item quantity 1 to the customer s shopping cart which may be empty or already contain items 3 System displays the contents of the shopping cart with unit prices line prices and total price not including shipping or taxes Extensions 3a If the item is out of stock the system displays a message indicating this below the item in the shopping cart along with an estimated shipping date Instance form describes the ow of one particular scenario from a use case Generic form describes all ows in a particular use case description Let s look at an example of the instance form first Let s try to draw the sequence diagram for the Main Success Scenario Discuss relationship between class and sequence diagrams same set of classes operations in sequence diagram should appear in class diagram parameters and return values in sequence diagrams should have some relation to attributes in the class diagram Generic form includes conditionals loops Let s try to add Extension 3a to the sequence diagram Summary Why do you think I have presented these diagrams Ithink that these will be helpful to you as you design your systems I don t expect you to use these for all parts of your applications but you should consider using them for parts particularly the complex parts developing the diagrams will help you think about these parts more clearly You may discover things that you have overlooked You may nd easier ways to design your system Homework Chapter 1 of the Testing text CSIS 370 Lecture 8 Announcements Exam 1 Current Schedule 7 Feb 23 Change to March 2 Testing Computer Software Chapter 5 Bebugging 7 Last reading had discussion of quotbubuggingquot what did you think of this idea Do you think it would work to make testing more effective Do you see any problems with it Are you testing the code that you intend to release No so you have to remove the bugs that were intentionally put in the code What does this mean State Diagram 7 defect report lifecycle Open New defect reported by a tester customer tech support rep etc Assigned Defect assigned to a developer to be analyzedrepaired Fixed developer has implemented a x ResolvedClosed Tester veri es that x corrects the bug Deferred Defects that are being put off until a future release Book shows only 2 categories but in my experience there are more Note that this is different from resolution code Not a bug irreproducible as designed duplicate xed Problem Report Form Does the information on this make sense Do you think that there is any important information that is missing OS version Does the form suggest anything important about your software that may not be in the requirements spec version number Why is this important to you Key Points What do you think are the key points Report defects immediately 0 but take the time to understand them Make sure that your reports are as simple and understandable as possible Make sure that you have found the necessary steps to reproduce the defect Bug reporting involves extensive analysis before submitting the report quotEasy bugs get xed even if they are minorquot page 78 In this context easy means that the defect report made the bug easy to nd Lots of techniques for trying to reproduce irreproducible bugs Separation of DevelopmentTesting One thing that the book does not appear to discuss is a testing environment What do you think I mean by this This is a separate system area where you can install the version of the software that you want to test It must be separate from the development area 7 you don t want developers making changes while you are trying to test So you need to plan for this also Testing Draw and discuss gure 232 from XXX What is the goal of testing Is it to improve software quality GJ Myers quotTesting is a process of executing a program with the intent of nding an errorquot E W Dijkstra quotTesting demonstrates the presence of bugs not their absencequot Where does testing t as pa1t of software quality assurance Some practices are better at detecting defects than others and different methods nd different types of defects Let s look at the of defects detected by each of 10 common defectdetection techniques T routines series What can we learn from this table The most common type of testing unit testing has a typical detection rate of only 25 A combination of techniques works better than reliance on one Some more data from an old experiment Myers 1978 A group of programmers with experience ranging from 7 to 11 years were asked to test a program with 15 known defects Each programmer was asked to use one of the following techniques 0 Execution testing against the speci cation 0 Execution testing against the speci cation with the source code 0 Inspection using the source code and speci cation The results The programmers found from 1 to 9 defects The average was 51 only 13 of the known defects Any combination of two methods increased the total number of defects found by nearly a factor of 2 HaVing two independent people use the same method also increased the number of defects found by nearly twice 0 Different people nd different defects CSIS 370 Lecture 8 Announcements Software Testing Chapter 4 Remember one of goals of tester is to nd bugs as early as possible 7 this chapter discusses some techniques for doing this by quottestingquot the speci cation Do you understand the difference between whitebox and blackbox testing Also synonyms whitebox clearbox structural blackbox functional What about distinction between static and dynamic testing Are there standards or guidelines that apply to your projects What did you think about the checklists How do they apply to your projects How can you use these with agile story cards Inspections Look at quiz question 3 VNC Demo CSIS 370 Lecture 3 Announcements Buy the text book 7 next reading will be from it will be due next Tuesday Con guration Management What is it Why would you want it What is a quotsoftware con gurationquot Have you ever experienced a situation such as thinking you had xed a bug only to have it reappear not knowing which version of the software you were talking about wondering why someone made a particular change made changes to a le at the same time someone else was working on it only to have your work get overwritten Examine situation where several developers are working on a software application with no con guration management release version of system to test You continue working When the testers start reporting bugs how do you know which version of the software to examine Or worse a customer reports a bug in version 10 while you are working on 11 What does 10 look like How can you make a patch release to it How do you ensure that the patch will also get into version 11 Two people work on same le at same time You re looking at some code you wrote two weeks ago and you realize someone else has made some changes to it What are the changes and why did they make them You want to do a system build How do you coordinate it so the les contain the right items A product gets shipped to a customer is missing con guration les Where is the latest version of the le located How systems work delta les types of checkout 0 sharedlock or exclusivelock o branching o merging labelling metadata who made change who authorized change what was the reason for the change querying 0 what revisions of all les comprise version 17 of the released software or quottestirelease723quot o What les were changed due to bug report 142 What is the difference between revision 10 and 13 of le widgetjava 0 What software resources should you control using con guration management source code test suites user documentation con guration les used to build system what about compilers etc Leishman and Cook quotSoftware con guration items are the objects required to design develop build maintain test and eld a software productquot Need to manage all of these items How do you decide what to change Change control board CCB responsible for authorizing changes to con guration items What are bene tsdrawbacks of this There are less formal ways to do this but there should be some way to prioritizeauthorize changes Software con guration management is more than just a revision control system It involves policies for o controlling and tracking changes to your software product 0 release management 0 developer coordination