Presentation is loading. Please wait.

Presentation is loading. Please wait.

EKT 421 SOFTWARE ENGINEERING

Similar presentations


Presentation on theme: "EKT 421 SOFTWARE ENGINEERING"— Presentation transcript:

1 EKT 421 SOFTWARE ENGINEERING
Introduction to Software Engineering Dr. Nik Adilah Hanin Zahri

2 Attributes of Good Software
Product characteristic Description Maintainability Software should has the ability to evolve to meet the changing needs of customers due to the changing business environment Dependability and security Software dependability refers to reliability, security and safety Dependable software should not cause physical or economic damage in the event of system failure Malicious users should not be able to access or damage the system Efficiency Software should not make wasteful use of system resources such as memory and processor cycles. Efficiency includes responsiveness, processing time, memory utilisation, etc Acceptability Software must be acceptable to the type of users for which it is designed It must be understandable, usable and compatible with other systems that they use

3 Software Engineering Ethics
Computers have a central and growing role in modern development, therefore software engineers have significant opportunities or give other opportunity or influence others to do good or cause harm Therefore, code of ethics is produced Issues on professional responsibility: Confidentiality Engineers should normally respect the confidentiality of their employers or clients whether or not a formal confidentiality agreement has been signed

4 Software Engineering Ethics
Competence Engineers should not misrepresent their level of competence and should accept work within their ability Intellectual Property Rights Engineers should be aware of local laws governing regarding the protection of the use of intellectual property (such as patents, copyright, etc) Computer Misuse Software engineers should not misuse other people’s computers, e.g. playing games on an employer’s machine, or disseminating viruses.

5 Software Process Structured set of activities required to develop a software system Many different software processes but all involve: Software process model is an abstract representation of a process presents a description of a process from some particular perspective Process Tasks 1. Specification defining what the system should do 2. Development (Design and Implementation) defining the organization of the system and implementing the system 3. Validation checking if the software produce meets the requirement by the customer 4. Evolution changing the system in response to changing customer needs

6 1. Software Specification
The process of establishing what services are required and the constraints on the system’s operation and development Software specification development also known as requirement engineering to produced an agreed requirements document that specifies a system satisfying stakeholder requirement

7 Requirements Engineering Process
Is it technically and financially feasible to build the system? What do the system stakeholders require or expect from the system? Defining the requirements in detail Checking the validity of the requirements 1. Feasibility Study Feasibility Report 2.Requirement Elicitation and Analysis System Models 3.Requirement Specification 4.Requirement Validation User and System Requirements Requirement Documents Feasibility Study : To find out whether the system is worth implementing and if it can be implemented, given the existing budget and schedule. Input : outline description of the system and how the system is intended to support business processes. Output : A report that recommends whether or not it is worth carrying on with the requirements engineering and system development process. Req. Elicitation & Analysis : To gather the requirements of a system from users, customers and other stakeholders to resolve conflicts Requirement Spec : To describe a software system to be developed. It lays out functional and non-functional requirements, and may include a set of use cases that describe user interactions that the software must provide Req validation : To check if the documented requirements and models are consistent and meet stakeholder needs

8 2. Software Design and Implementation
The process of converting the system specification into an executable system Software design refers to designing a software structure that realises the specification Implementation refers to the translation of the design structure into an executable program The activities of design and implementation are closely related and may be inter-leaved

9 General Model of Design Process
Input Platform Information Requirements Specification Data Description Design Activities Architecture Design Interface Design Component Design Database Design Platform : Java, .NET (Microsoft), SharePoint, Rails, Saas Design Outputs System Architecture Database Specification Interface Specification Component Specification

10 3. Software Validation Verification and validation (V & V) is intended to show that a system conforms to its specification and meets the requirements of the customer V & V involves checking and review processes and system testing System testing involves executing the system with test cases taken from the specification of the real data

11 Testing Stages Component Testing System Testing Acceptance Testing
Individual components are tested independently Components may be functions or objects or coherent groupings of these entities Testing with customer data to check that the system meets the customer’s needs Testing of the system as a whole Testing of emergent properties is particularly important

12 4. Software Evolution Software is inherently flexible and can change
The software evolve and change due to changing requirement of changing business circumstances Although there has been a demarcation between development and evolution (maintenance) this is increasingly irrelevant as fewer and fewer systems are completely new

13 System Evolution Process
Define System Requirement Access Existing Systems Propose System Changes Modify Systems Existing System New System

14 EKT 421 SOFTWARE ENGINEERING
Software Process Dr. Nik Adilah Hanin Zahri

15 Category of Software Process
Software process are categorized into 2 types: Plan-driven processes Agile process In practice, most practical processes include elements of both plan-driven and agile approaches There are no right or wrong software processes Plan –driven Process Agile Process all of the process activities are planned in advance and progress is measured against this plan. planning is incremental (done phrase by phrase) and it is easier to change the process to comply with changing customer requirements

16 The Waterfall Model System’s services, constraints and goals are established by consultation with system users Allocates the requirements to hardware and software to produces overall system architecture The software design is realized as a program units, and unit testing will verify that each unit meets its specs Program units are integrated and tested as complete system according to its specs and delivered to customer. The system is installed for practical use. Maintenance includes correcting errors, and enhancing the system as per requirements

17 Benefits of Waterfall Model
Waterfall model should only be used when requirements are well understood and unlikely to change radically during development Benefits: The process is visible so that the managers can monitor progress against development plan Suitable for large systems engineering projects where a system is developed at several sites where the plan-driven nature of the waterfall model helps coordinate the work

18 Waterfall Model Problem
A phase has to be completed before moving onto the next phase Inflexible partitioning of the project into distinct stages cause difficulty to respond to changing customer requirements after the process is underway

19 Incremental Development
A model that based on the idea of developing initial implementation, exposing to user comment and evolving it through several versions until adequate system has been developed Specification , development and validation activities are interleaved rather than separate Rapid feed back across the activities

20 Incremental Development Model
Concurrent Activities Specification Initial version Development Intermediate Version Outline Description Validation Final Version

21 Incremental Development Benefits
The cost accommodating changing customer requirements is reduced analysis and documentation that has to be redone is much less than the waterfall model Easier to get customer feedback on the development work that has been done customers can comment on demonstrations of the software and see how much has been implemented More rapid delivery and deployment of useful software to the customer is possible customers are able to use and gain value from the software earlier than the waterfall process

22 Incremental Development Problems
The process is not visible managers need regular deliverables to measure progress Deliverables: a tangible or intangible object produced as a result of the project that is intended to be delivered to a customer such as a report, a document, a server upgrade if systems are developed quickly, it is not cost-effective to produce documents that reflect every version of the system System structure tends to degrade as new increments are added regular change tends to corrupt the process structure incorporating further software changes becomes increasingly difficult and costly

