Software Engineering 2 (SWT2)

Similar documents
Next Weeks Schedule. Week 1 (Oct 17 Oct 21) Introduction lectures. Week 3 (Oct 31 Nov 4) POs: Customer meeting Work on exercise

Software Engineering II

Software Engineering II Introduction and Organization

Daniel Lynn Lukas Klose. Technical Practices Refresher

Lecture 3. Miscellaneous Ruby and Testing 1 / 40

Agile Behaviour Driven Development (BDD) and Integrated Testing with the Cucumber Framework. Melbourne ANZTB SIGIST, 15 th June 2011

Tips and Tricks. Arian Treffer Software Engineering II WS 2016/17

Branching and Merging

String Calculator TDD Kata

Software Engineering 2 (SWT2) Chapter 7: BDD, and Testing (in Rails)

Intermediate Cucumber. CSCI 5828: Foundations of Software Engineering Lecture 17 03/13/2012

Lecture 3. Miscellaneous Ruby and Testing

Building in Quality: The Beauty of Behavior Driven Development (BDD) Larry Apke - Agile Coach

Lecture 3. Miscellaneous Ruby and Testing 1 / 48

Inverting the Pyramid

How technical excellence helps in LeSS adoption. Anton Bevzuk Dodo Pizza Chief Agile Officer

CONFERENCE PROCEEDINGS QUALITY CONFERENCE. Conference Paper Excerpt from the 28TH ANNUAL SOFTWARE. October 18th 19th, 2010

Software Testing Prof. Meenakshi D Souza Department of Computer Science and Engineering International Institute of Information Technology, Bangalore

Defining Project Requirements

Shift Left, Automation, and Other Smart Strategies for Getting Ahead in QA

AgileBill Krebs. Agile3d Academy. Enterprise Open Distributed. Agile Quality. Years 30 Books 240. Certs 8. Badges 6. O, Rq, Pm, Qa, Ns, Agile 01

MTAT Agile Software Development

LESSONS LEARNED: BEING AGILE IN THE WATERFALL SANDBOX

Utilizing Fast Testing to Transform Java Development into an Agile, Quick Release, Low Risk Process

Online Appointment Booking System

Designed in collaboration with Infosys Limited

Behavior Driven Development (BDD) By Nabeel Ibrahim

GETTING STARTED. Introduction to Backlog Grooming

Lab 08. Command Line and Git

Application Deployment. Softwaretechnik II 2012/13 Thomas Kowark

Better late than never

Kanban In a Nutshell. Bob Galen President & Principal Consultant RGCG, LLC

Anders Fröberg TDDD80 STORAGE AND TESTING

Project Plan. SISCalendar. for. Prepared by Zach Masiello. Ethan Mick Michael Caputo Shawn Thompson Organization: SIS.io

Automated Testing of Tableau Dashboards

Agile Test Automation ICAgile

Microsoft. Recertification for MCSD: Application Lifecycle Management

Chapter 11, Testing, Part 2: Integration and System Testing

CollabNet TeamForge 5.3 Evaluator s Guide

Optimize tomorrow today.

Software Project (Lecture 4): Git & Github

Development with Scrum

DAVIS SYSTEMS

Behaviour Driven Development with Java. Nikolay Vasilev 15 July 2011

Development Processes Agile Adaptive Planning. Stefan Sobek

Technology Background Development environment, Skeleton and Libraries

Collaboration at Scale: Prioritizing a Backlog. 13-Dec-2017

<Insert Picture Here> CxP Design Sprint

Treating Deployments as Code with Puppet and the Atlassian Toolsuite Puppet Camp, Geneva

Making Test Automation Work in Agile Projects

Building In Quality. Ten Years Later

Scrums effects on software maintainability and usability

RSPec Documentation. 4. Scenario Testing Examples of OAR REST APIs using Rspec

Exam Questions

Sage CRM 2018 R1 Release Notes. Updated: November 2017

Review Version Control Concepts

Testing in an Agile Environment Understanding Testing role and techniques in an Agile development environment. Just enough, just in time!

Software Quality in a Modern Development Team. Presented by Timothy Bauguess and Marty Lewis

CS 320 Introduction to Software Engineering Spring February 06, 2017

Completely

Seven Deadly Sins of Agile Testing

Software Engineering I (02161)

Beta Book. Thank you for being part of the Pragmatic community! Andy & Dave. Agile publishing for agile developers

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Agile Accessibility. Presenters: Ensuring accessibility throughout the Agile development process

JBehave Code Generator Manual. Contents: 1) Introduction & Installation 2) Why we need Code Generator. 3) How to generate code with example.

Efficient Test Automation on an Agile Project

Test Driven Development. René Barto SES Agile Development - Test Driven Development

STLCC Print Shop. user guide version 2.0

JetBrains YouTrack Comparison

Clean Slate: Create a Complete Dashboard of Your Work. Zachary Sexton

Software Design Models, Tools & Processes. Lecture 6: Transition Phase Cecilia Mascolo

Final Report: Faculty Progress Report System Team Deadpool

Agile, Testing, and Quality: Looking Back, Moving Forward

