Unit I/UML/MCA/NIEVenkata Ratnam K1 Introducing the UML and UML Diagrams.
Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team...
Transcript of Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team...
![Page 1: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/1.jpg)
Reviewing UML as Part of the Project Team
Software Futures Ltd2 Waterloo WayBredon p +44 (0) 1684 772 691Tewkesbury f +44 (0) 1684 772 639Glos. e [email protected] GL20 7NA w www.softwarefutures.ltd.ukGB
![Page 2: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/2.jpg)
Slide: 2
Topics
Why review UML?How to review UML?Experiences and lessons learnt.
![Page 3: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/3.jpg)
Slide: 3
Why review UML?
We know reviewing is good thing.UML is new and we have much to learn.Adopting UML creates new risks.Reviewing gets us working early with the analysts.
![Page 4: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/4.jpg)
Slide: 4
Unified Modelling Language
The UML 1.4 specification is over 550 pages long.Four layer metamodelling architecture.Judgements:
Which models do we use and where?What rules and standards do we need?Where do we get the wisdom from?#eat() : String
+chase mouse() : int+lose life() : int
+lives : int = 9Cat
+chase Jerry()+lives : int = 4
Tom : Cat
-sleep()+wake up()#eat() : String+get colour() : String+chase()
-sex : char#colour : String
Mammal
+chase cat() : int+bark()
+bark : StringDog
-chase Tom()+teach Junior()+bark() : Spike : Dog
+bark : String = LoudSpike : Dog
Client
Proxy An object
Message1()
Message2()
Message3()
Lane 2 - clean bowlLane 1 - Open Tin
Clean cat's bowl
Fill bowl
selectcat food
Open Tuna and Haddock Open Scottish Salmon
entry/ broadcast messagedo/ disable off-market
exit/ broadcast messageAnevent/ none
System not trading
entry/ broadcast tomembers
do/ enable all off-marketexit/ broadcast to membersAnevent/ market end time
System trading
entry/ broadcast tomembers
do/ enable enter offerexit/ broadcast to membersAnevent/ trading activation
time
System pre-marketMarket activation time
reached
Trad
ing
time
reac
hed
entry/ broadcast messagedo/ freeze all transactionsexit/ unfreeze transactionsand broadcast message
Anevent/ none
System suspended
Abnormal tradingactivity
Trading behaviournormal
Market end time
: Portfolio
customer
: Account : Cash Dispenser : Printer
2: getAccount()
6: dispenseMoney()
3: withdrawMoney()
5: dispenseMoney()
7: printReceipt()
1: withdrawCash()
4: getAmount()
:Customer
:Portfolio
:Cash Dispenser :Account :Printer
1:withdrawMoney()
2: getAccount()
3:withdrawMoney()4:getAmount()
5: dispenseMoney()
6: dispenseMoney()
7: printReceipt()
ContractAdmin
MarketControl
Watch Market
Trade Off-market
Enter offer
Respond tooffer
Counter offer
Reject offer
Delete offer
Accept offer
Contractadministrator
Systemsupervisor
Market watch
Trader uses
extends
extends
extendsexte
nds
extends
extends
![Page 5: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/5.jpg)
Slide: 5
UML Testing
Read and understand UML.Identify good from bad UML.Use it to design effective tests.Use it to document tests.Judgements are the real challenge.
![Page 6: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/6.jpg)
Slide: 6
Model-based development
For functional behaviour.Use Case model – user requirements and analysis.Class diagram – class specifications & relationships.Sequence diagram – time-based communication.Collaboration diagram – messaging between objects.Statechart diagram – states and events of objects.Activity diagram – actions, links and control flow.Component diagram – software components for building.Deployment/package diagrams – distribution architecture.
![Page 7: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/7.jpg)
Slide: 7
Risk and UML
Is UML a risk in itself?yes if not managed properly.like any technology it depends on the people.
![Page 8: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/8.jpg)
Slide: 8
Risk and UML
How does UML reduce risks of error?models many forms of behaviour.can check between models.consistency through the lifecycle.tools supported processes.supports incremental/iterative development.
How does UML increase risks?Will not make poor analysts good ones.Will not cure project or test management problems.
![Page 9: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/9.jpg)
Slide: 9
How to review UML?
Do not second guess the analysts.Develop testability criteria with their assistance.
![Page 10: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/10.jpg)
Slide: 10
Defining testability
Robert Binder (Testing Object Oriented Systems (2000)).
allows automatic generation of test cases.models all features to be tested.preserved detail essential for revealing faults and demonstrating conformance.represents all actions.defines state so that state checking can be automated.
![Page 11: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/11.jpg)
Slide: 11
Defining testability
ISO 9126.Testability is a set of attributes for assessing the amount of design and implemented autonomous test aid functions present in the software product.
![Page 12: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/12.jpg)
Slide: 12
Testability review criteria
Is the diagram understandable with syntactic and semantic conformance to UML? Does the diagram represent all the behaviours and properties in the user requirements? Are other diagrams needed?
![Page 13: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/13.jpg)
Slide: 13
Testability review criteria
Do the models contain any properties that make testing unnecessarily difficult or impossible?The model should adhere to design heuristics and exceptions should be documented.Non-functional objectives should not be overlooked.
![Page 14: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/14.jpg)
Slide: 14
Testability review criteria
Are the models logically consistent with each other?
![Page 15: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/15.jpg)
Slide: 15
What is a heuristic?
It is a rule or guide we learn from experience or by deduction.A heuristic is a little bit of wisdom.Heuristics can be broken.
we identify when we do this.we know why we do this.
How to apply heuristics and testability criteria?
![Page 16: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/16.jpg)
Slide: 16
Simple Use Case model
Customer
DoShopping
BrowseGoods
ExamineItemSelectItem
ReplaceItem
BuyGoods
«uses»«include»
«extends»
«extends»
«extends»
«extends»
AskForHelp
«extends»Complain
«extends» CheckoutAssitant
CheckOut
«uses»«include»
WeighGoods
«extends»
ScanFailure
«extends»
«extend»
«extend»
«extend»
«extend»
«extend»
«extend»
«extend»
«extend»
![Page 17: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/17.jpg)
Slide: 17
But how well is it designed?
Use Case model.Decomposition into Use Cases, size, complexity and detail. .Relationships between Use Cases, extend and include, control flow complexity.
Poorly design is a major threat.Poor functional cohesion.Overly complex relationships.Contains design/implementation detail.
![Page 18: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/18.jpg)
Slide: 18
Applying cohesion rulesProblems to look for:
Monolithic Use CasesUse Cases that are “small” verbsToo many Use CasesController Use CasesImbalance of abstractionAttribute-based Use CasesIncorrect relationshipsUnstable, non-extensibleActors that are passive
Observations:too much behaviour in one placesingle piece of behaviourlack of abstractionbehaviour is “used”analysis/design cross-overnot function-baseduses and extends confusedbad assumptionsdo not trigger behaviour
![Page 19: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/19.jpg)
Slide: 19
Experiences of reviewing UML
The outsourced Use Case modelling.Analysts highly error-prone.Very poor processing flows.No use of Activity diagrams.
In-house trading system.Good Use Cases.Much state behaviour implied but no Statecharts.Complex data needed better modelling.
![Page 20: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/20.jpg)
Slide: 20
More experiences
The curious processing flows.Primary flow contained no decisions.Every decision, however small, documented in its own table.Extremely difficult to follow control flows.
Other lessons……..
![Page 21: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/21.jpg)
Slide: 21
ISO 9126 Quality Characteristics
Maintainability.Analysability.Changeability.Stability.Testability.
Portability.Adaptability.Installability.Co-existence.Replaceability.
ReliabilityMaturityFault toleranceRecoverability
UsabilityUnderstandabilityLearnabilityOperabilityAttractiveness
EfficiencyTime behaviourResource utilisation
![Page 22: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/22.jpg)
Slide: 22
Implications for Testing
UML is a very rich language and can lead to very rich, indigestible test situations. It can lead to complex class structures with complex dynamic behaviour.UML does not reduce the need for testing. It creates a wide range of new and at times subtle errors if the rules are broken, or UML is misapplied or incomplete.
![Page 23: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/23.jpg)
Slide: 23
Implications for Testing
The first step is to make sure the rules are not broken; the purpose of reviews.We have to apply existing, traditional, methods as well develop new ones.Above all testers need to adopt a strategy dependent on the way the developers will design and build an application.
![Page 24: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/24.jpg)
Slide: 24
Implications for Testing - reviews
Effective providing well done.Planned and managed.Use and develop UML heuristics and checklists.Involve developers, analysts and users as well as testers.Review as early as practical.
![Page 25: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/25.jpg)
Slide: 25
Implications for Testing - reviews
Consider use of an Oracle.Review incrementally.Phase in starting with key documents.Select appropriate review technique and formality/ceremony.Avoid the A-Z trap; running out of time halfway through.
![Page 26: Reviewing UML as Part of the Project Team€¦ · Reviewing UML as Part of the Project Team Software Futures Ltd 2 Waterloo Way Bredon p +44 (0) 1684 772 691 Tewkesbury f +44 (0)](https://reader036.fdocuments.us/reader036/viewer/2022071102/5fdbb2132cc908192b5b7205/html5/thumbnails/26.jpg)