ANURAG GROUP OF INSTITUTIONS
ANURAG GROUP OF INSTITUTIONS
(FORMERLY CVSR COLLEGE OF ENGINEERING) (FORMERLY CVSR COLLEGE OF ENGINEERING)
(Affiliated to JNTU-HYD, Approved by AICTE and NBA Accredited) (Affiliated to JNTU-HYD, Approved by AICTE and NBA Accredited)
Venkatapur(V), Ghatkesar(M), R.R.Dist-501301. Venkatapur(V), Ghatkesar(M), R.R.Dist-501301.
(2012-2013) (2012-2013)
LAB MANUAL FOR
LAB MANUAL FOR
CASE TOOLS & SOFTWARE TESTING LAB
CASE TOOLS & SOFTWARE TESTING LAB
IV B.Tech I SEM
IV B.Tech I SEM
1 .Documenting user requirements using the UML notation 1 .Documenting user requirements using the UML notation 2. Description of the various components of UML
2. Description of the various components of UML 3. The use of Use Cases
3. The use of Use Cases
AIMS OF UML AIMS OF UML 1.
1. Models helps us to visualize a system as it is or an Models helps us to visualize a system as it is or an as we want it to be.as we want it to be. 2.
2. Models permit us to specify the structure or behavior of a system.Models permit us to specify the structure or behavior of a system. 3.
3. Models gives us a template guides us Models gives us a template guides us in constructing a system.in constructing a system. 4.
4. Models document the decisions we Models document the decisions we have made.have made.
REQUIREMENTS REQUIREMENTS Hardware andSoftware required
Hardware andSoftware required:: 1.
1. A working computer system with either A working computer system with either Windows or LinuxWindows or Linux 2.
diagrams using UML for an ATM system whose description is given below. diagrams using UML for an ATM system whose description is given below. UML diagrams to be developed are:
UML diagrams to be developed are: 1.
1. Use Use Case Case Diagram.Diagram. 2.
2. Class Class Diagram.Diagram. 3.
3. Sequence Sequence Diagram.Diagram. 4.
4. Collaboration Collaboration Diagram.Diagram. 5.
5. State State DiagramDiagram 6.
6. Activity Activity Diagram.Diagram. 7.
7. Component Component DiagramDiagram 8.
8. Deployment Deployment Diagram.Diagram. Description for an ATM System Description for an ATM System
The software to be designed will control a simulated automated teller machine The software to be designed will control a simulated automated teller machine (ATM) having a magnetic stripe reader for reading an ATM card, a customer console (ATM) having a magnetic stripe reader for reading an ATM card, a customer console (keyboard and display) for interaction with the customer, a slot for depositing envelopes, (keyboard and display) for interaction with the customer, a slot for depositing envelopes, a dispenser for cash (in multiples of Rs. 100, Rs. 500 and Rs. 1000), a
a dispenser for cash (in multiples of Rs. 100, Rs. 500 and Rs. 1000), a printer for printer for printingprinting customer receipts, and a key-operated switch to allow an operator to start or stop the customer receipts, and a key-operated switch to allow an operator to start or stop the ma-chine. The ATM will communicate with the bank's computer over an appropriate chine. The ATM will communicate with the bank's computer over an appropriate com-munication link. (The software on the latter is not part of the requirements for this munication link. (The software on the latter is not part of the requirements for this prob-lem.)
lem.)
The ATM will service one customer at a time. A customer will be required to The ATM will service one customer at a time. A customer will be required to insert an
insert an ATM card and enter a personal identification number (PIN) - both of which willATM card and enter a personal identification number (PIN) - both of which will be sent to the bank for validation as part of each transaction. The customer will then be be sent to the bank for validation as part of each transaction. The customer will then be able to perform one or more transactions. The card will be retained in the machine able to perform one or more transactions. The card will be retained in the machine un-til the customer indicates that he/she desires no further transactions, at which point it til the customer indicates that he/she desires no further transactions, at which point it will be returned - except as noted below.
will be returned - except as noted below. The ATM must be able to provide the
The ATM must be able to provide the following services to the customer:following services to the customer: 1.
1. A customer must be able to make a cash withdrawal from any suitable accountA customer must be able to make a cash withdrawal from any suitable account linked to the card, in multiples of Rs. 100 or Rs. 500 or Rs. 1000. Approval must linked to the card, in multiples of Rs. 100 or Rs. 500 or Rs. 1000. Approval must be obtained
be obtained from the bank before cash is dispensed.from the bank before cash is dispensed. 2.
2. A A customer customer must must be be able able to to make make a a deposit deposit to any to any account account linked linked to to the the card,card, consisting of cash and/or checks in an envelope. The customer will enter the consisting of cash and/or checks in an envelope. The customer will enter the amount of the deposit into the ATM, subject to manual verification when the amount of the deposit into the ATM, subject to manual verification when the envelope is removed from the machine by an operator. Approval must be envelope is removed from the machine by an operator. Approval must be ob-tained from the bank before physically accepting the envelope.
tained from the bank before physically accepting the envelope. 3.
3. A customer must be able to make a transfer of money between any two accountsA customer must be able to make a transfer of money between any two accounts linked to the card.
linked to the card. 4.
4. A customer must be able to make a balance inquiry of any account linked to theA customer must be able to make a balance inquiry of any account linked to the card.
card. 5.
the bank once it has been approved. In the case of a deposit, a second message will be the bank once it has been approved. In the case of a deposit, a second message will be sent to the bank indicating that the customer has deposited the envelope. (If the sent to the bank indicating that the customer has deposited the envelope. (If the custom-er fails to deposit the envelope within the timeout pcustom-eriod, or presses cancel instead, no er fails to deposit the envelope within the timeout period, or presses cancel instead, no second message will be sent to the bank and the deposit will not be credited to the second message will be sent to the bank and the deposit will not be credited to the cus-tomer.)
tomer.)
If the bank determines that the customer's PIN is invalid, the customer will be If the bank determines that the customer's PIN is invalid, the customer will be required to re-enter the PIN before a transaction can proceed. If the customer is unable to required to re-enter the PIN before a transaction can proceed. If the customer is unable to successfully enter the PIN after three tries, the card will be permanently retained by the successfully enter the PIN after three tries, the card will be permanently retained by the machine, and the customer will have to contact the bank to get it back If a transaction machine, and the customer will have to contact the bank to get it back If a transaction fails for any reason other than an invalid PIN, the ATM will display an explanation of the fails for any reason other than an invalid PIN, the ATM will display an explanation of the problem, and will then ask the customer whether he/she wants to do another transaction. problem, and will then ask the customer whether he/she wants to do another transaction. The ATM will provide the customer with a
The ATM will provide the customer with a printed receipt for each successful transactionprinted receipt for each successful transaction The ATM will have a key-operated switch that will allow an operator to start and The ATM will have a key-operated switch that will allow an operator to start and stop the servicing of customers. After turning the switch to the "on" position, the operator stop the servicing of customers. After turning the switch to the "on" position, the operator will be required to verify and enter the total cash on hand. The machine can only be will be required to verify and enter the total cash on hand. The machine can only be turned off
turned off when it when it is not seis not servicing a rvicing a customer. customer. When the swWhen the switch is itch is moved moved to to the the "off""off" position, the machine will shut down, so that the operator may remove deposit position, the machine will shut down, so that the operator may remove deposit enve-lopes and reload the machine with
lopes and reload the machine with cash, blank receipts, etc.cash, blank receipts, etc. ..
INTRODUCTION ABOUT LAB INTRODUCTION ABOUT LAB
CASE tools known as Computer-aided software engineering tools is a kind CASE tools known as Computer-aided software engineering tools is a kind of component-based developmen
of component-based development which allows t which allows its users to its users to rapidly develop information systems.rapidly develop information systems. The main goal of case technology is the automation of the entire information systems The main goal of case technology is the automation of the entire information systems develop-ment life cycle process using a set of integrated software tools, such as modeling, methodology ment life cycle process using a set of integrated software tools, such as modeling, methodology and automatic code generation. Component based manufacturing has several advantages over and automatic code generation. Component based manufacturing has several advantages over custom development. The main advantages are the availability of high quality, defect free custom development. The main advantages are the availability of high quality, defect free prod-ucts at low cost and at a faster time. The prefabricated components are customized as per the ucts at low cost and at a faster time. The prefabricated components are customized as per the requirements of the customers. The components used are pre-built, ready-tested and add value requirements of the customers. The components used are pre-built, ready-tested and add value and differentiation by rapid customization to the targeted customers. However the products we and differentiation by rapid customization to the targeted customers. However the products we get from case tools are only a skeleton of the final product required and allot of programming get from case tools are only a skeleton of the final product required and allot of programming must be done by hand to get a fully finished, good product.
must be done by hand to get a fully finished, good product. Characteristics of CASE:
Characteristics of CASE: Some of the characteristics of
Some of the characteristics of case toolscase tools
It is a graphic oriented tool.It is a graphic oriented tool.
It supports decomposition of It supports decomposition of process.process.
Some typical CASE tools are: Some typical CASE tools are:
Unified Modeling LanguageUnified Modeling Language
Data modeling tools, andData modeling tools, and
Source code generation toolsSource code generation tools
Introduction to UML (Unified Modeling Language): Introduction to UML (Unified Modeling Language):
The unified modeling language(UML)is a standard language for writing software blue
The unified modeling language(UML)is a standard language for writing software blue prints.prints. The UML is a language for
The UML is a language for
VisualizingVisualizing SpecifyingSpecifying ConstructingConstructing DocumentingDocumenting The artifacts of a
The artifacts of a software system:software system:
UML is a language that provides vocabulary and the rules for combing words in that UML is a language that provides vocabulary and the rules for combing words in that vo-cabulary for the purpose of
cabulary for the purpose of communication.communication.
A modeling language is a language whose vocabulary and rules focus on
A modeling language is a language whose vocabulary and rules focus on the concept andthe concept and physical representation of a system. Vocabulary and rules of a language tell us how to create and physical representation of a system. Vocabulary and rules of a language tell us how to create and real well formed models, but they don‘t tell you what model you should create and when should real well formed models, but they don‘t tell you what model you should create and when should create them.
Visualizing Visualizing
T
The UML is more than just a bunch of graphical symbols. In UML each symbol has wellhe UML is more than just a bunch of graphical symbols. In UML each symbol has well defined sema
defined semantics. In this mantics. In this manner one nner one developer developer can can write a model in write a model in the UML and athe UML and anothernother developer or even another tools can interpret
developer or even another tools can interpret the model unambiguously.the model unambiguously. Specifying
Specifying
UML is used for specifying means building models that are precise, unambiguous and UML is used for specifying means building models that are precise, unambiguous and complete. UML addresses the specification of all the important analysis, design and complete. UML addresses the specification of all the important analysis, design and implemen-tation decisions that must be made in
tation decisions that must be made in developing and deploying a software intensive system.developing and deploying a software intensive system. Constructing
Constructing
UML is not a
UML is not a visual programming language but its models can be directly connected to avisual programming language but its models can be directly connected to a variety of programming languages. This means that it is possible to map from a model in the variety of programming languages. This means that it is possible to map from a model in the UML to a programming language such as java, c++ or Visual Basic or even to tables in a UML to a programming language such as java, c++ or Visual Basic or even to tables in a rela-tional database or the pe
tional database or the persistent store of an object-oriented databarsistent store of an object-oriented database. This mapping se. This mapping permits for-permits for-ward engineering. The generation of code from a UML model into a programming language. ward engineering. The generation of code from a UML model into a programming language. The reverse
The reverse engineering is engineering is also possible also possible you can you can reconstruct a reconstruct a model from model from an an im- im-plementation back into the UML.
plementation back into the UML. Documenting
Documenting
UML is a language for Documenting. A software organization produces all sorts of UML is a language for Documenting. A software organization produces all sorts of arti-facts in addition to
facts in addition to raw executable code. These artifacts include Requirements, Architecturaw executable code. These artifacts include Requirements, Architecture, De-re, De-sign, Source code, Project plans, Test, Prototype, and Release. Such artifacts are not only the sign, Source code, Project plans, Test, Prototype, and Release. Such artifacts are not only the deliverables of a project, they are also critical in controlling, measuring and communicating deliverables of a project, they are also critical in controlling, measuring and communicating about a system during its
about a system during its development and after its deployment.development and after its deployment. Conceptual model of the UML:
Conceptual model of the UML:
To understand the UML, we need to form a conceptual model of the language and this To understand the UML, we need to form a conceptual model of the language and this requires learning three major elements.
requires learning three major elements. The UML Basic Building Blocks. The UML Basic Building Blocks. The Rules that direct how
The Rules that direct how those building blocks may be put those building blocks may be put together. Some commontogether. Some common mechanisms that apply through
mechanisms that apply throughout the UML. As UML describes the real time out the UML. As UML describes the real time systems it is verysystems it is very important to make a
important to make a conceptual model and then proceed gradually. Conceptual model of UMLconceptual model and then proceed gradually. Conceptual model of UML can be mastered by learning the
can be mastered by learning the following three major elements:following three major elements:
UML building blocks
UML building blocks
Rules to connect the building blocks. Rules to connect the building blocks. Common mechanisms of UML. Common mechanisms of UML.
UML building blocks. The building blocks of
ThingsThings RelationshipsRelationships DiagramsDiagrams
Things:
Things:
Things are the most important building Things are the most important building blocks of UML.blocks of UML.Things can be: Things can be:
StructuralStructural BehavioralBehavioral GroupingGrouping AnnotationalAnnotational
Structural things
Structural things
::
Class:Class: A class is the descriptor for a set of objects with similar structure, behavior, and rela-A class is the descriptor for a set of objects with similar structure, behavior, and rela-tionships. It is r
tionships. It is represented by a rectangle.epresented by a rectangle.
Interface:
Interface: An interface is a specified for the An interface is a specified for the externally-visible operations of a class, component,externally-visible operations of a class, component, or other classifier (including subsystems) without specification of internal structure. It is or other classifier (including subsystems) without specification of internal structure. It is repre-sented by a circle. sented by a circle. Relations: Relations: AssociationAssociation DependencyDependency GeneralizationGeneralization RealizationRealization In addition to this there are
In addition to this there are
Directed AssociationDirected Association
Aggregation andAggregation and
CompositionComposition Association:
Association:
An association is a structural relationship that specifies the relation between two objects when An association is a structural relationship that specifies the relation between two objects when they are at the same level (peer level systems).
they are at the same level (peer level systems).
An Association can specify the relationship, role of
An Association used in class diagram, Component diagram, deployment diagram,An Association used in class diagram, Component diagram, deployment diagram,
usecase diagrams. usecase diagrams.
The multiplicity can be rThe multiplicity can be represented as 1-epresented as 1-1..*,*,0…1.1..*,*,0…1.
It is represented as follows: It is represented as follows: Directed Association: Directed Association:
Links a semantic association between two classes in the Links a semantic association between two classes in the UML diagram.UML diagram.
Directed association is used in Directed association is used in class diagram, Component diagram, deployment diagram,class diagram, Component diagram, deployment diagram,
usecase diagrams. usecase diagrams. Symbol: Symbol: Aggregation: Aggregation:
Links a semantic association between two classes in the Links a semantic association between two classes in the UML diagram.UML diagram.
Aggregation is used in class diagram.Aggregation is used in class diagram.
Symbol: Symbol: Composition: Composition:
Links a semantic association between two classes in the UML Links a semantic association between two classes in the UML diagram.diagram.
Composition is used in class diagram.Composition is used in class diagram.
Symbol: Symbol:
Generalization: Generalization:
Generalization is a specification relationship in which objects of the specialized element (the Generalization is a specification relationship in which objects of the specialized element (the child) are substitutable for objects of the generalization element (the parent).It is used in class child) are substitutable for objects of the generalization element (the parent).It is used in class diagram. diagram. Symbol: Symbol: Dependency: Dependency:
A dependency is a semantic relationship in which if there is any change occurred in one object A dependency is a semantic relationship in which if there is any change occurred in one object that may affect other object.
that may affect other object.
Dependency is used in class diagram, Component diagram, deployment diagram, use-Dependency is used in class diagram, Component diagram, deployment diagram,
use-case diagrams. case diagrams. Symbol: Symbol: ---Realization: Realization:
Realization is a Specified tool
Realization is a Specified tool that can be represented by providing a that can be represented by providing a relationship with classifier.relationship with classifier.
Dependency is used in class diagram, Component diagram, deployment diagram, use-Dependency is used in class diagram, Component diagram, deployment diagram,
use-case diagrams. case diagrams. Symbol: Symbol:
---Class diagrams: Class diagrams:
A class d
A class diagram is that whiagram is that which represents ich represents a set of ca set of classes, interfaclasses, interfaces, and coes, and collaborations andllaborations and their relationships, graphica
their relationships, graphically a class diagram is lly a class diagram is a collection of vertices and arca collection of vertices and arcs.s. It consists of three compartments.
It consists of three compartments.
Uses:
Uses: A class diagram is used to model the static design view of a sA class diagram is used to model the static design view of a s ystem.ystem. Object diagrams:
Object diagrams:
An object diagram shares the same common properties of
An object diagram shares the same common properties of all other diagrams.all other diagrams.
Uses:
Uses: An object diagram is used to model the static design view of a An object diagram is used to model the static design view of a system.system. UseCase Diagrams:
UseCase Diagrams:
A usecase diagram shares the common properties as all
A usecase diagram shares the common properties as all diagrams. It distinguishes in the contentsdiagrams. It distinguishes in the contents of use cases, actors,
of use cases, actors, dependencydependency, and , and generalization relationships.generalization relationships.
Actor Actor Uses:
Uses: A Usecase diagram is used to model the static design view of a system.A Usecase diagram is used to model the static design view of a system. Interaction Diagrams:
Interaction Diagrams:
An Interaction diagram shares the same common properties as all other diagrams. It differs An Interaction diagram shares the same common properties as all other diagrams. It differs in its contents in its contents ObjectsObjects LinksLinks MessagesMessages
It includes two diagrams
It includes two diagrams – – Sequence and CollaborationSequence and Collaboration Sequence Diagrams:
Sequence Diagrams:
A sequence diagram emphasizes the time ordering of messages. Sequence diagrams have two A sequence diagram emphasizes the time ordering of messages. Sequence diagrams have two features that distinguish them from collaboration diagrams.
features that distinguish them from collaboration diagrams. (i)Object life time
(i)Object life time (ii)The focus of control (ii)The focus of control
Name Name Attributes Attributes Operations Operations ; Name ; Name Attributes Attributes O
Collaboration Diagrams: Collaboration Diagrams:
A collaboration diagram emphasizes the organization of the objects that participate in an A collaboration diagram emphasizes the organization of the objects that participate in an inter-action
action
Collaboration diagrams have two features that distinguish them
Collaboration diagrams have two features that distinguish them from sequence diagrams.from sequence diagrams. (i)Path
(i)Path
(ii) The Sequence number (ii) The Sequence number Object:
Object: It is an instance of a class.It is an instance of a class. Symbol:
Symbol: Stimulus:
Stimulus: A Stimulus is A Stimulus is a communication between two Instances that conveys information witha communication between two Instances that conveys information with the expectation that action will ensue. A Stimulus will cause an Operation to be invoked, raise a the expectation that action will ensue. A Stimulus will cause an Operation to be invoked, raise a Signal, or cause an Instance to
Signal, or cause an Instance to be created or destroyed.be created or destroyed. Symbol:
Symbol:
It can be annotated by a name. It has a property as Action kind. It can be annotated by a name. It has a property as Action kind. Call: Call: Send: Send: Return: Return: --- ---Create: Create: <<create>> <<create>> Destroy: Destroy: <<destroy>> <<destroy>> Uses:
Uses:Interaction diagrams are used to model the dynamic aspects of a system. It is obtained inInteraction diagrams are used to model the dynamic aspects of a system. It is obtained in two ways:
two ways: (i)
(i) To model flows of control by time ordering.To model flows of control by time ordering. (ii)
(ii) To model flows of control by organization.To model flows of control by organization. State Chart Diagrams:
State Chart Diagrams: State:
State: A state is a condition during the life of an object or an interaction during which it satis-A state is a condition during the life of an object or an interaction during which it satis-fies some condition, performs some action, or waits for some event. It is represented by a fies some condition, performs some action, or waits for some event. It is represented by a round-ed rectangle. ed rectangle. Symbol: Symbol: Object name Object name
Sub machine State:
Sub machine State: A submachine state is a A submachine state is a syntactical conveniencsyntactical convenience that facilitates reuse e that facilitates reuse andand modularity. It is shorthand that
modularity. It is shorthand that implies a macro-like expansion by another state implies a macro-like expansion by another state machine and ismachine and is semantically equivalent to a composite state.
semantically equivalent to a composite state. Symbol:
Symbol:
Initial State: Initial State:
An initial is a kind
An initial is a kind of pseudo state that represents the starting point in a region of a state mof pseudo state that represents the starting point in a region of a state m a- a-chine. It has a single outgoing transition to the default state of t
chine. It has a single outgoing transition to the default state of t he enclosing region, and has nohe enclosing region, and has no incoming transitions. There can be one (and only one) initial state in any given region of a state incoming transitions. There can be one (and only one) initial state in any given region of a state machine. It is not itself a
machine. It is not itself a state but acts as a marker.state but acts as a marker. Symbol:
Symbol:
FinalState:
FinalState: A final state represents the last or "final" state of the enclosing composite state.A final state represents the last or "final" state of the enclosing composite state. There may be more than one final state at any level signifying that the composite state can end There may be more than one final state at any level signifying that the composite state can end in different ways or conditions. When a final state is reached and there are no other enclosing in different ways or conditions. When a final state is reached and there are no other enclosing states it means that the entire
states it means that the entire state machine has completed its transitions and no more transitionsstate machine has completed its transitions and no more transitions can occur.
can occur. Symbol:Symbol:
JunctionPoint:
JunctionPoint: Junction Point chains together transitions into a single run-to-completion path.Junction Point chains together transitions into a single run-to-completion path. May have multiple input and/or output transitions. Each complete path involving a junction is May have multiple input and/or output transitions. Each complete path involving a junction is logically independent and only one such path fires at
logically independent and only one such path fires at one time. May be used one time. May be used to construct branch-to construct branch-es and mergbranch-es.
es and merges. Symbol: Symbol:
Transition:
Transition: A transition is a directed relationship between a source state vertex and a targetA transition is a directed relationship between a source state vertex and a target state vertex. It may be part of a compound transition, which takes the state machine from one state vertex. It may be part of a compound transition, which takes the state machine from one state configuration to another, representing the complete response of the state machine to a state configuration to another, representing the complete response of the state machine to a par-ticular event instance.
ticular event instance. Symbol:
Symbol:
Sub State Name Sub State Name
Activity Diagram: Activity Diagram:
It represents the different activities in the system. It represents the different activities in the system. Action State:
Action State: An action state represents the execution of an An action state represents the execution of an atomic action, typically the invoca-atomic action, typically the invoca-tion of an operainvoca-tion. An acinvoca-tion state is a simple
tion of an operation. An action state is a simple state with an entry state with an entry action whose only exit transi-action whose only exit transi-tion is triggered by the implicit event of completing the executransi-tion of the entry actransi-tion. The state tion is triggered by the implicit event of completing the execution of the entry action. The state therefore corresponds to the execution of the
therefore corresponds to the execution of the entry action itself andentry action itself and the outgoing transition is activated as soon
the outgoing transition is activated as soon as the action has as the action has completed its execution.completed its execution. Symbol:
Symbol:
Sub Activity State:
Sub Activity State: A sub activity state represents the execution of a non-atomic sequence of A sub activity state represents the execution of a non-atomic sequence of steps that has some duration; that is, internally it consists of a set
steps that has some duration; that is, internally it consists of a set of actions and possibly waitingof actions and possibly waiting for events. That is, a sub activity state is a hierarchical action, where an associated sub activity for events. That is, a sub activity state is a hierarchical action, where an associated sub activity graph is executed.
graph is executed. Symbol:
Symbol:
Initial State:
Initial State: An initial is a kind of An initial is a kind of pseudo state that represents the starting point in a region of apseudo state that represents the starting point in a region of a state machine. It has a single outgoing transition to the default state of the
state machine. It has a single outgoing transition to the default state of the enclosing region, andenclosing region, and has no incoming transitions. There can be one (and only one) initial state in any given region of has no incoming transitions. There can be one (and only one) initial state in any given region of a state machine. It is not itself
a state machine. It is not itself a state but acts as a marker.a state but acts as a marker. Symbol:
Symbol:
Final State:
Final State: A final state represents the last or "final" state of the enclosing composite state.A final state represents the last or "final" state of the enclosing composite state. There may be more than one final state at any level signifying that the composite state can end There may be more than one final state at any level signifying that the composite state can end in different ways or conditions. When a final state is reached and there are no other enclosing in different ways or conditions. When a final state is reached and there are no other enclosing states it means that the entire
states it means that the entire state machine has completed its transitions and no more transitionsstate machine has completed its transitions and no more transitions can occur.
can occur. Symbol: Symbol:
Sub Activity Name Sub Activity Name
Decision:
Decision: A state diagram (and bA state diagram (and by derivation an activity diagram) expresses a decision wheny derivation an activity diagram) expresses a decision when guard conditions are used to indicate different
guard conditions are used to indicate different possible transitions that depend on Boolean con-possible transitions that depend on Boolean con-ditions of the owning object.
ditions of the owning object. Symbol:
Symbol:
Component Diagrams: Component Diagrams:
Package:
Package: A package is a grouping of model elements. Packages themselves may be nestedA package is a grouping of model elements. Packages themselves may be nested within other packages. A package may contain subordinate packages as well as other kinds of within other packages. A package may contain subordinate packages as well as other kinds of model elements. All kinds of UML model elements can be organized into packages. model elements. All kinds of UML model elements can be organized into packages. Symbol:
Symbol:
Component:
Component: A component represents a modular, deployable, and replaceable part of a A component represents a modular, deployable, and replaceable part of a systemsystem that encapsulates implementation and exposes a set of interfaces.
that encapsulates implementation and exposes a set of interfaces. Symbol:
Symbol:
Artifact:
Artifact: An Artifact represents a physical piece of information that is used or produced by aAn Artifact represents a physical piece of information that is used or produced by a software development process. Examples of Artifacts include models, source files, scripts, and software development process. Examples of Artifacts include models, source files, scripts, and binary executable files. An Artifact may constitute the implementation of a deployable binary executable files. An Artifact may constitute the implementation of a deployable compo-nent. nent. Symbol: Symbol: <<Artifact>> <<Artifact>>
Deployment Diagrams: Deployment Diagrams: Node:
Node: A node is a run-time physical object that represents a computational resource, generallyA node is a run-time physical object that represents a computational resource, generally having at least a memory and often processing capability as well, and upon which components having at least a memory and often processing capability as well, and upon which components may be deployed.
may be deployed. Symbol:
Symbol:
Node Instance:
Node Instance: A node instance is an A node instance is an instance of a node. A instance of a node. A collection of component instancescollection of component instances may reside on the node i
may reside on the node instance.nstance. Symbol:
Symbol:
Artifact:
Artifact: An Artifact represents a physical piece of information that is used or produced by aAn Artifact represents a physical piece of information that is used or produced by a software development process. Examples of Artifacts include models, source files, scripts, and software development process. Examples of Artifacts include models, source files, scripts, and binary executable files. An Artifact may constitute the implementation of a deployable binary executable files. An Artifact may constitute the implementation of a deployable compo-nent. nent. Symbol: Symbol: ARCHITECTURE OF UML ARCHITECTURE OF UML
Any real world system is used by different users. The users can be developers, testers, Any real world system is used by different users. The users can be developers, testers, busi-ness people, analysts and many more. So before designing a system the architecture is made ness people, analysts and many more. So before designing a system the architecture is made with different perspectives in mind. The most important part is to visualize the system from with different perspectives in mind. The most important part is to visualize the system from dif-ferent viewer‘s perspective. The better we understand the better we make the system. UML ferent viewer‘s perspective. The better we understand the better we make the system. UML plays an important role i
plays an important role in defining different perspectives of a sn defining different perspectives of a s ystem. These perspectives are:ystem. These perspectives are:
DesignDesign ImplementationImplementation ProcessProcess DeploymentDeployment
And the centre is the
And the centre is the Use Case viewUse Case view which connects all these four. A which connects all these four. A Use case represents theUse case represents the
Node Node Name Name Node Name Node Name <<Artifact>> <<Artifact>>
Design
Design of a system consists of classes, interfaces and collaboration. UML provides class dia-of a system consists of classes, interfaces and collaboration. UML provides class dia-gram, object diagram to
gram, object diagram to support this. Implementation defines the components assembled togeth-support this. Implementation defines the components assembled togeth-er to make a complete physical system. UML component diagram is used to support er to make a complete physical system. UML component diagram is used to support implemen-tation perspective.
tation perspective. Process
Process defines the flow of the system. So the same elements as used in Design are also used todefines the flow of the system. So the same elements as used in Design are also used to support this perspective.
support this perspective. Deployment
Deployment represents the physical nodes of the system that represents the physical nodes of the system that forms the hardware. UML dforms the hardware. UML de- e-ployment diagram is used to
ployment diagram is used to support this perspective.support this perspective.
Automatic Teller Machine
Automatic Teller Machine
USE CASE DIAGRAM USE CASE DIAGRAM Overview:
Overview:
To model a system the most important aspect is to capture the dynamic behavior. To model a system the most important aspect is to capture the dynamic behavior. To clarify a bit in details, dynamic behavior means the behavior of the system when it is running To clarify a bit in details, dynamic behavior means the behavior of the system when it is running operating. So only static behavior is not sufficient to model a system rather dynamic behavior is operating. So only static behavior is not sufficient to model a system rather dynamic behavior is more important than static behavior. In UML there are five diagrams available to model more important than static behavior. In UML there are five diagrams available to model dynamic nature and use case diagram is one of them. Now as we have to discuss that the use dynamic nature and use case diagram is one of them. Now as we have to discuss that the use case diagram is dynamic in nature there should be some internal or external factors for making case diagram is dynamic in nature there should be some internal or external factors for making the interaction. These internal and external agents are known as actors. So use case diagrams are the interaction. These internal and external agents are known as actors. So use case diagrams are consists of actors, use cases and their relationships. The diagram is used to model the consists of actors, use cases and their relationships. The diagram is used to model the system/subsystem of an application. A single use case diagram captures a particular system/subsystem of an application. A single use case diagram captures a particular functionality of a system. So
functionality of a system. So to model the entire to model the entire system numbers of use case diagrams are used.system numbers of use case diagrams are used. Purpose:
Purpose:
The purpose of use case diagram is to capture the dynamic aspect of a system. But this The purpose of use case diagram is to capture the dynamic aspect of a system. But this definition is too generic to describe the purpose. Because other four diagrams (activity, definition is too generic to describe the purpose. Because other four diagrams (activity, se-quence, collaboration and State chart) are also having the same purpose. So we will look into quence, collaboration and State chart) are also having the same purpose. So we will look into some specific purpose which will distinguish it from
some specific purpose which will distinguish it from other four diagrams. Use case diagrams areother four diagrams. Use case diagrams are used to gather the requirements of a system including internal and external influences. These used to gather the requirements of a system including internal and external influences. These requirements are mostly design requirements. So when a system is analyzed to gather its requirements are mostly design requirements. So when a system is analyzed to gather its func-tionalities use cases are prepared and actors are i
tionalities use cases are prepared and actors are identified.dentified.
So in brief, the purposes of use case diagrams can be as follows: So in brief, the purposes of use case diagrams can be as follows:
Used to gather requirements of Used to gather requirements of a system.a system.
Used to get an outside view of a system.Used to get an outside view of a system.
Identify external and internal factors influencing tIdentify external and internal factors influencing the system.he system.
USE CASE DIAGRAM FOR ATM USE CASE DIAGRAM FOR ATM
Withdrawal UseCase Withdrawal UseCase
A withdrawal transaction asks the customer to choose a type of account to withdraw A withdrawal transaction asks the customer to choose a type of account to withdraw from (e.g. checking) from a menu of possible accounts, and to choose a dollar amount from a from (e.g. checking) from a menu of possible accounts, and to choose a dollar amount from a menu of possible amounts. The system verifies that it has sufficient money on
menu of possible amounts. The system verifies that it has sufficient money on hand to satisfy thehand to satisfy the request before sending the transaction to the bank. (If not, the customer is informed and asked to request before sending the transaction to the bank. (If not, the customer is informed and asked to enter a different amount.) If the transaction is approved by the bank, the appropriate amount of enter a different amount.) If the transaction is approved by the bank, the appropriate amount of cash is dispensed by the machine before it issues a receipt. A withdrawal transaction can be cash is dispensed by the machine before it issues a receipt. A withdrawal transaction can be can-celled by the customer pressing the Cancel key any time prior to choosing the dollar amount. celled by the customer pressing the Cancel key any time prior to choosing the dollar amount. Deposit Use Case
Deposit Use Case
A deposit transaction asks the customer to choose a type of account to deposit to (e.g. A deposit transaction asks the customer to choose a type of account to deposit to (e.g. checking) from a menu of possible accounts, and to type in a dollar amount on the keyboard. checking) from a menu of possible accounts, and to type in a dollar amount on the keyboard. The transaction is initially sent to the bank to
The transaction is initially sent to the bank to verify that the ATM can accept a deposit from verify that the ATM can accept a deposit from thisthis customer to this account. If the transaction is approved, the machine accepts an envelope from customer to this account. If the transaction is approved, the machine accepts an envelope from the customer containing cash and/or checks before it issues a receipt. Once the envelope has the customer containing cash and/or checks before it issues a receipt. Once the envelope has been received, a second message is sent to the bank, to confirm that the bank can credit the been received, a second message is sent to the bank, to confirm that the bank can credit the cus-tomer‘s account –
tomer‘s account – contingent on manual verification of the deposit envelope contents by an op-contingent on manual verification of the deposit envelope contents by an op-erator later.
A deposit transaction can be cancelled by the
A deposit transaction can be cancelled by the customer pressing the Cancel key any timecustomer pressing the Cancel key any time prior to inserting the envelope containing the deposit. The transaction is automatically cancelled prior to inserting the envelope containing the deposit. The transaction is automatically cancelled if the customer fails to insert the envelope containing the deposit within a reasonable period of if the customer fails to insert the envelope containing the deposit within a reasonable period of time after being asked to do so.
time after being asked to do so. Transfer UseCase
Transfer UseCase
A transfer transaction asks the customer to choose a type of account to
A transfer transaction asks the customer to choose a type of account to transfer from (e.g.transfer from (e.g. checking) from a menu of possible accounts, to choose a different account to transfer to, and to checking) from a menu of possible accounts, to choose a different account to transfer to, and to type in a dollar amount on
type in a dollar amount on the keyboard. No further action is required once the the keyboard. No further action is required once the transaction is ap-transaction is ap-proved by the bank before printing the
proved by the bank before printing the receipt.receipt.
A transfer transaction can be cancelled by the
A transfer transaction can be cancelled by the customer pressing the Cancel key any timecustomer pressing the Cancel key any time prior to entering a dollar amount.
prior to entering a dollar amount. Inquiry Use Case
Inquiry Use Case
An inquiry transaction asks the customer to choose a type of account to inquire about An inquiry transaction asks the customer to choose a type of account to inquire about from a menu of
from a menu of possible accounts. No further action is possible accounts. No further action is required once the transaction is approvedrequired once the transaction is approved by the bank before printing the receipt. An inquiry transaction can be cancelled by the customer by the bank before printing the receipt. An inquiry transaction can be cancelled by the customer pressing the Cancel key any time prior
pressing the Cancel key any time prior to choosing the account to inquire to choosing the account to inquire about.about. ValidateUser usecase:
ValidateUser usecase:
This usecase is for validate the user i.e check the pin number, when the bank reports that This usecase is for validate the user i.e check the pin number, when the bank reports that the customer‘s transaction is disapprov
the customer‘s transaction is disapproved due to an invalid PIN. The customer is required to re-ed due to an invalid PIN. The customer is required to re-enter the PIN and the original request is sent to the bank again. If the bank now approves the enter the PIN and the original request is sent to the bank again. If the bank now approves the transaction, or disapproves it for some other
transaction, or disapproves it for some other reason, the original use case is reason, the original use case is continued; otherwisecontinued; otherwise the process of re-entering the
the process of re-entering the PIN is repeated. Once the PPIN is repeated. Once the PIN is successfully re-enteredIN is successfully re-entered
If the customer fails three times to enter the correct PIN, the card is permanently If the customer fails three times to enter the correct PIN, the card is permanently re-tained, a screen is displayed informing the customer of this and suggesting he/she contact the tained, a screen is displayed informing the customer of this and suggesting he/she contact the bank, and the entire customer session is
bank, and the entire customer session is aborted.aborted. PrintBill usecase
PrintBill usecase
This usecase is for printing corresponding bill after transactions(withdraw or deposit ,or This usecase is for printing corresponding bill after transactions(withdraw or deposit ,or balance enquiry, transfer) are
balance enquiry, transfer) are completed.completed. Update Account
Update Account
This usecase is for updating corresponding user accounts after transactions (withdraw or This usecase is for updating corresponding user accounts after transactions (withdraw or deposit or transfer) are completed.
2. CLASS DIAGRAM 2. CLASS DIAGRAM Overview:
Overview:
The class diagram is a static diagram. It represents the static view of an application. The class diagram is a static diagram. It represents the static view of an application. Class diagram is not only used for
Class diagram is not only used for visualizing, describing and documenvisualizing, describing and documenting different aspects of ating different aspects of a system but also for constructing executable code of the software application. The class diagram system but also for constructing executable code of the software application. The class diagram describes the attributes and operations of a class and
describes the attributes and operations of a class and also the constraints imposed on the system.also the constraints imposed on the system. The class diagram shows a
The class diagram shows a collection of classes, interfaces, associations, collaborations and con-collection of classes, interfaces, associations, collaborations and con-straints. It is also known as a structural diagram.
straints. It is also known as a structural diagram. Purpose:
Purpose:
The purpose of the class diagram is to model the static view of an application. The class The purpose of the class diagram is to model the static view of an application. The class diagrams are the only diagrams which can be directly mapped with object oriented languages diagrams are the only diagrams which can be directly mapped with object oriented languages and thus widely used at the time of construction. The UML diagrams like activity diagram, and thus widely used at the time of construction. The UML diagrams like activity diagram, se-quence diagram can only give the sese-quence flow of the application but class diagram is a bit quence diagram can only give the sequence flow of the application but class diagram is a bit dif- dif-ferent. So it is the most popular UML diagram in the coder community. So the purpose of the ferent. So it is the most popular UML diagram in the coder community. So the purpose of the class diagram can be summarized as:
class diagram can be summarized as:
Analysis and design of the static view of an application.Analysis and design of the static view of an application.
Describe responsibilities of a system.Describe responsibilities of a system.
Base for component and deployment diagrams.Base for component and deployment diagrams.
Forward and reverse Forward and reverse engineering.engineering.
Contents: Contents:
Class diagrams commonly contain the following things Class diagrams commonly contain the following things
ClassesClasses InterfacesInterfaces CollaborationsCollaborations
Class diagram
Class diagram for for ATM ATM systemsystem
3. INTERACTION DIAGRAMS 3. INTERACTION DIAGRAMS
We have two types of interaction diagrams in UML. One is sequence diagram and the We have two types of interaction diagrams in UML. One is sequence diagram and the other is a collaboration diagram. The sequence diagram captures the time sequence of message other is a collaboration diagram. The sequence diagram captures the time sequence of message flow from one object to another and the collaboration diagram describes the organization of flow from one object to another and the collaboration diagram describes the organization of ob- jects in a sy
1.
1. Objects taking part in the Objects taking part in the interaction.interaction. 2.
2. Message flows among the objects.Message flows among the objects. 3.
3. The sequence in which the messages are flowing.The sequence in which the messages are flowing. 4.
4. Object organization.Object organization. Purpose:
Purpose: 1.
1. To capture dynamic behaviour of a sTo capture dynamic behaviour of a system.ystem. 2.
2. To describe the message flow in To describe the message flow in the system.the system. 3.
3. To describe structural organization of the objects.To describe structural organization of the objects. 4.
4. To describe interaction among objects.To describe interaction among objects. Contents of a Sequence Diagram
Contents of a Sequence Diagram Objects Objects Focus of control Focus of control Messages Messages Life line Life line Contents Contents
Contents of a Collaboration Diagram Contents of a Collaboration Diagram
Objects Objects Links Links Messages Messages 4.
U
Usseerr KKeeyyPPaadd ATM Machine ATM Machine
1: Insert card 1: Insert card
2: Validate card 2: Validate card
3: Please insert Valid card 3: Please insert Valid card
4: Enter Pin Number 4: Enter Pin Number
5: Pin Number 5: Pin Number
6: Validate P
6: Validate P in Numbein Number r
7: W
7: W rong Pin Enter Currong Pin Enter Currect Onerect One
8: Select
8: Select TTransaction Typeransaction Type
9: Enter The Amount To WithDraw 9: Enter The Amount To WithDraw
10: Amount In Digits 10: Amount In Digits
11: Check Balance 11: Check Balance
12: Can't WithDraw Ur Balance is Low 12: Can't WithDraw Ur Balance is Low
13: Do U want Receipt 13: Do U want Receipt
14: Yes / No 14: Yes / No
15: Please Collect
15: Please Collect Ur MoneUr Money y & Receipt& Receipt
16: Do U want Continue Yes / No 16: Do U want Continue Yes / No
17: No 17: No
18: Thanks You For Using Our ATM Service 18: Thanks You For Using Our ATM Service
5.
6.
6. STATE STATE DIAGRAMDIAGRAM Statechart diagram is
Statechart diagram is used to model dynamused to model dynamic nature of a system. They define diffeic nature of a system. They define differentrent states of an object during its lifetime. And these states are changed by events. So Statechart states of an object during its lifetime. And these states are changed by events. So Statechart dia-grams are useful to model
grams are useful to model reactive systems. Reactive systems can be defined as a system thatreactive systems. Reactive systems can be defined as a system that responds to external or internal events.
responds to external or internal events.
Statechart diagram describes the flow of control from one state to another state. States Statechart diagram describes the flow of control from one state to another state. States are defined as a condition in which an object exists and it changes when some event is triggered. are defined as a condition in which an object exists and it changes when some event is triggered. So the most important purpose of Statechart diagram is to model life time of an object from So the most important purpose of Statechart diagram is to model life time of an object from creation to termination.
creation to termination.
Statechart diagrams are also used for forward and reverse engineering of a system. But Statechart diagrams are also used for forward and reverse engineering of a system. But the main purpose is to
the main purpose is to model reactive system.model reactive system. Following are the main purposes of
Following are the main purposes of using Statechart diagrams:using Statechart diagrams: 1.
1. To model dynamic aspect of a To model dynamic aspect of a system.system. 2.
2. To model life time of a rTo model life time of a reactive system.eactive system. 3.
3. To describe different states of an object during its life tiTo describe different states of an object during its life time.me. 4.
4. Define a state machine to model states of an object.Define a state machine to model states of an object. Contents
Contents
Simply state and composite states Transitions, including events and actions Simply state and composite states Transitions, including events and actions Common use
Common use
They are use to model
They are use to model the dynamic aspects of a system. the dynamic aspects of a system. Event ordered behavior of any kind of Event ordered behavior of any kind of objects, to model reactive objects.
STATE CHART DIAGRAM OF ATM STATE CHART DIAGRAM OF ATM
7 .ACTIVITY DIAGRAM 7 .ACTIVITY DIAGRAM
Activity diagram is basically a flow chart to represent the flow form one activity to Activity diagram is basically a flow chart to represent the flow form one activity to an-other . The activity can be described as an operation of the system. So the control flow is drawn other . The activity can be described as an operation of the system. So the control flow is drawn from one operation to another. This flow can be sequential, branched or concurrent. Activity from one operation to another. This flow can be sequential, branched or concurrent. Activity di-agrams deals with all type of flow by using elements like fork, join
agrams deals with all type of flow by using elements like fork, join etc.etc. Contents
Contents
Initial/Final State , Activity , Fork
Initial/Final State , Activity , Fork & Join , Branch , Swimlanes& Join , Branch , Swimlanes Fork
Fork
A fork represents the splitting of a single flow of control into two or more A fork represents the splitting of a single flow of control into two or more concur-rentFlow of control. A fork may have one incoming transition and two or more outgoing rentFlow of control. A fork may have one incoming transition and two or more outgoing transi-tions, each of which represents an independent flow of control. Below fork the activities tions, each of which represents an independent flow of control. Below fork the activities
associ-Join Join
A join represents the synchronization of two or more concurrent flows of control. A join A join represents the synchronization of two or more concurrent flows of control. A join may have two or more incoming transition
may have two or more incoming transition and one outgoing transition. Above the join the and one outgoing transition. Above the join the activ- activ-ities associated with each of
ities associated with each of these paths continues in parallel.these paths continues in parallel. Branching
Branching
A branch specifies alternate paths takes based on some Boolean expression Branch is A branch specifies alternate paths takes based on some Boolean expression Branch is represented by diamond Branch may have one incoming transition and two or more outgoing represented by diamond Branch may have one incoming transition and two or more outgoing one on each outgoing transition, you place a Boolean expression shouldn‘t overlap but they one on each outgoing transition, you place a Boolean expression shouldn‘t overlap but they should cover all possibilities.
should cover all possibilities. Swimlane:
Swimlane:
Swimlanes are useful when we model workflows of business processes to partition the Swimlanes are useful when we model workflows of business processes to partition the activity states on an activity diagram into groups. Each group representing the business activity states on an activity diagram into groups. Each group representing the business organi-zation responsible for those activities ,these groups are called Swimlanes .
Activity Diagram for ATM Activity Diagram for ATM
8. COMPONENT DIAGRAM 8. COMPONENT DIAGRAM
Component diagrams are used to model physical aspects of a system. Now the question Component diagrams are used to model physical aspects of a system. Now the question is what are these physical aspects? Physical aspects are the elements like executables, libraries, is what are these physical aspects? Physical aspects are the elements like executables, libraries, files, documents etc which resides in a node. So component diagrams are used to visualize the files, documents etc which resides in a node. So component diagrams are used to visualize the organization and relationships among components in a system. These diagrams are also used to organization and relationships among components in a system. These diagrams are also used to make executable systems.
make executable systems. Purpose:
Purpose:
Component diag
Component diagrams can rams can be described as a stabe described as a static implementation view of a system. Stat-tic implementation view of a system. Stat-ic implementation represents the organization of the components at a partStat-icular moment. A ic implementation represents the organization of the components at a particular moment. A sin-gle component diagram cannot represent the entire system but a collection of diagrams are used gle component diagram cannot represent the entire system but a collection of diagrams are used to represent the whole.
to represent the whole.
Before drawing a component diagram the following artifacts are to be identified clearly: Before drawing a component diagram the following artifacts are to be identified clearly:
Files used in the sFiles used in the system.ystem.
Libraries and other artifacts relevant to Libraries and other artifacts relevant to the application.the application.
Relationships among the artifacts.Relationships among the artifacts.
Now after identifying the artifacts the following points needs to be followed: Now after identifying the artifacts the following points needs to be followed:
Use a meaningful name to identify the component for which the diagram is to Use a meaningful name to identify the component for which the diagram is to be drawn.be drawn.
Prepare a mental layout before producing using tools.Prepare a mental layout before producing using tools.
Use notes for clarifying important points.Use notes for clarifying important points.
Now the usage of component diagrams can be
Now the usage of component diagrams can be described as:described as: 1.
1. Model the components of a sModel the components of a system.ystem. 2.
2. Model database schema.Model database schema. 3.
3. Model executables of an Model executables of an application.application. 4.
4. Model system‘s source code.Model system‘s source code. Contents
Contents
Components, Interfaces, Relationships Components, Interfaces, Relationships
Component Diagram for ATM Component Diagram for ATM
Deployment
PART II PART II
SOFTWARE TESTING SOFTWARE TESTING OBJECTIVES OF THE LAB OBJECTIVES OF THE LAB
1. Testing is a process of executing a program with the intent of
1. Testing is a process of executing a program with the intent of finding an error.finding an error.
2. A good test case is one that has a high probability of finding an as yet undiscovered error. 2. A good test case is one that has a high probability of finding an as yet undiscovered error. 3. A successful test is
3. A successful test is one that uncovers an as one that uncovers an as yet undiscovereyet undiscovered error.d error. REQUIREMENTS
REQUIREMENTS Server Sy
Server System configstem configuration : uration : 128 M128 MB of B of RAM , RAM , 500 MB 500 MB of free of free disk spadisk space, ce, Win NT Win NT server,server, Win 2K server, IIS 5
Win 2K server, IIS 5.0, .0, MSAccess/OracMSAccess/Oracle 7.x,8.x,9/MS SQLle 7.x,8.x,9/MS SQL ServerClient Syste
ServerClient System configuration : 64 MB m configuration : 64 MB of RAM , 10 MB of free of RAM , 10 MB of free disk space, disk space, WinWin 95/98/NT/2K/XP, IE 5 ,
95/98/NT/2K/XP, IE 5 ,
LAB SYLLABUS PROGRAMS (JNTU) LAB SYLLABUS PROGRAMS (JNTU)
Testing Lab List of Experiments
Testing Lab List of Experiments
1.
1. Write programs inWrite programs in „„CC‟‟LanguagLanguage to demonstrate the working of the folle to demonstrate the working of the followingowing
a.
a. constructs: i) do...while ii) whileconstructs: i) do...while ii) while….….do iii) if do iii) if ……else iv) switch v) forelse iv) switch v) for 2.
2. ―A―A program written inprogram written in „„CC‟‟language for Matrix Multiplication failslanguage for Matrix Multiplication fails‖‖ Introspect theIntrospect the
causes for its failure and
causes for its failure and write down the possible reasons for its failure.write down the possible reasons for its failure. 3.
3. Take any system (e.g. ATM system) and study its system specifications and reportTake any system (e.g. ATM system) and study its system specifications and report the various bugs.
the various bugs. 4.
4. Write the test cases for any known application (e.g. Banking application)Write the test cases for any known application (e.g. Banking application) 5.
5. Create a test plan document for any application (e.g. Library Management System)Create a test plan document for any application (e.g. Library Management System) 6.
6. Study of any testing tool (e.g. WStudy of any testing tool (e.g. Win runner)in runner) 7.
7. Study of any web testing tool (e.g. Selenium)Study of any web testing tool (e.g. Selenium) 8.
8. Study of any bug tracking tool (e.g. Bugzilla, bugbit)Study of any bug tracking tool (e.g. Bugzilla, bugbit) 9.
9. Study of any test management tool (e.g. Test Director)Study of any test management tool (e.g. Test Director) 10.
1.
1. Write a „c‟ program to demonstrate the working of the fallowing constructs:Write a „c‟ program to demonstrate the working of the fallowing constructs: i) do…
i) do…while ii) while ii) while…do while…do iii) if iii) if …else …else iv) siv) switch witch vv) for Loops in C language) for Loops in C language //A. AIM: To demonstrate the working of do..while construct
//A. AIM: To demonstrate the working of do..while construct Objective
Objective
To understand the working of do while with different range of values and test cases To understand the working of do while with different range of values and test cases #include <stdio.h> #include <stdio.h> void main (){ void main (){ int i, n=5,j=0; int i, n=5,j=0; clrscr(); clrscr(); printf(―enter printf(―enter a noa no‖);‖); sscanf(―%d‖,&i);canf(―%d‖,&i); do{ do{ if(i%2==0) { if(i%2==0) { printf("%d", i); printf("%d", i);
printf("is a even no."); printf("is a even no."); i++; i++; j++; j++; } } else { else { printf("%d", i); printf("%d", i);
printf("is a odd no.\n"); printf("is a odd no.\n"); i++; i++; j++; j++; } } }while(i>0&&j<n); }while(i>0&&j<n); getch(); getch(); } } Input
Input Actual Actual outputoutput 2
2 2 2 is is even even numbernumber 3 is odd number 3 is odd number 4 is even number 4 is even number 5 is odd number 5 is odd number 6 is even number 6 is even number
Test cases: Test cases: Test case no: 1 Test case no: 1 Test case name
Test case name: Positive values within range: Positive values within range Input
Input =2 =2 Expected output Expected output Actual Actual output output RemarksRemarks 2
2 is is even even number number 2 2 is is even even numbernumber 3
3 is is odd odd number number 3 3 is is odd odd number number successsuccess 4
4 is is even even number number 4 4 is is even even numbernumber 5
5 is is odd odd number number 5 5 is is odd odd numbernumber 6
6 is is even even number number 6 6 is is even even numbernumber Test case no:2
Test case no:2 Test case name:
Test case name: Negative values within a rangeNegative values within a range Input
Input = = -2 -2 Expected Expected output output Actual Actual output output RemarksRemarks -2
-2 is is even even number number -2 -2 is is an an even even numbernumber -3
-3 is is odd odd number number failfail -4 is even number -4 is even number -5 is odd number -5 is odd number -6 is even number -6 is even number Test case no: 3
Test case no: 3 Test case name:
Test case name: Out of range values testingOut of range values testing Input
Input Expected Expected output output Actual Actual output output RemarksRemarks 123456789122
1234567891222222222222 2222222222 123456789122123456789122222222213 222222213 234567891222234567891222222215 222215 failfail //B. Aim:To demonstrate the working of while construct
//B. Aim:To demonstrate the working of while construct
Objective Objective
To understand the working of while with different range of values and test cases To understand the working of while with different range of values and test cases
#include<stdio.h> #include<stdio.h> #include <conio.h> #include <conio.h> void main (){ void main (){ int i, n=5,j=1; int i, n=5,j=1; clrscr(); clrscr(); printf(―enter printf(―enter a noa no‖);‖); sscanf(―%d‖,&i);canf(―%d‖,&i); while (i>0 && j<n){ while (i>0 && j<n){ if(i%2==0){ if(i%2==0){
printf(―%d‖,i); printf(―%d‖,i);
printf(―is a even number‖; printf(―is a even number‖;
i++; i++;