HotCiv Project Starting up!.

Slides:



Advertisements
Similar presentations
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 4.0.
Advertisements

Software Testing and Quality Assurance
JUnit. What is unit testing? A unit is the smallest testable part of an application. A unit test automatically verifies the correctness of the unit. There.
JUnit. Why is testing good? Due to psychological factors, programmers are bad testers. A computer can test much faster than a human Philosophy: “If it.
Scite Scintilla integrated text editor. Click here.
Design: Coupling and Cohesion How to write classes in a way that they are easily understandable, maintainable and reusable.
Make Sure You Know All This!. Objects First with Java - A Practical Introduction using BlueJ, © David J. Barnes, Michael Kölling 2 Objects and Classes.
Russell Taylor Lecturer in Computing & Business Studies.
Starting Chapter 4 Starting. 1 Course Outline* Covered in first half until Dr. Li takes over. JAVA and OO: Review what is Object Oriented Programming.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 3.0.
October, 2006 © Copyright 2006, Larry A. Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is preserved.
Designing classes How to write classes in a way that they are easily understandable, maintainable and reusable 5.0.
Automated Acceptance Testing and Continuous Delivery Larry Apke Agile Expert
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.
Henrik Bærbak Christensen1 Test Driven Development “TDD” Summary.
Henrik Bærbak Christensen1 Build Management Clean environment that works...
HotCiv Project Starting up!. Henrik Bærbak Christensen2 HotCiv = Agile development Iterations of –product development –learning increments.
AU CSHenrik Bærbak Christensen1 dSoftArk E2015 Software Architecture Programming in the Large.
Deriving State…...and an example of combining behaviour.
All the dSoftArk Tools Getting started!. Tools dSoftArk is a semi-realistic, agile, development project –Industrial strength software (programming, TDD,
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
1 COS 260 DAY 12 Tony Gauvin. 2 Agenda Questions? 5 th Mini quiz –Chapter 5 40 min Assignment 3 Due Assignment 4 will be posted later (next week) –If.
Hints - Mandatory 2 / Strategies. Learning... life-a-curve.html B Christensen2 Jeg fatter ikke.
Mandatory 1 / AlphaCiv … Traps to be aware of …. Warn or not? I once asked Kent Beck the following –I have a lot of students in a course in design patterns.
Applying the Principles Two Examples. Example 1 New Requirement It would be nice with a simple GUI “to see something” instead of just xUnit tests...
Refactoring and Integration Testing or Strategy, introduced reliably by TDD The power of automated tests.
AU CSHenrik Bærbak Christensen1 dSoftArk Software Architecture Programming in the Large.
MiniDraw Introducing a Framework... and a few patterns.
Test Driven Development Introduction Issued date: 8/29/2007 Author: Nguyen Phuc Hai.
Mandatory 2 / Strategies Note: I publish this presentation at the week plan for week 4.
Mandatory 1 / AlphaCiv … a few comments…. Overall: Generally – good work – good effort Seems you are generally doing TDD Minor hick-ups –”My own way is.
: Information Retrieval อาจารย์ ธีภากรณ์ นฤมาณนลิณี
Mandatory 3 Test Stubs State Abstract Factory. Do not panic! dSoftArk is about Good analyzable design not about HotCiv! Henrik Bærbak Christensen2.
Hints - Mandatory 5 Blackbox Testing Pattern Hunting.
Findbugs Tin Bui-Huy September, Content What is bug? What is bug? What is Findbugs? What is Findbugs? How to use Findbugs? How to use Findbugs?
TDD Unit tests from a slightly different point of view Katie Dwyer.
Instantiating the MiniDraw Framework
ICS143a 2017 Programming Assignment
Introducing a Framework ... and a few patterns
SE-1021 Software Engineering II
Unit Testing.
Chapter - 8 Implementation.
Applying the Principles
Eclipse Navigation & Usage.
Lecture 7 Designing Classes
Mandatory 1 / AlphaCiv … Traps to be aware of ….
CPSC 315 – Programming Studio Spring 2012
CS1101 : Using Course Marker
Output window toolbars
slides borrowed and adapted from Alex Mariakis and CSE 390a
Portability CPSC 315 – Programming Studio
Test-driven development (TDD)
Testing and Test-Driven Development CSC 4700 Software Engineering
Sharing the good, the bad, the ugly & What can we do about it?
Test Driven Development
Testing Acknowledgement: Original slides by Jory Denny.
Paper Submission Process
Test Driven Development
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Software Engineering and Architecture
Presentation transcript:

HotCiv Project Starting up!

HotCiv = Agile development Iterations of product development learning increments Henrik Bærbak Christensen

Henrik Bærbak Christensen Getting Started Read Chapter 36.1 + 36.2 Download hotciv-tdd-start.zip and unzip it! Read the java file: Game.java Source code your variant is already initially package’ified hotciv.framework etc. packages split into a production code and test code source tree your variant is already fully Ant’ified ‘ant test’ and ‘ant test.batch’ runs out-of-the-box Output is in files in folder TEST-RESULT Henrik Bærbak Christensen

Henrik Bærbak Christensen [Demo] Henrik Bærbak Christensen

Henrik Bærbak Christensen Iteration 1 Implement AlphaCiv using TDD! Henrik Bærbak Christensen

... And report on process (=skills) Using screen casts Henrik Bærbak Christensen

Henrik Bærbak Christensen ... The checklist Refer to the ”rubrics” to see what I deem important... Henrik Bærbak Christensen

Henrik Bærbak Christensen The Agile backlog... This is an architecture course! Clean code that works (75% clean > 100% unclean!) You may fill in more behaviour in following iterations... Henrik Bærbak Christensen

Henrik Bærbak Christensen ... And hand it in... ... Using course admin and/or video services Vimeo / you tube / use private links Some files Reports in pdf format Links to video files or upload it Code in zip with ALL code TA should ”unzip; ant test.batch;” and it should work... If not – the delivery is failed... Henrik Bærbak Christensen

Henrik Bærbak Christensen ... In details... Henrik Bærbak Christensen

Henrik Bærbak Christensen … at the code level This boils down to implementing relevant methods for the Game interface: Henrik Bærbak Christensen

Structure (static view) Henrik Bærbak Christensen

Henrik Bærbak Christensen Dynamics Generally, consider that the GUI only mutate the game’s state by using the Game’s mutator methods endOfTurn, moveUnit, etc. And only inspect it using either Game accessor methods or the “read-only” interfaces getTileAt(p), getCityAt(p), getPlayerInTurn(), … Unit, Tile, City’s methods… Henrik Bærbak Christensen

Henrik Bærbak Christensen Some Design Decisions Keep interfaces intact! Otherwise the GUI will have trouble interfacing your HotCiv Read-only interfaces (Unit, City, …) You should Avoid to add mutator methods to the interfaces! Add mutator methods to StandardX Will require quite a bit of casting String base types Enumerations would give better reliability (compiler check) but would delimit future variants ability to add more e.g. more unit types. Preconditions Many game methods require e.g. valid positions. This means you should not make tests for invalid positions! Henrik Bærbak Christensen

Henrik Bærbak Christensen Some Design Decisions No World abstraction? My TDD did not need it so far! Simplicity-the art of maximizing the work not done! Introduce it if you find your code maintainability improves. Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD TDD is about being ’lazy’ Do not code in anticipation of need, only when need arise! Simplicity – maximize work not done! Morale: Make it as simple as possible!!! Code as little as possible!!! Translate the specs into minimal set of test cases. Make the test cases drive the minimal amount of code. Do not design the swiss army knife Make the code clean!!! Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD Experience from earlier years Test list is a test list ‘setup world’ = feature; not a test ‘red has city at (1,1)’ = test; not a feature morale: write test lists, not feature lists Thinking implementation is bad… think “how does my test case look”; not “how do I implement this” Thinking too much ahead do not foresee problems that never arise pick “one step tests” be prepared for ‘do over’ Henrik Bærbak Christensen

Henrik Bærbak Christensen Doing TDD You have to constantly refactor to make your code clean and abstract students tend to forget => junk pile of special cases  Fix your broken windows Or the building will become unattractive... The total cost of owning a mess Henrik Bærbak Christensen

Help to ‘score’ your tests... Code coverage How much of your production code is exercised by your tests? ‘ant coverage’ (only if tests pass!) Jacoco/report/index.html Henrik Bærbak Christensen