23 Reuse-oriented Software Engineering Model
Modification of the requirement to reflect available component Component search based on specification for implementation Requirement Specification Component Analysis Requirement Modification System Design with Reuse Development and Integration System Validation The reused component are considered for framework design. New software has to be added if not available. The software that cannot be procured is developed, and components and COTS system are integrated

24 Boehm’s Spiral Model of Software Process
1. Objective setting : To define the objective of the phase. Constraints on the process and the product are identified and a detailed management plan is drawn up. Project risks are identified. Alternative strategies, depending on these risks, may be planned. 2. Identify risks: For each of the identified project risks, a detailed analysis is carried out. Steps are taken to reduce the risk. For example, if there is a risk that the requirements are inappropriate, a prototype system may be developed. 3. Development and validation After risk evaluation, a development model for the system is chosen. For example, If the main identified risk is sub-system integration, the waterfall model may be the best development model to use. 4. Planning : The project is reviewed and a decision made whether to continue with a further loop of the spiral. If it is decided to continue, plans are drawn up for the next phase of the project.

25 Principles of Agile Methods
Description Customer involvement Customers should be closely involved throughout the development process. Their role is provide and prioritize new system requirements and to evaluate the iterations of the system. Incremental delivery The software is developed in increments with the customer specifying the requirements to be included in each increment. People not process The skills of the development team should be recognized and exploited. Team members should be left to develop their own ways of working without prescriptive processes. Embrace change Expect the system requirements to change and so design the system to accommodate these changes. Maintain simplicity Focus on simplicity in both the software being developed and in the development process. Wherever possible, actively work to eliminate complexity from the system.

26 Problems with Agile Methods
It can be difficult to keep the interest of customers who are involved in the process. Team members may be unsuited to the intense involvement that characterizes agile methods. Prioritizing changes can be difficult where there are multiple stakeholders. Maintaining simplicity requires extra work. Contracts may be a problem as with other approaches to iterative development.

27 Plan-driven and Agile Development
Plan-driven development A plan-driven approach to software engineering is based around separate development stages with the outputs to be produced at each of these stages planned in advance. Not necessarily waterfall model – plan-driven, incremental development is possible Iteration occurs within activities. Agile development Specification, design, implementation and testing are inter-leaved and the outputs from the development process are decided through a process of negotiation during the software development process.

28 EKT 421 SOFTWARE ENGINEERING
Project Management Dr. Nik Adilah Hanin Zahri

29 Software Project Management
Project managements concerned with the following: Ensure the software is in accordance with the requirements by the customer Ensure on time/schedule delivery Essential because software development is subject to budget and schedule constraints by the software developer

30 Project Planning Project planning involves The project plan is used to
breaking down the work and assigning each task to project team members anticipating problems that might arise and prepare tentative solutions to those problems The project plan is used to describe the work flow done to the project team and customers help assess progress on the project

31 Planning Stages Proposal stage Project startup phase
bidding for a contract to develop or provide a software system Project startup phase assigning member for each tasks, planning development process (plan-driven/agile) and resource allocation etc Periodically throughout the project modifying plan in the light of experience gained and information from monitoring the progress of the work

32 Factors Affecting Software Pricing
Description Market opportunity A development organization may quote a low price because it wishes to move into a new segment of the software market. The experience gained may also help it develop new products. Cost estimate uncertainty Cost estimate uncertainty will cause the increasing price by a contingency over and above its normal profit. Contractual terms A customer may be willing to allow the developer to retain ownership of the source code and reuse it in other projects, which will decrease the pricing Requirements volatility If the requirements are likely to change, an organization may lower its price to win a contract. After the contract is awarded, high prices can be charged for changes to the requirements. Financial health Developers in financial difficulty may lower their price to gain a contract. It is better to make a smaller than normal profit or break even than to go out of business. Cash flow is more important than profit in difficult economic times.

33 Plan-driven Development : Pros and Con
Contra Allows organizational issues (availability of staff, other projects, etc.) to be closely taken into account Many early decisions have to be revised because of changes to the environment where the software is developed and used. Potential problems and dependencies are discovered before the project starts

34 Risk Management Risk management is concerned with Type of risks:
identifying risks drawing up plans to minimise the risk effect Type of risks: Project risks which will affect the schedule or resources Product risks which will affect the quality or performance of the software Business risks which will affect the organisation developing or procuring the software

35 Examples of Project, Product and Business Risks
Affects Description Staff turnover Project Experienced staff leaving the project before it is finished Management change Change of organizational management with different priorities Hardware unavailability Essential hardware for the project is not delivered on schedule Requirements change Project , Product Larger number of changes to the requirements than anticipated Specification delays Project ,Product Specifications of essential interfaces are not available on schedule Size underestimate The size of the system has been underestimated CASE tool underperformance Product CASE tools, which support the project, do not perform as anticipated Technology change Business The underlying technology on which the system is built is superseded by new technology Product competition A competitive product is marketed before the system is completed

36 Risk Management Process
Identify project, product and business risks Assess the likelihood and consequences of these risks Draw up plans to avoid or minimise the effects of the risk Monitor the risks throughout the project 1. Risk Identification 2. Risk Analysis 3. Risk Planning 4. Risk Monitoring List of potential risk Prioritized risk list Risk avoidance and contingency plans Risk assessment

37 Examples of Project Risks
Risk type Possible risks Technology The database performance is lower than expected. Reusable software components cannot be reused as planned. People It is impossible recruit staff with the skills required. Key staff are ill and unavailable at critical times. Required training for staff is not available. Organizational Restructure of organization to comply with different management of the project. Organizational financial problems force reductions in the project budget. Tools The code generated by software code generation tools is inefficient. Software tools cannot work together in an integrated way. Requirements Changes to requirements that require major design rework are proposed . Customers fail to understand the impact of requirements changes. Estimation The time required to develop the software is underestimated. The rate of defect repair is underestimated. The size of the software is underestimated.

38 Risk Probability Levels and Effects
Organizational financial problems force reductions in the project budget . Low Catastrophic It is impossible to recruit staff with the skills required. High Key staff are ill at critical times in the project . Moderate Serious Faults in reusable software components have to be repaired before these components are reused. Changes to requirements that require major design rework are proposed . Restructure of organization to comply with different management of the project. The database performance is lower than expected.

39 Risk Probability Levels and Effects
The time required to develop the software is underestimated . High Serious Software tools cannot be integrated . Tolerable Customers fail to understand the impact of requirements changes . Moderate Required training for staff is not available . The rate of defect repair is underestimated . The size of the software is underestimated . Code generated by code generation tools is inefficient . Insignificant

40 Strategies for Risk Management
Type of Strategy Strategy Description Short staff due to illness Avoidance strategy Reorganize team so that there is more overlap of work and people therefore understand each other’s jobs. Defective components Replace potentially defective components with bought-in components of known reliability. Recruitment problems Minimization strategy Alert customer to potential difficulties and the possibility of delays; investigate buying-in components. Underestimated development time Investigate buying-in components; investigate use of a program generator.

