DAIMIHenrik Bærbak Christensen1 Mandatory Project Software Reliability and Testing.

Slides:



Advertisements
Similar presentations
Workshop on Integrated Machine Tool Simulation & Verification April 9-10, 2002 Cypress, California.
Advertisements

OO Programming in Java Objectives for today: Overriding the toString() method Polymorphism & Dynamic Binding Interfaces Packages and Class Path.
Workshop on Integrated Machine Tool Simulation & Verification April 9-10, 2002 Cypress, California.
DAIMIHenrik Bærbak Christensen1 Testability Tactics How to make software testable...
Object-Oriented Analysis and Design
Integration testing Satish Mishra
DAIMIHenrik Bærbak Christensen1 Reliable Software and Architecture Course 1: Reliable Software.
SMM5101 (ADVANCED MULTIMEDIA PROGRAMMING) Review of Multimedia Programming.
Development Processes UML just is a modeling technique, yet for using it we need to know: »what do we model in an analysis model? »what do we model in.
DAIMIHenrik Bærbak Christensen1 Mandatory Project Part II Software Reliability and Testing.
IEG 3080 Tutorial 1 Wilson Ip. Outline Lecture reviews: Some basics of Software Engineering principle Some basics of OOP How to use Visual Studio.NET.
DAIMIHenrik Bærbak Christensen1 SRaT Software Reliability and Testing.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
DAIMIHenrik Bærbak Christensen1 Mandatory Project Exercise New Requirement.
Knowledge is Power Marketing Information System (MIS) determines what information managers need and then gathers, sorts, analyzes, stores, and distributes.
Course Instructor: Aisha Azeem
LÊ QU Ố C HUY ID: QLU OUTLINE  What is data mining ?  Major issues in data mining 2.
Dr. Ken Hoganson, © August 2014 Programming in R STAT8030 Programming in R COURSE NOTES 1: Hoganson Programming Languages.
Table-Driven Acceptance Testing Mario Aquino Principal Software Engineer Object Computing, Inc.
Advanced Java New York University School of Continuing and Professional Studies.
Testing. What is Testing? Definition: exercising a program under controlled conditions and verifying the results Purpose is to detect program defects.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
Winrunner Usage - Best Practices S.A.Christopher.
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
Week 4 Introduction to Computer Science and Object-Oriented Programming COMP 111 George Basham.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Styles.
Lecture 14 & 15: Object- Oriented Analysis Anita S. Malik Adapted from Schach (2004) Chapter 12.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Command. RHS – SOC 2 Executing a command Executing a command appears simple at first, but many details to consider: –Who creates a command? –Who invokes.
Computers and Scientific Thinking David Reed, Creighton University Functions and Libraries 1.
CS160: Interactive Prototype Gary Wu - Jordan Berk - Mike Kendall - Mohammed Ali - Hao Luo.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
© Glenn Rowe AC Lab 3 An adventure game.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (1/2)
The HotCiv GUI Instantiating the MiniDraw Framework.
Test Stubs... getting the world under control. TDD of State Pattern To implement GammaTown requirements I CS, AUHenrik Bærbak Christensen2.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
More on OO Programming Our programs will no longer just be a main method or a main which calls a collection of other methods –instead, a program will be.
Author Ivan Dominic Baguio. ABOUT THE GAME Game Objective  The goal of each player in the game is to discard all cards in his hand before every other.
HotCiv Project Starting up!. Henrik Bærbak Christensen2 HotCiv = Agile development Iterations of –product development –learning increments.
Dillon: CSE470: SYSTEM INTEGRATION 1 Build Plan l Development or integration strategies l Decide the order in which components of the system will be developed.
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
AU CSHenrik Bærbak Christensen1 dSoftArk Software Architecture Programming in the Large.
MiniDraw Introducing a Framework... and a few patterns.
Chapter – 8 Software Tools.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
CSHenrik Bærbak Christensen1 Flexibility and Maintainability And their metrics: coupling and cohesion.
AU CSHenrik Bærbak Christensen1 dSoftArk E2013 Software Architecture Programming in the Large.
 The processes used for RE vary widely depending on the application domain, the people involved and the organisation developing the requirements.  However,
Instantiating the MiniDraw Framework
Introducing a Framework ... and a few patterns
Collision Theory and Logic
Collision Theory and Logic
Designing For Testability
Games Development 2 semester 1 Review & Revision
HotCiv Project Starting up!.
Mandatory 1 / AlphaCiv … Traps to be aware of ….
Chapter 10: Process Implementation with Executable Models
CS190/295 Programming in Python for Life Sciences: Lecture 1
Software Engineering D7032E
LECTURE 3: Requirements Engineering
Software Engineering and Architecture
Presentation transcript:

