software engineering 2 (swt2) - hasso plattner...

55
Software Engineering 2 (SWT2) Chapter 5: Getting you ready for the project - Lego Scrum Exercise, Git, Infrastructure, your next week, Testing, PO presentation -

Upload: others

Post on 18-Oct-2019

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Software Engineering 2 (SWT2)

Chapter 5: Getting you ready for the project

- Lego Scrum Exercise, Git, Infrastructure, your next week, Testing, PO presentation -

Page 2: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

2

Page 3: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Goal of the exercise

□  recap all Scrum meetings

□  Practice for next weeks

■  Background: {Hasso|Larry} bought an lonesome island

■  Your task: develop the island for tourism

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

3

Page 4: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Ingredients

□  A0 map

□  Lots of Lego

□  Post It’s ■  Timeboxed activities (3x)

□  Planning (5min)

□  Conduct sprint (10min)

□  Review (3min)

□  Retrospective (2min)

■  I like, I wish (in team) ■  I like, I wish (in group)

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

4

Page 5: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Planning

□  PO presents User Story (we prepared some)

□  Design session / Task break down

□  Estimation

□  Time left? Next Story

■  Conduct sprint

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

5

Page 6: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Review

□  Team presents User Story results

□  PO accepts/rejects ■  Retrospective

□  What can be improved?

□  Process adjustments?

□  How do you feel?

□  ...

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

6

Page 7: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

7

Page 8: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  POs are encouraged to

□  adjust User Stories

□  remove/add User Stories

□  refine User Stories

■  SMs

□  keep track of estimations

□  keep track of time

□  oversee Scrum process

□  moderate meetings

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

8

Page 9: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Group Hasso

□  Lego now!

□  5 teams (three are split up [G2, H2 & W2])

□  HS1 + Foyer

■  Group Larry

□  Lego at 1:30pm

□  5 teams (three are split up [D1, M1 & M2])

□  HS1 + Foyer

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

9

Page 10: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

10

Page 11: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Git

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

11

Page 12: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

12

Page 13: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Email

■  Mailing lists

□  [email protected]

□  swt2_2010_hasso, swt2_2010_hasso_{po|sm}

□  swt2_2010_larry, swt2_2010_larry_{po|sm} □  swt2_2010_{b1|d1|d2|g1|g2|h1|h2|m1|m2|

n1|n2|p1|w1|w2|hp1|hp2}

□  Keep your teammates in the loop

□  Rules / filters are your friend

■  Anonymous email address: [email protected]

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

13

Page 14: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Time Management

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

Google Calendar

■  Advantages:

□  Available Everywhere □  Easy Integration with Outlook & iCal

(see “Useful Links” in Wiki)

■  Overview of team appointments

■  Access granted by tutors

14

Page 15: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Continuous Integration

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

■  Problem: How to check continously that your software works?