41 Strategies for Risk Management
Type of Strategies Strategy Description Low database performance Contingency plan Investigate the possibility of buying a higher-performance database. Requirements changes Contingency plan Derive traceability information to assess requirements change impact; maximize information hiding in the design. Organizational financial problems Prepare a briefing document for senior management showing the importance of the project and explaining the reasons why cuts to the project budget would not be cost-effective Organizational restructuring Prepare a briefing document for management showing that the project is making a very important contribution to the business.

42 EKT 421 SOFTWARE ENGINEERING
Requirement Engineering Dr. Nik Adilah Hanin Zahri

43 What is a Requirement? The system requirements are the descriptions of the system services and constraints that are generated during the requirements engineering process. It may range from a high-level abstract statement of a service or of a system constraint to a detailed mathematical functional specification.

44 Types of Requirement User requirements System requirements
Statements in natural language plus diagrams of the services the system provides and its operational constraints. Written for customers. System requirements A structured document setting out detailed descriptions of the system’s functions, services and operational constraints. Defines what should be implemented so may be part of a contract between client and contractor.

45 Example : User and System Requirements of Mentcare System

46 Functional and Non-functional Requirements
Statements of services the system should provide, how the system should react to particular inputs and how the system should behave in particular situations May state what the system should not do Non-functional requirements Constraints on the services or functions offered by the system such as timing constraints, constraints on the development process, standards, etc. Often apply to the system as a whole rather than individual features or services. Domain requirements Constraints on the system from the domain of operation

47 Functional Requirements
Describe functionality or system services Depends on the type of software, expected users and the type of system where the software is used Functional user requirements may be high-level statements of what the system should do Functional system requirements should describe the system services in detail

48 Example : Functional Requirements of Mentcare System
A user shall be able to search the appointments lists for all clinics The system shall generate each day, for each clinic, a list of patients who are expected to attend appointments that day Each staff member using the system shall be uniquely identified by his or her 8-digit employee number

49 Non-functional Requirements
These define system properties (e.g. reliability, response time and storage requirements) and constraints (e.g. I/O device capability, system representations, etc.) Process requirements may also be specified mandating a particular IDE, programming language or development method. Non-functional requirements may be more critical than functional requirements. If these are not met, the system may be useless.

50 Types of Non-Functional Requirement

51 Non-functional Requirements Implementation
Non-functional requirements may affect the overall architecture of a system rather than the individual components. E.g : To ensure that performance requirements are met, the system should be organized so that communications between components is minimum. A single non-functional requirement (e.g. security requirement) may generate a number of related functional requirements that define system services that are required. E.g. : Motion sensors, camera, warning alarm etc.

52 Non-Functional Classifications
Product requirements Requirements which specify that the delivered product must behave in a particular way e.g. execution speed, reliability, etc. Organisational requirements Requirements which are a consequence of organisational policies and procedures e.g. process standards used, implementation requirements, etc. External requirements Requirements which arise from factors which are external to the system and its development process e.g. interoperability requirements, legislative requirements, etc.

53 Examples of Non-functional Requirements in the Mentcare System
Product requirement The Mentcare system shall be available to all clinics during normal working hours (Mon–Fri, 0830–17.30). Downtime within normal working hours shall not exceed five seconds in any one day. Organizational requirement Users of the Mentcare system shall authenticate themselves using their health authority identity card. External requirement The system shall implement patient privacy provisions as set out in HStan priv.

54 Requirements Elicitation and Analysis Process
Interacting with stakeholders to discover their requirements. Domain requirements are also discovered at this stage. Requirements are documented and input into the next round of the spiral. Groups related requirements and organises them into coherent clusters. Prioritising requirements and resolving requirements conflicts.

55 Problems of Requirements Elicitation
Stakeholders don’t know what they really want. Stakeholders express requirements in their own terms. Different stakeholders may have conflicting requirements. Organisational and political factors may influence the system requirements. The requirements change during the analysis process. New stakeholders may emerge and the business environment may change.

56 Spiral View of the Requirements Engineering Process
the process of recording the requirements of a software system to be developed Can be describe using natural language and formal, symbolic, or graphical representations the practice of collecting the requirements of a system from users, customers and other stakeholders. the process of confirming with the customer or user of the software that the specified requirements are valid, correct, and complete.

57 Essential High-level User Requirements
Example of essential high –level user requirement: The system shall be available to deliver insulin when required. The system shall perform reliably and deliver the correct amount of insulin to counteract the current level of blood sugar. The system must therefore be designed and implemented to ensure that the system always meets these requirements.

58 Example : System Requirements using Natural Language for the Insulin Pump System
3.1 The system shall measure the blood sugar and deliver insulin, if required, every 10 minutes. (Changes in blood sugar are relatively slow so more frequent measurement is unnecessary; less frequent measurement could lead to unnecessarily high sugar levels.) 3.2 The system shall run a self-test routine every minute with the conditions to be tested and the associated actions defined in Table 1. (A self-test routine can discover hardware and software problems and alert the user to the fact the normal operation may be impossible.)

59 EKT 421 SOFTWARE ENGINEERING
System Modelling Dr. Nik Adilah Hanin Zahri

60 System Modeling System modeling is the process of
developing abstract models of a system each model presenting a different view or perspective of that system Using graphical notation e.g. notations in the Unified Modeling Language (UML) Objective: To helps the analyst to understand the functionality of the system To act as communication models between developer and customers

61 UML Diagram Types Activity diagrams
show the activities involved in a process or in data processing Use case diagrams show the interactions between a system and its environment. Sequence diagrams show interactions between actors and the system and between system components. Class diagrams show the object classes in the system and the associations between these classes. State diagrams show how the system reacts to internal and external events.

62 Context Models Context models are used to illustrate the operational context of a system - what lies outside the system boundaries System boundaries are established to define what is inside and what is outside the system They show other systems that are used or depend on the system being developed The position of the system boundary has a profound effect on the system requirements Defining a system boundary is a political judgment There may be pressures to develop system boundaries that increase / decrease the influence or workload of different parts of an organization UML system context diagram may be used for context modelling

63 System Context Diagram of MHC-PMS

64 Process Model Using Activity Diagram
Figure : Process model of purchase order using activity diagram

65 Activity Diagram Activity diagram is a UML diagram used to describe dynamic aspects of the system. Activity diagram is basically a flow chart to represent the flow form one activity to another activity also can be described as an operation of the system. The purposes of activity diagram can be described as: To draw the activity flow of a system To describe the sequence from one activity to another To describe the parallel, branched and concurrent flow of the system