A few more things about Agile and SE. Could help in interviews, but don t try to bluff your way through

CASE STUDY TELECOMS. Calvi - two years with no database-related bugs

Agile vs Fragile. Susmit Bhattacharya, Solution Architect, Asia Pacific. - The need for Automation in Agile Tricentis GmbH. All Rights Reserved.

Day 6: 24/May/2012. TDD (Test Driven Development)

By Camille Spruill SPC4, SA, CSM, PMP, CBAP. Raleigh Business Analysis Development Day (RBADD) October 18 th, 2016

Agile Testing Course: 15 16/11

Dealing with Bugs. Kenneth M. Anderson University of Colorado, Boulder CSCI 5828 Lecture 27 04/21/2009

Unit Testing J2EE from JRuby. Evan Light

Sprint Review. DesignOps / October 11, Sprint 2 Sprint Dates: 9/28/2017 to 10/11/2017. CWDS / Child Welfare Digital Services

Effective Rails Testing Practices

The Case: Danske Bank

From Feature to Code. SCRUM + NetBeans RCP + Featureous. John Kostaras JCrete August 2014

Your First Ruby Script

Fast, Sexy, and Svelte: Our Kind of Rails Testing. Dan Manges (ThoughtWorks) zak (unemployed)

dt+ux Design Thinking for User Experience Design, Prototyping & Evaluation Autumn 2016 Prof. James A. Landay Stanford University

Contents.

CS Homework 12

SDx and the Future of Infrastructure

Software Development Process Models

Agile Software Development. Software Development Methodologies. Who am I? Waterfall. John York JOHN YORK EECS 441 FALL 2017 A BRIEF LOOK

CIS*1500 Introduction to Programming

Agile Software Development. Software Development Methodologies. Who am I? Waterfall. John York JOHN YORK EECS 441 WINTER 2018 A BRIEF LOOK

Library Calendar Project

CS 253: Intro to Systems Programming 1/21

User Stories Applied, Mike Cohn

Software Development Methodologies

Transcription:

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

Agenda 2 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Lego Scrum Exercise 3 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

Lego Scrum Exercise 4 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)

Lego Scrum Exercise 5 Planning PO presents User Story (we prepared some) Design session / Task break down Estimation Time left? Next Story Conduct sprint

Lego Scrum Exercise 6 Review Team presents User Story results PO accepts/rejects Retrospective What can be improved? Process adjustments? How do you feel?...

Lego Scrum Exercise 7

Lego Scrum Exercise 8 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

Lego Scrum Exercise 9 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

Agenda 10 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Git 11

Agenda 12 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Email 13 Mailing lists swt2_2010@hpi.uni-potsdam.de 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: swt2.2010.anonym@googlemail.com

Time Management 14 Google Calendar Advantages: Available Everywhere Easy Integration with Outlook & ical (see Useful Links in Wiki) Overview of team appointments Access granted by tutors

Continuous Integration 15 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

Application Lifecycle Management 16 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}/

Agenda 17 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Application Stub 18

Application Stub 19

Application Stub 20 (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

Agenda 21 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Your next week in a nutshell 22 Project start Planning meeting (SM moderates) PO & teams agree on sprint goal Team capacity is estimated PO presents 1 st user story from his product backlog Team writes down tasks Task sizes are estimated Capacity left? Done yes Architecture / coordination meeting(s)

Agenda 23 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Introduction into Testing in Rails 24 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

Introduction into Testing in Rails 25 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

RSpec 26 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 [Chelimsky et al.: The Rspec Book, 2010]

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

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

Directory Comparison 29

30 Cucumber

Implementing Cucumber Steps 31 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!

Implementing Cucumber Steps 32 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

Implementing Cucumber Steps 33

Implementing Cucumber Steps 34 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

35 RSpec

Hello RSpec 36 describe "RSpec Greeter" do! it "should say 'Hello RSpec!' when it receives the greet () message" do! end! end! greeter = RSpecGreeter.new! greeting = greeter.greet! greeting.should == "Hello RSpec!"! Given When Then rake spec:models

Hello RSpec 37 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

Hello RSpec 38 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! end! end! greeter = RSpecGreeter.new! greeting = greeter.greet! greeting.should == "Hello RSpec!"!

Hello RSpec 39 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

Further Information on RSpec 40 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)

Agenda 41 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

Outlook 42 TDD BDD Testing in Rails Unit::Test RSpec Cucumber Test doubles Factories

Agenda 43 Lego Scrum Exercise Git Project Infrastructure Application Stub Your next week in a nutshell Introduction into Testing in Rails Outlook PO Presentation

PO Presentation 44

Thank you for your attention!

Backup

Lego Scrum Exercise 47 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?

Practical Examples 48 RSpec Buch ab S. 61 RSpec Buch bis S. 200 UNIT::TEST im TestReceipes Buch ist auch gut (bspw. bis S. 101)

Fixtures 49

Fixtures, 1:n relationship 50

Fixtures, n:m relationship 51

Fixtures 52 In spec_helper: fixtures:all!

Test Run 53

Setup and Teardown 54

Setup and Teardown 55