■  Solution: Continuous Integration (CI) Server   Connected to version control   Customizable run scripts   Ideally covering all development branches   Checkout prepare environment run tests run statistics   Examples: CruiseControl, Anthill   Our system: Hudson (http://hudson-ci.org/)   http://ares.epic.hpi.uni-potsdam.de/swt2-ci/

  Deployment to:   Hasso: http://192.168.30.90:10080   Larry: http://192.168.30.90:11080

15

Page 16: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Application Lifecycle Management

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

■  Integrating tools for most common activities in one place

■  Wiki, Bug Tracking, Time Management, Project Analytics, …

■  Some examples: MS Team Foundation Server, Codebeamer, Plan.io

■  Wiki + tracker

□  Track + Agilo plugin Agilo (http://www.agile42.com)

□  http://ares.epic.hpi.uni-potsdam.de/swt2-agilo/{hasso|larry}/

16

Page 17: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

17

Page 18: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Application Stub

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

18

Page 19: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Application Stub

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

19

Page 20: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Application Stub

■  (Almost) no models, controllers, or views given

■  Basic UI and navigation concept is given

■  IT Systems Engineering != UI Designer

■  Share re-usable code in helpers SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

20

Page 21: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

21

Page 22: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Your next week in a nutshell

■  Project start

■  Planning meeting (SM moderates)

□  PO & teams agree on sprint goal

□  Team capacity is estimated □  PO presents 1st user story from his product backlog

□  Team writes down tasks

□  Task sizes are estimated

□  Capacity left?

□  Done

■  Architecture / coordination meeting(s)

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

yes

22

Page 23: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

23

Page 24: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Introduction into Testing in Rails

■  Test-driven Design

□  Design and documentation practice

□  Writing tests before writing code 1.  Write test 2.  See test fail 3.  Write simplest solution 4.  See test pass 5.  Refactor 6.  See test pass, GoTo 1

□  Red/green/refactor

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

24

Page 25: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Introduction into Testing in Rails

■  TDD tends to depend on implementation specifics

■  BDD tries to describe the behavior of the code under test

■  The same is true at application level

■  Warning:

□  You do not know what the application should do?

□  do not apply TDD / BDD

□  Instead: do a spike (proof of concept) □  Throw the code away afterwards

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

25

Page 26: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

RSpec

■  “Write executable examples of the expected behavior of a small bit of code in a controlled context”

describe UserList !

do context "when first created" do!

it "is empty" do !

user_list = UserList.new!

user_list.should be_empty!

end!

end!

end!

■  When run in a shell:

UserList when first created

is empty

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

26

[Chelimsky et al.: The Rspec Book, 2010]

Page 27: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

BDD cycle

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

27

[Chelimsky et al.: The Rspec Book, 2010]

Page 28: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

BDD cycle

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

28

[Chelimsky et al.: The Rspec Book, 2010]

Page 29: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Directory Comparison

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

29

Page 30: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Cucumber

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

30

Page 31: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Implementing Cucumber Steps

■  rake cucumber FEATURE=features/add_author.feature

Scenario: Add a simple author!

Given I am on the authors page!

When I follow "Add author"!

And I fill in the example author!

And I press "Save"!

Then I should be on the authors page!

And there should be the example author!

And no error should occur!

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

31

Page 32: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Implementing Cucumber Steps

Scenario: Add a simple author # features/add_author.feature:8

Given I am on the authors page # features/step_definitions/web_steps.rb:19

When I follow "Add author" # features/step_definitions/web_steps.rb:33

And I fill in the example author # features/step_definitions/standard_entries.rb:47

And I press "Save" # features/step_definitions/web_steps.rb:27

Then I should be on the authors page # features/step_definitions/web_steps.rb:195

And there should be the example author # features/step_definitions/standard_entries.rb:69

And no error should occur # features/add_author.feature:15

Undefined step: "no error should occur" (Cucumber::Undefined)

features/add_author.feature:15:in `And no error should occur'

1 scenario (1 undefined), 7 steps (1 undefined, 6 passed), 0m0.282s

You can implement step definitions for undefined steps with these snippets:

Then /^no error should occur$/ do

pending # express the regexp above with the code you wish you had

end SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

32

Page 33: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Implementing Cucumber Steps

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

33

Page 34: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Implementing Cucumber Steps

Feature: Add author

In order to add an author

As a user

I want to enter the details into a form and confirm

Then the author should be in the database

And I should be taken back to the authors index page

Scenario: Add a simple author # features/add_author.feature:8

Given I am on the authors page # features/step_definitions/web_steps.rb:19

When I follow "Add author" # features/step_definitions/web_steps.rb:33

And I fill in the example author # features/step_definitions/standard_entries.rb:47

And I press "Save" # features/step_definitions/web_steps.rb:27

Then I should be on the authors page # features/step_definitions/web_steps.rb:195

And there should be the example author # features/step_definitions/standard_entries.rb:69

And no error should occur # features/step_definitions/my_steps.rb:1

1 scenario (1 passed), 7 steps (7 passed), 0m0.213s

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

34

Page 35: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

RSpec

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

35

Page 36: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Hello RSpec

describe "RSpec Greeter" do!

it "should say 'Hello RSpec!' when it receives the greet() message" do!

greeter = RSpecGreeter.new!

greeting = greeter.greet!

greeting.should == "Hello RSpec!"!

end!

end!

■  Given – When – Then ■  rake spec:models

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

36

Page 37: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Hello RSpec

JM:swt2_10_exercise juergen$ rake spec:models

(in /.../2010_WS_SWT2/vl2_exercise/swt2_10_exercise)

F

Failures:

1) RSpec Greeter should say 'Hello RSpec!' when it receives the greet() message

Failure/Error: greeter = RSpecGreeter.new

uninitialized constant RSpecGreeter

# ./spec/models/hello_spec.rb:5

Finished in 0.3104 seconds, 1 example, 1 failure

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

37

Page 38: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Hello RSpec

require 'spec_helper'!

class RSpecGreeter!

def greet!

"Hello RSpec!"!

end!

end!

describe "RSpec Greeter" do!

it "should say 'Hello RSpec!' when it receives the greet() message" do!

greeter = RSpecGreeter.new!

greeting = greeter.greet!

greeting.should == "Hello RSpec!"!

end!

end!

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

38

Page 39: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Hello RSpec

JM:swt2_10_exercise juergen$ rake spec:models

(in /.../2010_WS_SWT2/vl2_exercise/swt2_10_exercise)

.

Finished in 0.65165 seconds, 1 example, 0 failures

JM:swt2_10_exercise juergen$ bundle exec rspec spec/models/hello_spec.rb --format d

RSpec Greeter

should say 'Hello RSpec!' when it receives the greet() message

Finished in 0.44836 seconds, 1 example, 0 failures

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

39

Page 40: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Further Information on RSpec

■  Next lectures ■  http://rspec.info/documentation/ ■  http://rspec.info/rails/writing/models.html

■  @user.should_not be_valid ■  @user.should have(1).error_on

(:username) ■  @user.should be_valid

■  target.should satisfy {|arg| ...} ■  target.should_not satisfy {|arg| ...} ■  target.should equal <value> ■  target.should not_equal <value> ■  target.should be_close <value>,

<tolerance> ■  target.should_not be_close <value>,

<tolerance> ■  target.should be <value> ■  target.should_not be <value> ■  target.should be < 6

■  target.should == 5 ■  target.should_not == 'Samantha’ ■  target.should match <regex> ■  target.should_not match <regex> ■  target.should be_an_instance_of <class> ■  target.should_not be_an_instance_of

<class> ■  target.should be_a_kind_of <class> ■  target.should_not be_a_kind_of <class> ■  target.should respond_to <symbol> ■  target.should_not respond_to <symbol> ■  target.should have(<number>).things ■  target.should have_at_least

(<number>).things ■  target.should have_at_most

(<number>).things ■  target.should have(<number>).errors_on

(:field)

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

40

Page 41: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

41

Page 42: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Outlook

■  TDD

■  BDD

■  Testing in Rails

□  Unit::Test □  RSpec

□  Cucumber

□  Test doubles

□  Factories

□  …

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

42

Page 43: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Agenda

■  Lego Scrum Exercise

■  Git

■  Project Infrastructure

■  Application Stub ■  Your next week in a nutshell

■  Introduction into Testing in Rails

■  Outlook

■  PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

43

Page 44: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

PO Presentation

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

44

Page 45: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Thank you for your attention!

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

Page 46: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Backup

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

Page 47: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Lego Scrum Exercise

■  Exercise should take place in positive atmosphere ■  POs really should adopt the given User Stories (except in Sprint 1) ■  If no questions by team occur during sprint,

something might be wrong ■  PO should not accept any solution (acceptance criteria has

to be met) ■  If same acceptance criteria is repeated over and over, a “Definition of Done”

might be introduced (probably with the “Street” User Story ■  Scrum Master should moderate meetings ■  Meetings have a fixed end (timeboxed)

□  At the end of a meeting, the group can decide to add a few more minutes □  BUT, it is not allowed to just overrun the meeting end!

■  The retrospective is a unique opportunity for team learning ■  Teams should vary their process – they can work alone, in teams of 2, 3, 4, ... ■  Make sure to capture the ideas, problems, etc. that come up during this

exercise – might they come up in the Software project as well?

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

47

Page 48: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Practical Examples

■  RSpec Buch ab S. 61

■  RSpec Buch bis S. 200

■  UNIT::TEST im TestReceipes Buch ist auch gut (bspw. bis S. 101)

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

48

Page 49: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Fixtures

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

49

Page 50: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Fixtures, 1:n relationship

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

50

Page 51: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Fixtures, n:m relationship

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

51

Page 52: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Fixtures

■  In spec_helper: fixtures:all!

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

52

Page 53: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Test Run

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

53

Page 54: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Setup and Teardown

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

54

Page 55: Software Engineering 2 (SWT2) - Hasso Plattner Institutehpi.de/.../SoftwaretechnikII/2010/SWT2_10_05_Lego_Exercise_etc.pdfSoftware Engineering 2 (SWT2) Chapter 5: Getting you ready

Setup and Teardown

SWT2 | Chapter 5: Getting you ready for the project | WS2010/2011

55