66 Drawing An Activity Diagram
The main element of an activity diagram is the activity itself performed by the system. After identifying the activities we need to understand how they are associated with constraints and conditions. So before drawing an activity diagram we should identify the following elements: Activities Association Conditions Constraints

67 Labels/Symbols/Notation
Initial node - The filled in circle is the starting point of the diagram.  Activity final node - The filled circle with a border is the ending point.  An activity diagram can have zero or more activity final nodes. Activity/Action - The rounded rectangles represent activities that occur. An activity may be physical, such as Receive Request. Flow/edge -  The arrows represent the flow of activities in the diagram. 

68 Labels/Symbols/Notation
Fork -  A black bar with one flow going into it and several leaving it.  This denotes the beginning of parallel activity Join - A black bar with several flows entering it and one leaving it.  All flows going into the join must reach it before processing may continue.  This denotes the end of parallel processing.

69 Labels/Symbols/Notation
Condition - Text such as [Correct] on a flow, defining a guard which must evaluate to true in order to traverse the node. Decision - A diamond with one flow entering and several leaving. Merge - A diamond with several flows entering and one leaving.  The implication is that one or more incoming flows must reach this point until processing continues, based on any guards on the outgoing flow. [Correct]

70 Labels/Symbols/Notation
Partition. Partitions also called swimlanes, indicating who/what is performing the activities. Sub-activity indicator.  The rake in the bottom corner of an activity indicates that the activity is described by a more finely detailed activity diagram.  Flow final.  The circle with the X through it.  This indicates that the process stops at this point. 

71 Example of Activity Diagram
Figure : Activity diagram to authenticate PIN number

72 Example of Activity Diagram with Swimlanes
CONDITIONS INITIAL NODE END NODE ACTIVITY PARTITION FORK JOIN

73 Exercise Create an activity diagram of drawing money using an ATM machine. Your diagram should include interaction between customer, ATM machine and the bank. The activities should include authentication of the card based on entered pin numbered Money withdrawal checking account balance (Hint: use swimlanes to indicates activities by different parties)

74 Exercise : Answer

75 Use Case Modeling Use case diagrams is used to:
visualize, specify, construct, and document the (intended) behavior of the system, during software specification and analysis provide a way for developers, domain experts and end-users to Communicate serve as basis for testing Each use case represents a discrete task that involves external interaction with a system Represented diagrammatically to provide an overview of the use case and in a more detailed textual form Use case diagrams contain use cases, actors, and their relationships

76 Example : Transfer-data Use Case
A use case in the MHC-PMS

77 Tabular Description of Use Case
MHC-PMS: Transfer data Actors Medical receptionist, patient records system (PRS) Description A receptionist may transfer data from the MHC-PMS to a general patient record database that is maintained by a health authority. The information transferred may either be updated personal information (address, phone number, etc.) or a summary of the patient’s diagnosis and treatment. Data Patient’s personal information, treatment summary Stimulus User command issued by medical receptionist Response Confirmation that PRS has been updated Comments The receptionist must have appropriate security permissions to access the patient information and the PRS.

78 Role of ‘Medical Receptionist’ in MHC-PMS

79 Drawing Use Case Diagram
Use cases specify desired behavior or functional requirements of a system A use case is a description of a set of sequences of actions including variants, a system performs to yield an observable result of value to an actor System behavior

80 How to name a Use Case? Use Case names begin with a strong verb
Name Use Cases using domain terminology Place the primary Use Cases in the top-left corner of the diagram Imply timing considerations by stacking use case 

81 Relationships between Use Cases
Generalization use cases that are specialized versions of other use cases Include use cases that are included as parts of other use cases Extend use cases that extend the behavior of other core use cases

82 1. Generalization The child use case inherits the behavior and meaning of the parent use case The child may add to or override the behavior of its parent parent child

83 Example of Generalization
Register Course Register course for repeated student Register course for new student

84 <<include>>
The base use case explicitly incorporates the behavior of another use case at a location specified in the base The included use case never stands alone only occurs as a part of some larger base that includes it base included <<include>>

85 More about Include use to avoid describing the same flow of events several times by putting the common behavior in a use case of its own updating grades output generating verifying student id <<include>>

86 <<extend>>
The base use case implicitly incorporates the behavior of another use case at certain points called extension points The base use case may stand alone, but under certain conditions its behavior may be extended by the behavior of another use case base extending <<extend>>

87 More about Extend use to model optional behavior or branching under conditions Request exam copy Appeal Exam grade <<extend>>

88 Actors An actor represents a set of roles that users of use case play when interacting with these use cases Actors can be human or automated systems Actors are entities which require help from the system to perform their task or are needed to execute the system’s functions Actors are not part of the system name

89 Use Cases and Actors From the perspective of a given actor, a use case does something that is of value to the actor E.g. calculate a result or change the state of an object The Actors define the environments in which the system lives

90 Relationships between Actors
Generalization student graduate student non-graduate student

91 Relationships between Use Cases and Actors
Actors may be connected to use cases by associations indicating that the actor and the use case communicate with one another using messages update grades faculty

92 Type of Relations Between Use Case and Actor
Associations student registration updating grades output generating faculty

93 Type of Relations Between Use Case and Actor
2. Directed Associations The directionality of the arrow shows if the relations is navigable or not If true for only one role, an arrow appears in the navigable direction

94 Example of Complete Use Case Diagram
Notes1 : Solid arrows/pointers indicates association or directed association Notes2 : Dotted arrows/pointers indicates <<include>> and <<extend>>

95 Exercise Create a use case diagram to describe behavior of an ATM machine. Your diagram should include interaction between bank customer, ATM technician and the bank. Includes all possible actions between all actors.

96 Exercise : Sample Answer (1)

97 Exercise : Sample Answer (2)

98 Sequence Diagrams Sequence diagrams are used to model the interactions between the actors and the objects within a system A sequence diagram shows the sequence of interactions that take place during a particular use case Emphasizes time ordering of messages Can model simple sequential flow, branching, iteration, recursion and concurrency Used during requirements analysis To refine use case descriptions to find additional objects (“participating objects”) Used during system design to refine subsystem interfaces

99 Sequence Diagram for View Patient Information
The objects and actors involved are listed along the top of the diagram, with a dotted line drawn vertically from these Interactions between objects are indicated by annotated arrows

100 Sequence Diagram for Transfer Data

101 Drawing Sequence Diagrams
The objects and actors involved are listed along the top of the diagram, with a dotted line drawn vertically from these Interactions between objects are indicated by annotated arrows Notations: Actors are represented by human symbol Objects are represented by rectangles Classes are represented by columns Messages are represented by arrows Activations are represented by narrow rectangles Lifelines are represented by dashed lines selectZone() pickupChange() pickUpTicket() insertCoins() Passenger TicketMachine