DAIMIHenrik Bærbak Christensen1 Mandatory Project Software Reliability and Testing

DAIMIHenrik Bærbak Christensen2 Aim To use techniques from the course to –implement a reliable software system –assess system qualities, notably reliability This entails –test case definition using BB and WB techniques –tactics to make the system testable –integration testing and test planning –using review techniques

DAIMIHenrik Bærbak Christensen3 Context SRaT World –A simple Role Playing Game (RPG) inspired by my kid’s pass time: Diablo II and Titan Quest –Architectural driver customizability to support building new RPG’s modularity to support parallel development

DAIMIHenrik Bærbak Christensen4 Customizable property We require that our RPG is highly customizable. For instance it should be able to model both –Diablo II: “Barbarian slay beastmen on the cold plains wearing the FrostBite axe and Holy Shield and gain experience points and a level.” –The EVU Student Trial “Diploma student solves mandatory exercise 1 in SRaT using BlackBox testing and gain intelligence. Next he attacks the SRaT oral exam, wins, and has solved the first quest.”

DAIMIHenrik Bærbak Christensen5 Why? Why does this make a reasonable project? Because –Set of relatively isolated modules all groups do not solve same assignment thus: realistic integration testing scenario thus: force you to implement stubs / testability tactics –Each module/task is relatively small implementation burden not too big complexity not overwhelming for using BB and WB –on the other hand they are larger than System.abs –Review of other groups’ work that have solved similar modules

DAIMIHenrik Bærbak Christensen6 What is a RPG? A Hero –explores worlds –slash enemies –pick up items weapons/armour life potions gold –grows stronger healthier stronger more intelligent learns skills –trades gold and items –solves quests get rid of “bosses” to go to next quest Demo:

DAIMIHenrik Bærbak Christensen7 Architectural considerations Our focus will be on the domain production code –we work in parallel with the GUI team but they are slow –to develop we aim at two interfaces a keystroke driven one –to play around, exploratory testing, debug JUnit driven: systematic testing and reliability estimation –we ignore real-time game play and prototype it using a turn based approach

DAIMIHenrik Bærbak Christensen8 The worlds (area) The areas are simply a matrices of tiles (of various types) Areas are connected by portals – entering a portal and you a instantly teleported to another area... row = 0 col = 3 item (sword) portal hero nasty enemy

DAIMIHenrik Bærbak Christensen9 Key-stroke based interface Vision: –we give commands to our hero using 1-2(-3?) keystrokes Use-case 1 –“a9”: attack enemy at NorthEast tile –“p3”: pickup item at SouthEast tile “m9”: move NorthEast

DAIMIHenrik Bærbak Christensen10 Inventory and worn items A hero wears and carries things that he finds –“ic”: display items carried (inventory) –“iw”: display items worn –“w1”: wear item #1 from inventory (items know that they can be worn, and where they are worn) –“u2”: use item #2 from inventory (items know they can be used) 1: bronze-sword 2: health-potion 3: small-shield head: (none) weapon-hand:heavy-sword shield-hand:(none) torso:small-armour legs:(none)

DAIMIHenrik Bærbak Christensen11 Trading At some tiles (at a trader) you may sell items for gold or buy new items using your gold –“it”: display inventory of trader –“b1”: buy item #1 from trader inventory (if enough gold) –“s3”: sell item #3 from my inventory for gold 1: battle-axe 2: health-potion 3: frostbite-sword

DAIMIHenrik Bærbak Christensen12 Items and attributes Our hero has attributes –primary health, dexterity (behændighed), strength,... –health = 0 => you die and game over... level and experience points gold (cash carried) –items also have attributes weapons: the damage they can inflict requirements: what level, strength, dexterity, etc, is required to wear this weapon/armour? “+”: wearing/carrying certain items boost your dexterity, strength, attack ability, etc. use: using a health-potion increases your health

DAIMIHenrik Bærbak Christensen13 Complex item attributes In Diablo II item attributes can be rather complex Deadly sceptre of flame –damage: 7-13 –required strength: 25 –required level: 3 –+22% enhanced damage –1-5 fire damage –+2 prayer (paladin only) –+50% damage to undead

DAIMIHenrik Bærbak Christensen14 The central tale RPGs are about violently slashing your enemies in an orgy of blood... –(proper entertainment for a 9 year old, sigh...) Attacking: –chance of hitting (hero) –chance of blocking (enemy) –damage by hit  enemy “health” decrease –hero attribute “experience-point” increase experience-point > next-level-threshold  level++ Quests –Slaying the quest’s “boss” and you go on to the next...

