Software Engineering I (02161) First Programming Assignment Assoc. - - PowerPoint PPT Presentation

software engineering i 02161
SMART_READER_LITE
LIVE PREVIEW

Software Engineering I (02161) First Programming Assignment Assoc. - - PowerPoint PPT Presentation

Software Engineering I (02161) First Programming Assignment Assoc. Prof. Hubert Baumeister DTU Compute Technical University of Denmark Spring 202 Programming Exercise Library software Practice Test-/Behaviour-driven development


slide-1
SLIDE 1

Software Engineering I (02161)

First Programming Assignment

  • Assoc. Prof. Hubert Baumeister

DTU Compute Technical University of Denmark

Spring 202

slide-2
SLIDE 2

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

slide-3
SLIDE 3

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

◮ week 1: writing production code for given Cucumber scenarios and step-definitions

slide-4
SLIDE 4

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

◮ week 1: writing production code for given Cucumber scenarios and step-definitions ◮ week 2: write your own step definitions and Cucumber features

slide-5
SLIDE 5

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

◮ week 1: writing production code for given Cucumber scenarios and step-definitions ◮ week 2: write your own step definitions and Cucumber features ◮ week 3: use mocking to make tests independent of external systems

slide-6
SLIDE 6

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

◮ week 1: writing production code for given Cucumber scenarios and step-definitions ◮ week 2: write your own step definitions and Cucumber features ◮ week 3: use mocking to make tests independent of external systems ◮ week 4+5: refactoring and BDD

slide-7
SLIDE 7

Programming Exercise

◮ Library software ◮ Practice Test-/Behaviour-driven development (TDD/BDD)

Eric Evans, Domain Driven Design, Addison-Wesley, 2004

  • 1. Development of the application +

domain layer using BDD

◮ week 1: writing production code for given Cucumber scenarios and step-definitions ◮ week 2: write your own step definitions and Cucumber features ◮ week 3: use mocking to make tests independent of external systems ◮ week 4+5: refactoring and BDD

  • 2. Presentation layer (an option will be

presented in the course)

  • 3. Simple persistency layer (an option

will be presented in the course)

slide-8
SLIDE 8

First week’s assignment

◮ Given use case scenarios for: Admin Login, Admin logout, Add book, and Search book

Scenario: Administrator can login Given that the administrator is not logged in And the password is "adminadmin" Then the administrator login succeeds And the adminstrator is logged in

◮ And step definitions

@Given("that the administrator is not logged in") public void thatTheAdministratorIsNotLoggedIn() throws Exception { assertFalse(libraryApp.adminLoggedIn()); } @Then("the administrator login succeeds") public void theAdministratorLoginSucceeds() throws Exception { assertTrue(libraryApp.adminLogin(password)); } ...

◮ Implement the production code

◮ Test have to pass

◮ More information at http://www2.imm.dtu.dk/courses/02161/2020/ programming_exercises.html