102 Nested Messages Passenger Tarif Schedule Display Zone Selection F. selectZone() lookupPrice(selection) price displayPrice(price) Dataflow The source of an arrow indicates the activation which sent the message An activation is as long as all nested activations Horizontal dashed arrows indicate data flow Vertical dashed lines indicate lifelines

103 Iteration & Condition Passenger ChangeProcessor insertChange(coin) CoinIdentifier Display CoinDrop displayPrice ( billed Amount) lookupCoin(coin) price [billed Amount<0] returnChange(-billedAmount) Iteration * Condition Iteration is denoted by a * preceding the message name Condition is denoted by boolean expression in [ ] before the message name

104 Creation and Destruction
Passenger ChangeProcessor Ticket createTicket(selection) free() Creation Destruction print() Creation is denoted by a message arrow pointing to the object. Destruction is denoted by an X mark at the end of the destruction activation. In garbage collection environments, destruction can be used to denote the end of the useful life of an object.

105 Example of Complete Sequence Diagram

106 Exercise Create a sequence diagram for ATM money withdrawal to model the flow and interaction between object and actors. The interaction must begin with card authentication until successful money withdrawal. Your diagram should include interaction between bank customer, ATM machine and the bank database. Includes all possible class, message and activation in all interactions.

107 Exercise : Sample Answer

108 Class Diagrams Class diagrams are used when developing an object-oriented system model to show the classes in a system and the associations between these classes An object class can be thought of as a general definition of one kind of system object An association is a link between classes that indicates that there is some relationship between these classes Example : In MHC-PMS system, an object can represent as a patient, a prescription, doctor, etc.

109 Exercise Illustrate UML Class diagram for ATM Machine. The classes involved in the system are: Bank, Account, Customer Info, Debit Card, Current Account, Saving Account, ATM Info, ATM Transaction, Withdraw Transaction, Change Pin, Transfer Money, Check Balance. The Bank maintains personal and ATM information of each customer. The customer can access their account using Debit Card issued by the Bank. In this system there could be two types of Account: Current Account and Saving Account. Both use to share many of the properties and methods. The ATM Machine can perform multiple transactions such as Withdrawing cash, change pin, check balance and Transfer Money to each account.

110 Exercise : Answer

111 Example : Activity Model of Insulin Pump’s Operation

112 Example : Sequence Diagram for Order Processing

113 State Machine Models Modelling the behaviour of the system in response to external and internal events Are often used for modelling real-time systems State machine models show system states as nodes and events as arcs between these nodes. During an event, the system moves from one state to another. State charts are an integral part of the UML and are used to represent state machine models

114 UML State Diagrams State diagram: Depicts data and behavior of a single object throughout its lifetime. set of states (including an initial start state) transitions between states entire diagram is drawn from that object's perspective What objects are best used with state diagrams? large, complex objects with a long lifespan domain ("model") objects not useful to do state diagrams for every class in the system!

115 State Diagram Example

116 States state: conceptual description of the data in the object
represented by object's field values entire diagram is drawn from the central object's perspective only include states / concepts that this object can see and influence don't include every possible value for the fields; only ones that are conceptually different

117 Transitions transition: movement from one state to another
signature [guard] / activity signature: event that triggers (potential) state change guard: boolean condition that must be true activity: any behavior executed during transition (optional) transitions must be mutually exclusive (deterministic) must be clear what transition to take for an event most transitions are instantaneous, except "do" activities

118 Internal activities Internal activity: actions that the central object takes on itself sometimes drawn as self-transitions (events that stay in same state) entry/exit activities reasons to start/stop being in that state

119 Super/Substates When one state is complex, you can include substates in it. drawn as nested rounded rectangles within the larger state Caution: Don't over-use this feature. easy to confuse separate states for sub-states within one state

120 Example 1 : State Diagram for ATM Machine
ATM software states at a bank

121 Example 2 : State Diagram of a Microwave Oven

122 States of Microwave Oven
Description Waiting The oven is waiting for input. The display shows the current time. Half power The oven power is set to 300 watts. The display shows ‘Half power’. Full power The oven power is set to 600 watts. The display shows ‘Full power’. Set time The cooking time is set to the user’s input value. The display shows the cooking time selected and is updated as the time is set. Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ‘Not ready’. Enabled Oven operation is enabled. Interior oven light is off. Display shows ‘Ready to cook’. Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. On completion of cooking, the buzzer is sounded for five seconds. Oven light is on. Display shows ‘Cooking complete’ while buzzer is sounding.

123 Stimuli of Microwave Oven
Stimulus Description Half power The user has pressed the half-power button. Full power The user has pressed the full-power button. Timer The user has pressed one of the timer buttons. Number The user has pressed a numeric key. Door open The oven door switch is not closed. Door closed The oven door switch is closed. Start The user has pressed the Start button. Cancel The user has pressed the Cancel button.

124 EKT 421 SOFTWARE ENGINEERING
Architectural Design Dr. Nik Adilah Hanin Zahri

125 Architectural Design Architectural design is concerned with understanding how a software system should be organized and designing the overall structure of that system. Architectural design identifies the main structural components in a system and the relationships between them. The output of the architectural design process is an architectural model that describes how the system is organized as a set of communicating components.

126 Agility and Architecture
It is generally accepted that an early stage of agile processes is to design an overall systems architecture. Refactoring the system architecture is usually expensive because it affects so many components in the system

127 Example : Architecture of Packing Robot Control System

128 Architectural Abstraction
Architecture in the small is concerned with the architecture of individual programs Architecture in the large is concerned with the architecture of complex enterprise systems that include other systems, programs, and program components. These enterprise systems are distributed over different computers, which may be owned and managed by different companies.

129 Advantages of Explicit Architecture
Stakeholder communication Architecture may be used as a focus of discussion by system stakeholders. System analysis Means that analysis of whether the system can meet its non-functional requirements is possible. Large-scale reuse The architecture may be reusable across a range of systems Product-line architectures may be developed.

130 Architectural Representations
Simple and informal block diagrams showing entities and relationships are the most frequently used method for documenting software architectures. However, they lack semantics, do not show the types of relationships between entities nor the visible properties of entities in the architecture. Depends on the use of architectural models The requirements for model semantics depends on how the models are used.

131 Architectural Patterns
Patterns are a means of representing, sharing and reusing knowledge. An architectural pattern is a stylized description of good design practice, which has been tried and tested in different environments. Patterns should include information about when they are useful and when the are not useful. Patterns may be represented using tabular and graphical descriptions.