DAIMIHenrik Bærbak Christensen15 Architecture

DAIMIHenrik Bærbak Christensen16 Architecture and Design How do we make such a system? Well – it seems really object oriented... We can point on numerous objects with attributes and actions... However, the challenge was to cover all possible RPGs: “Diablo II” and “EVU Student at Aarhus”

DAIMIHenrik Bærbak Christensen17 Approach 1 The standard OO modelling paradigm however fails... class Paladin implements Actor public int dexterity() { return dex; }... } Why?

DAIMIHenrik Bærbak Christensen18 The customizable property The above model seems awkward at best for modelling the “EVU Student Trial” RPG... We need an architecture that is much more flexible and define abstractions at a more abstract level.

DAIMIHenrik Bærbak Christensen19 Buschmann: Reflection pattern The answer is the Reflection pattern (Posa 1 book): Meta modelling = a model of a model Architecture consists of two levels: –Base and Meta Base contains only central abstractions –actor, events, items, game loop (model of model) Meta contains all specifics –attribute sets –events as attribute manipulations and interpretation –= the model itself

DAIMIHenrik Bærbak Christensen20 Base level The base level defines concrete data storage classes with minimal interpretation of variables. All variables are kept in java.util.Map: –(String, value) pairs like (“health”, 84); Advantage: –Attribute set is open-ended and can be defined at will by meta level actor.getAttributes().putInt(“dexterity”,12); Disadvantage: –No compile time checking! –... we have to rely on – well – testing!

DAIMIHenrik Bærbak Christensen21 Code Example: Base Level

DAIMIHenrik Bærbak Christensen22 Meta Level The Meta Level can populate abstractions by reading configuration files.

DAIMIHenrik Bærbak Christensen23 Base Level Events express dynamics Define an Event interface whose execute method takes all possible parameters Implementing classes can by dynamically loaded by the class loader and identified by their name

DAIMIHenrik Bærbak Christensen24 Event: Base

DAIMIHenrik Bærbak Christensen25 Meta The main game loop receives key-stroke that must be translated into events –“a9” = invoke ‘triggeredExecute’ on instance of AttackEvent. Define an “EventBinding” translator –(“a”,AttackEvent.class) –dynamic class loading

DAIMIHenrik Bærbak Christensen26 Roles: Actor Actor (animate object) –has attributes health, dexterity, skills, experience... –has inventory items picked up but not in use –wears items weapons in hands, helmet, armour –has location in area –may perform events Example: Hero, all the different types of enemies Object Actor

DAIMIHenrik Bærbak Christensen27 Role: Area Area –n*m matrix of tiles Example: “The Wastelands” Tile –(knows image file) –has attributes: passable/impassable –has 0-1 Object –has 0-1 Event Example: a wall tile (impassable), a grass tile with a weapon item, a portal with a “portal” event. Area Tile n*m

DAIMIHenrik Bærbak Christensen28 Role: Item Item (inanimate object) –has attributes semantics is defined by events Example: –rusty axe with attack strength 2-4 interpretation defined by attack event –a shield with defence +10% interpretation defined by attack event –life potion with 100% health interpretation defined by use event –dexterity charm with +2 dexterity interpretation defined by attack event (and possibly others) Object Item

DAIMIHenrik Bærbak Christensen29 Role: Event Event: –defines a state change on actors and/or area Example: –attack event reduce health of defender and increase experience of attacker –portal event relocate actor at new position in new area –move event (may) relocate actor at new position in same area (unless new position is impassable) –use event removes item from inventory and increase actor attributes (potion -> health) –pick up event removes item from tile and adds it to actor inventory –wear event removes an item from inventory and adds it to actor wear list (weapon in hand, etc.)

DAIMIHenrik Bærbak Christensen30 Event subtypes TriggeredEvent: –an event triggered by user action Example: –User presses ‘a9’ -> hero attacks enemy NorthEast of him AutomaticEvent: –an event triggered by game loop Example: –an enemy automatically execute “attack event” when the hero is-near. “is-near” = within one tile radius.

DAIMIHenrik Bærbak Christensen31 Status A draft specification will be prepared for Wednesday 7th and published on the web –Will include partial implementation of base layer all interfaces + attribute map code –Example “game specification files” –Learning tests to kickstart

DAIMIHenrik Bærbak Christensen32 Status The spec will be flawed! Use your testing techniques to discover the ambiguities and defects in the spec ! Report them on the discussion forum (AULA) Read the forum + web site regularly to adjust to specification revisions.