132 Model-View-Controller Pattern
Data (Model), An interface to view and modify the data (View), Operations that can be performed on the data (Controller) The model represents the data, and does nothing else. The view displays the model data, and sends user actions (e.g. button clicks) to the controller. Depend on the model and a controller. The controller provides model data to the view, and interprets user actions such as button clicks. In some cases, the controller and the view are the same object. address book application as an example. Model = list of Person objects, view = GUI window that displays the list of people, controller = handles actions such as "Delete person", "Add person", " person", etc. Name MVC (Model-View-Controller) Description Separates presentation and interaction from the system data. The system is structured into three logical components that interact with each other. The Model component manages the system data and associated operations on that data. The View component defines and manages how the data is presented to the user. The Controller component manages user interaction (e.g., key presses, mouse clicks, etc.) and passes these interactions to the View and the Model. Example Figure shows the architecture of a web-based application system organized using the MVC pattern.

133 Model-View-Controller Pattern
When used Used when there are multiple ways to view and interact with data. Used when the future requirements for interaction and presentation of data are unknown. Advantages Allows the data to change independently of its representation and vice versa. Supports presentation of the same data in different ways with changes made in one representation shown in all of them. Disadvantages Can involve additional code and code complexity when the data model and interactions are simple.

134 Web Application Architecture using MVC Pattern

135 Layered Architecture Used to model the interfacing of sub-systems.
Organises the system into a set of layers (or abstract machines) each of which provide a set of services. Supports the incremental development of sub-systems in different layers. When a layer interface changes, only the adjacent layer is affected. However, often artificial to structure systems in this way.

136 Generic Layered Architecture
A closed layer means that as a request moves from layer to layer, it must go through the layer right below it to get to the next layer below that one. For example, a request originating from the presentation layer must first go through the business layer and then to the persistence layer before finally hitting the database layer.  The layers of isolation concept means that changes made in one layer of the architecture generally don’t impact or affect components in other layers: the change is isolated to the components within that layer, and possibly another associated layer (such as a persistence layer containing SQL). Name Layered architecture Description Organizes the system into layers with related functionality associated with each layer. A layer provides services to the layer above it so the lowest-level layers represent core services that are likely to be used throughout the system. Example A layered model of a system for sharing copyright documents held in different libraries. When used Used when building new facilities on top of existing systems; Used when the development is spread across several teams with each team responsibility for a layer of functionality; Used when there is a requirement for multi-level security.

137 Generic Layered Architecture
Name Layered architecture Advantages Allows replacement of entire layers so long as the interface is maintained. Redundant facilities (e.g., authentication) can be provided in each layer to increase the dependability of the system. Disadvantages In practice, providing a clean separation between layers is often difficult and a high-level layer may have to interact directly with lower-level layers rather than through the layer immediately below it. Performance can be a problem because of multiple levels of interpretation of a service request as it is processed at each layer.

138 Example : Architecture of iLearn System
iLearn system is a digital learning environment system. Is an open system that could easily accommodate new features and existing services. Configuration services – 1. used to adapt the environment with a specific set of application services and 2. do define how services are shared between students, teachers and their parents. Application services - provide specific applications such as , conferencing, photo sharing etc. and access to specific educational content. Is an external services that are either specifically purchased for the system or are available freely over the Internet. Utility services - provide basic application-independent functionality and which may be used by other services in the system. Utility services are usually developed or adapted specifically for this system.

139 Repository Architecture
Sub-systems must exchange data. This may be done in two ways: Shared data is held in a central database or repository and may be accessed by all sub-systems; Each sub-system maintains its own database and passes data explicitly to other sub-systems. When large amounts of data are to be shared, the repository model of sharing is most commonly used a this is an efficient data sharing mechanism.

140 Repository Architecture for IDE
Name Repository Description All data in a system is managed in a central repository that is accessible to all system components. Components do not interact directly, only through the repository. Example Example of an IDE where the components use a repository of system design information. Each software tool generates information which is then available for use by other tools. When used You should use this pattern when you have a system in which large volumes of information are generated that has to be stored for a long time. You may also use it in data-driven systems where the inclusion of data in the repository triggers an action or tool. Integrated Development Environment is a software application that provides comprehensive facilities to computer programmers.

141 Repository Architecture for IDE
Name Repository Advantages Components can be independent—they do not need to know of the existence of other components. Changes made by one component can be propagated to all components. All data can be managed consistently (e.g., backups done at the same time) as it is all in one place. Disadvantages The repository is a single point of failure so problems in the repository affect the whole system. May be inefficiencies in organizing all communication through the repository. Distributing the repository across several computers may be difficult.

142 Repository Architecture for Hospital Information System

143 Client-Server Architecture
Distributed system model which shows how data and processing is distributed across a range of components Can be implemented on a single computer Set of stand-alone servers which provide specific services such as printing, data management, etc Set of clients which call on these services Network which allows clients to access servers

144 Example : Client-Server Architecture for Film Library
Name Client-server Description In a client–server architecture, the functionality of the system is organized into services, with each service delivered from a separate server. Clients are users of these services and access servers to make use of them. Example Figure above is an example of a film and video/DVD library organized as a client–server system. When used Used when data in a shared database has to be accessed from a range of locations. Because servers can be replicated, may also be used when the load on a system is variable.

145 Example : Client-Server Architecture for Film Library
Name Client-server Advantages The principal advantage of this model is that servers can be distributed across a network. General functionality (e.g., a printing service) can be available to all clients and does not need to be implemented by all services. Disadvantages Each service is a single point of failure by service attacks or server failure. Performance may be unpredictable because it depends on the network as well as the system. May be management problems if servers are owned by different organizations.

146 Pipe and Filter Architecture
Functional transformations process their inputs to produce outputs. May be referred to as a pipe and filter model Variants of this approach are very common. When transformations are sequential, this is a batch sequential model which is extensively used in data processing systems. Not really suitable for interactive systems.

147 Example : Pipe and Filter Architecture in Payments System
Name Pipe and filter Description The processing of the data in a system is organized so that each processing component (filter) is discrete and carries out one type of data transformation. The data flows (as in a pipe) from one component to another for processing. Example Figure above is an example of a pipe and filter system used for processing invoices. When used Commonly used in data processing applications (both batch- and transaction-based) where inputs are processed in separate stages to generate related outputs.

148 Example : Pipe and Filter Architecture in Payments System
Name Pipe and filter Description The processing of the data in a system is organized so that each processing component (filter) is discrete and carries out one type of data transformation. The data flows (as in a pipe) from one component to another for processing. Example Figure above is an example of a pipe and filter system used for processing invoices. When used Commonly used in data processing applications (both batch- and transaction-based) where inputs are processed in separate stages to generate related outputs.

149 Example : Software Architecture of ATM System

150 Layered Information System Architecture

151 Architecture of Mentcare System

152 Web-based Information Systems
Information and resource management systems are now usually web-based systems where the user interfaces are implemented using a web browser. Example : E-commerce systems are Internet-based resource management systems that accept electronic orders for goods or services and then arrange delivery of these goods or services to the customer. In an e-commerce system, the application-specific layer includes additional functionality supporting a ‘shopping cart’ in which users can place a number of items in separate transactions, then pay for them all together in a single transaction.

153 Server Implementation
These systems are often implemented as multi-tier client server/architectures The web server is responsible for all user communications, with the user interface implemented using a web browser; The application server is responsible for implementing application-specific logic as well as information storage and retrieval requests; The database server moves information to and from the database and handles transaction management.

154 EKT 421 SOFTWARE ENGINEERING
Design and Implementation Dr. Nik Adilah Hanin Zahri

155 System Context and Interactions
Understanding the relationships between the software that is being designed and its external environment is essential To decide how to provide the required system functionality and how to structure the system to communicate with its environment. Understanding of the context also lets you establish the boundaries of the system. System boundaries setting helps to decide what features are implemented in the system being designed and what features are in other associated systems.

156 Context and Interaction Models
A system context model is a structural model that demonstrates the other systems in the environment of the system being developed An interaction model is a dynamic model that shows how the system interacts with its environment as it is used

157 System Context for the Weather Station

158 Weather Station Use Cases

159 Use Case Description – Report Weather
Weather Information System System Weather station Use case Actors Description Stimulus Response Comments

160 Use Case Description – Report Weather
System Weather station Use case Report weather Actors Weather information system, Weather station Description 1. The weather station sends a summary of the weather data that has been collected from the instruments in the collection period to the weather information system. 2. The data sent are the maximum, minimum, and average ground and air temperatures; the maximum, minimum, and average air pressures; the maximum, minimum, and average wind speeds; the total rainfall; and the wind direction as sampled at five-minute intervals. Stimulus The weather information system establishes a satellite communication link with the weather station and requests transmission of the data. Response The summarized data is sent to the weather information system. Comments Weather stations are usually asked to report once per hour but this frequency may differ from one station to another and may be modified in the future.

161 Architectural Design Once interactions between the system and its environment have been understood, this information is used to design the system architecture. Identify the major components that make up the system and their interactions, and then may organize the components using an architectural pattern such as a layered or client-server model. The weather station is composed of independent subsystems that communicate by broadcasting messages on a common infrastructure.

162 Sequence Diagram Describing Data Collection

163 Weather Station State Diagram

164 Weather Station Interfaces

165 Software Reuse Level At this level, you reuse entire application systems. Components are collections of objects and object classes that you reuse in application systems. At this level, you don’t reuse software directly but use knowledge of successful abstractions in the design of your software. At this level, you directly reuse objects from a library rather than writing the code yourself.

166 Configuration Management
Configuration management is the general process of managing a changing software system. The aim of configuration management: to support the system integration process so that all developers can access the project code and documents in a controlled way find out what changes have been made compile and link components to create a system.

167 Program Testing Testing is intended to show that a program does what it is intended to do and to discover program defects before it is put into use. When you test software, you execute a program using artificial data. You check the results of the test run for errors, anomalies or information about the program’s non-functional attributes. Can reveal the presence of errors NOT their absence. Testing is part of a more general verification and validation process, which also includes static validation techniques.

168 Program Testing Goals To demonstrate to the developer and the customer that the software meets its requirements. For custom software, this means that there should be at least one test for every requirement in the requirements document. For generic software products, it means that there should be tests for all of the system features, plus combinations of these features, that will be incorporated in the product release. To discover situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification. Defect testing is concerned with rooting out undesirable system behavior such as system crashes, unwanted interactions with other systems, incorrect computations and data corruption.

169 Validation and Defect Testing
The first goal leads to validation testing You expect the system to perform correctly using a given set of test cases that reflect the system’s expected use. The second goal leads to defect testing The test cases are designed to expose defects. The test cases in defect testing can be deliberately obscure and need not reflect how the system is normally used.

170 Testing Process Goals Validation testing Defect testing
To demonstrate to the developer and the system customer that the software meets its requirements A successful test shows that the system operates as intended. Defect testing To discover faults or defects in the software where its behavior is incorrect or not in conformance with its specification A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system.

171 Verification vs Validation
Verification: "Are we building the product right”. The software should conform to its specification. Validation: "Are we building the right product”. The software should do what the user really requires.

172 V & V Confidence Aim of V & V is to establish confidence that the system is ‘fit for purpose’. Depends on system’s purpose, user expectations and marketing environment Software purpose The level of confidence depends on how critical the software is to an organisation. User expectations Users may have low expectations of certain kinds of software. Marketing environment Getting a product to market early may be more important than finding defects in the program.

173 Inspections and Testing
Software inspections concerned with analysis of the static system representation to discover problems (static verification) May be supplement by tool-based document and code analysis. Software testing concerned with exercising and observing product behaviour (dynamic verification) The system is executed with test data and its operational behaviour is observed.

174 Inspections and Testing

175 Software Inspections These involve people examining the source representation with the aim of discovering anomalies and defects. Inspections not require execution of a system so may be used before implementation. They may be applied to any representation of the system (requirements, design, configuration data, test data, etc.). They have been shown to be an effective technique for discovering program errors.

176 Stages of Testing Development testing, where the system is tested during development to discover bugs and defects. Release testing, where a separate testing team test a complete version of the system before it is released to users. User testing, where users or potential users of a system test the system in their own environment.

177 Development Testing Development testing includes all testing activities that are carried out by the team developing the system. Unit testing, where individual program units or object classes are tested. Unit testing should focus on testing the functionality of objects or methods. Component testing, where several individual units are integrated to create composite components. Component testing should focus on testing component interfaces. System testing, where some or all of the components in a system are integrated and the system is tested as a whole. System testing should focus on testing component interactions.

178 Unit Testing Unit testing is the process of testing individual components in isolation. It is a defect testing process. Units may be: Individual functions or methods within an object Object classes with several attributes and methods Composite components with defined interfaces used to access their functionality.

179 Object Class Testing Complete test coverage of a class involves
Testing all operations associated with an object Setting and interrogating all object attributes Exercising the object in all possible states. Inheritance makes it more difficult to design object class tests as the information to be tested is not localised.

180 Weather Station Testing
Need to define test cases for reportWeather, calibrate, test, startup and shutdown. Using a state model, identify sequences of state transitions to be tested and the event sequences to cause these transitions For example: Shutdown -> Running-> Shutdown Configuring-> Running-> Testing -> Transmitting -> Running Running-> Collecting-> Running-> Summarizing -> Transmitting -> Running

181 Automated Testing Whenever possible, unit testing should be automated so that tests are run and checked without manual intervention. In automated unit testing, you make use of a test automation framework (such as JUnit) to write and run your program tests. Unit testing frameworks provide generic test classes that you extend to create specific test cases. They can then run all of the tests that you have implemented and report, often through some GUI, on the success of otherwise of the tests.

182 Automated Test Components
A setup part, where you initialize the system with the test case, namely the inputs and expected outputs. A call part, where you call the object or method to be tested. An assertion part where you compare the result of the call with the expected result. If the assertion evaluates to true, the test has been successful if false, then it has failed.

183 Choosing Unit Test Cases
The test cases should show that, when used as expected, the component that you are testing does what it is supposed to do. If there are defects in the component, these should be revealed by test cases. This leads to 2 types of unit test case: The first of these should reflect normal operation of a program and should show that the component works as expected. The other kind of test case should be based on testing experience of where common problems arise. It should use abnormal inputs to check that these are properly processed and do not crash the component.

184 Testing Strategies Partition testing, where you identify groups of inputs that have common characteristics and should be processed in the same way. You should choose tests from within each of these groups. Guideline-based testing, where you use testing guidelines to choose test cases. These guidelines reflect previous experience of the kinds of errors that programmers often make when developing components.

185 Partition Testing The idea behind this technique is to divide (i.e. to partition) a set of test conditions into groups or sets that can be considered the same (i.e. the system should handle them equivalently), hence ‘equivalence partitioning’. Equivalence partitions are also known as equivalence classes – the two terms mean exactly the same thing. In equivalence-partitioning technique we need to test only one condition from each partition. This is because we are assuming that all the conditions in one partition will be treated in the same way by the software. If one condition in a partition works, we assume all of the conditions in that partition will work, and so there is little point in testing any of these others. Similarly, if one of the conditions in a partition does not work, then we assume that none of the conditions in that partition will work so again there is little point in testing any more in that partition.

186 Equivalence Partitioning

187 Example : Equivalence Partitioning
Let's consider the behavior of tickets in the Flight reservation application, while booking a new flight. Ticket values 1 to 10 are considered valid & ticket is booked. While value 11 to 99 are considered invalid for reservation and error message will appear, "Only ten tickets may be ordered at one time."

188 Example : Equivalence Partitioning
Here is the test condition Any Number greater than 10 entered in the reservation column (let say 11) is considered invalid. Any Number less than 1 that is 0 or below, then it is considered invalid. Numbers 1 to 10 are considered valid Any 3 Digit Number say -100 is invalid.

189 Example : Equivalence Partitioning
Here is the test condition Any Number greater than 10 entered in the reservation column (let say 11) is considered invalid. Any Number less than 1 that is 0 or below, then it is considered invalid. Numbers 1 to 10 are considered valid Any 3 Digit Number say -100 is invalid.

190 Example : Equivalence Partitioning
All possible value cannot be tested due to large number of test case Therefore, use equivalence partitioning hypothesis where the possible values of tickets are divided into groups or sets as shown below where the system behavior can be considered the same. Only one value from each partition is selected for testing. If one condition/value in a partition passes all others will also pass. Likewise, if one condition in a partition fails, all other conditions in that partition will fail.

191 Example : Boundary Value Analysis
In Boundary Value Analysis, you test boundaries between equivalence partitions Instead of checking, one value for each partition you will check the values at the partitions like 0, 1, 10, 11 and so on. Test values is tested at both valid and invalid boundaries. Equivalence partitioning and boundary value analysis are closely related and can be used together at all levels of testing

192 Exercise 1 Suppose a password field accepts minimum 6 characters and maximum 10 characters. Generate the test case and expected outcome for the password field testing.

193 Test Scenario Description
Answer 1 Test Scenario # Test Scenario Description Expected Outcome 1 Enter 0 to 5 characters in password field System should not accept 2 Enter 6 to 10 characters in password field System should accept 3 Enter 11 to 14 character in password field

194 Exercise 2 The following state diagram represents the behavior of television and the transition between states. Generate the test case for the TV. Include scenario, pre-condition, input, expected output and post-condition.

195 Answer 2 Test case 1 2 3 4 5 6 7 8 Test Senario
User wants to switch to standby mode User wants to play TV User wants to Off TV User wants to swith off TV User want to switch to standby mode User wants to Off TV User wants to off TV Start State / Pre-condition S1 S2 S3 Input/Data Press Power ON Press Power OFF Press RC on Press RC OFF Press RC off Expected Output TV Standby TV off TV play Tv Play Next State/ Post-condition Input - Press RC On Press Power Off TV Play TV Off Finish State

196 Release Testing Release testing is the process of testing a particular release of a system that is intended for use outside of the development team. The primary goal of the release testing process is to convince the supplier of the system that it is good enough for use. Release testing, therefore, has to show that the system delivers its specified functionality, performance and dependability, and that it does not fail during normal use. Release testing is usually a black-box testing process where tests are only derived from the system specification. Notes : Black box testing examines the functionality of an application without peering into its internal structures or workings.

197 Release Testing and System Testing
Release testing is a form of system testing. Important differences: A separate team that has not been involved in the system development, should be responsible for release testing. System testing by the development team should focus on discovering bugs in the system (defect testing). The objective of release testing is to check that the system meets its requirements and is good enough for external use (validation testing).

198 Requirements based Testing
Requirements-based testing involves examining each requirement and developing a test or tests for it. Mentcare system requirements: If a patient is known to be allergic to any particular medication, then prescription of that medication shall result in a warning message being issued to the system user. If a prescriber chooses to ignore an allergy warning, they shall provide a reason why this has been ignored.

199 Requirements Tests Set up a patient record with no known allergies. Prescribe medication for allergies that are known to exist. Check that a warning message is not issued by the system. Set up a patient record with a known allergy. Prescribe the medication to that the patient is allergic to, and check that the warning is issued by the system. Set up a patient record in which allergies to two or more drugs are recorded. Prescribe both of these drugs separately and check that the correct warning for each drug is issued. Prescribe two drugs that the patient is allergic to. Check that two warnings are correctly issued. Prescribe a drug that issues a warning and overrule that warning. Check that the system requires the user to provide information explaining why the warning was overruled.

200 Performance Testing Part of release testing may involve testing the emergent properties of a system, such as performance and reliability. Tests should reflect the profile of use of the system. Performance tests usually involve planning a series of tests where the load is steadily increased until the system performance becomes unacceptable. Stress testing is a form of performance testing where the system is deliberately overloaded to test its failure behavior.

201 User Testing User or customer testing is a stage in the testing process in which users or customers provide input and advice on system testing. User testing is essential, even when comprehensive system and release testing have been carried out. The reason for this is that influences from the user’s working environment have a major effect on the reliability, performance, usability and robustness of a system. These cannot be replicated in a testing environment.

202 Types of user Testing Alpha testing Beta testing Acceptance testing
Users of the software work with the development team to test the software at the developer’s site. Beta testing A release of the software is made available to users to allow them to experiment and to raise problems that they discover with the system developers. Acceptance testing Customers test a system to decide whether or not it is ready to be accepted from the system developers and deployed in the customer environment. Primarily for custom systems.


Download ppt "EKT 421 SOFTWARE ENGINEERING"

Similar presentations


Ads by Google