Course Outline.

Slides:



Advertisements
Similar presentations
(Advanced) Web Application Development Test Driven Development with Ruby and Rails Bruce Scharlau, University of Aberdeen, 2013.
Advertisements

Extreme Programming Alexander Kanavin Lappeenranta University of Technology.
Extreme Programming Programming Practices Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved Portions of this material.
NAUG NAUG Knowledge Evening – th February 2007.
Agile development By Sam Chamberlain. First a bit of history..
Karlstads University Computer Science Software Engineering, DVGC051 Times and activities Sprint-plan (same for all groups, SM and PO (Product Owner) can.
Introduction to Eclipse, Unit Testing and JUnit David Rabinowitz.
Unit testing C# classes “If it isn’t tested it doesn’t work” Unit testing C# classes1.
Living Requirements using Behavior Driven Development
TEST-DRIVEN DEVELOPMENT AND MVP Cory Foy and Michael Russo.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
Agile and XP Development Dan Fleck 2008 Dan Fleck 2008.
Embracing change with Extreme Programming Method Engineering Erik ten Brinke
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
© ALEXANDRE CUVA  VERSION 2.00 Test Driven Design.
Future Media  BBC MMXI TDD at the BBC David Craddock, Jack Palfrey and Tom Canter.
Sofia Bulgaria Summer School IST eXPERT: Best Practice on e-Project Development 30 June - 2 July 2003 eXtreme programming.
First BlueJ Day Houston, 2006 Unit Testing with BlueJ Bruce Quig Deakin University.
Unit Testing with JUnit and Clover Based on material from: Daniel Amyot JUnit Web site.
Goals for Presentation Explain the basics of software development methodologies Explain basic XP elements Show the structure of an XP project Give a few.
Scalatest. 2 Test-Driven Development (TDD) TDD is a technique in which you write the tests before you write the code you want to test This seems backward,
1 Presentation Title Test-driven development (TDD) Overview David Wu.
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Get the New Agile Attitude: Quality First! Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
Phoenix Scrum User Group Simplifying Scrum Online May 21 st 2009.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Today protected access modifier Using the debugger in Eclipse JUnit testing TDD Winter 2016CMPE212 - Prof. McLeod1.
Unit testing with NUnit Anne Lam & Chris James CMPS 4113 – Software Engineering April 15, 2015.
Software Engineering Lecture 11 Software Testing Presenter: Josef Hallberg 1.
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
Introduction to Unit Testing and JUnit David Rabinowitz.
Mapping Designs to Code. It specify how to map the design into object oriented language The UML artifacts created during the design work, the interaction.
Project Workflow.
AGILE METHODS Curtis Cook CS 569 Spring 2003.
Embedded Systems Software Engineering
Software Development.
Software Construction Lab 10 Unit Testing with JUnit
TEST AUTOMATION IN BDD WAY
Unit Testing - solid fundamentals
Test-driven development
Project Workflow.
Test Driven Development
Test Driven Development 1 November Agenda  What is TDD ?  Steps to start  Refactoring  TDD terminology  Benefits  JUnit  Mocktio  Continuous.
Software Testing.
Focus: Scrum Organization of a Scrum development work
Understand the Programming Process
Unit testing C# classes
What do you need to know about XP?
Test Driven Development
History, Characteristics and Frameworks
TDD adoption plan 11/20/2018.
Test-driven development (TDD)
Sharing the good, the bad, the ugly & What can we do about it?
Test Driven Development
Test-Driven Development
Introduction If you have got a call for an Agile testing interview, then congratulations are in order. You may be feeling nervous, but it sure to be felt.
TDD & ATDD 1/15/2019.
Understand the Programming Process
Programming.
Tonga Institute of Higher Education
Testing and Test Driven Development
Coming up: What is Agile?
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Test Driven Lasse Koskela Chapter 9: Acceptance TDD Explained
Extreme Programming.
Test-Driven Development
Testing and Test Driven Development
Open Source Tool Based Automation solution with Continuous Integration and end to end BDD Implementation Arun Krishnan - Automation Manager Maria Afzal-
Presentation transcript:

Course Outline

Course Goal Promote best practice and agile software engineering Processes Methods Practices and principles Tools Terms used summarized in Appendix A Practice on a real world project Room booking system, described in Appendix B Facilitates learning and understanding Applying best practices, examples in Appendix C Applying Patterns, examples in Appendix D References specified in Appendix E

Goals of the course Experience in working with state-of-the-art methods Scrum XP Experience in working with state-of-the-art tools Visual Studio NUnit SubVersion AnkhSVN (plugin for Visual Studio) Experience in working in groups Group dynamics Planning Deadlines Knowledge sharing

Timeline of the course First week Introduction Second week Startup of project Start of first sprint Third week End of first sprint Mini written exam Fourth week Work on second sprint Fifth week End of second sprint Sixth week Work on third sprint Seventh week End of third sprint Eighth week Work on fourth sprint Ninth week End of fourth sprint Tenth week Write report Present report

3 week goals (will be tested on exam) Scrum TDD What happens if…? How to do…? Pros/cons testing before/after Concepts Structure Process Problem solving How to work Roles Responsibilities Iterative vs. Water fall Corresponds to Kniberg, up to p99 and Martin, sections 1 and 2

Goals of course Everything from 3 week goals deeper understanding own opinions Architecture Design patterns Refactoring Praxis will not be tested by exam, but by report and by your way of working

TDD in practice NUnit tool for executing test suites produces red, green or yellow status tells you what went wrong automatically imports changes made to code Can be linked to Visual Studio ”add reference” and choose from the list Imports .dll-files containing test cases remember: choose ”library” instead of ”executable” both testfiles and programfiles F5 executes test suite in NUnit

Sprint info A sprint starts with a planning meeting ends with a sprint demo Every day Standup meeting at 8.30 (or other early time) 8 hours of work No more, no less No overtime allowed! Sustainable pace Long term Martin is PO and SM Product Owner Represents (or is sole) customer Scrum Master Makes it work (all practical issues)

Testing and Specification Unit testing Integration testing Acceptance testing

Principle – Use Executable Specifications Test Driven Development (TDD) xUnit Behaviour Driven Development (BDD) RSpec Automatic Acceptance Tests FIT, Selenium, Sahi, Watir, FITnesse

TDD in practice: test syntax Import library Informative name for namespace Declaration that class is test related Test is the common keyword to use. See documentation of NUnit for other options Methods should be public void and take no parameters using NUnit.Framework … namespace TestXXX { [TestFixture] public class TestXXX_X [Test] public void Test1() }

TDD in practice: test syntax, example Code to test that creation of a Set is possible [Test] public void Existance() { Set s = new Set(); Assert.IsNotNull(s); }

TDD in practice: test syntax, example Code to test insert-method in a class reprenting a Set [Test] public void Insert() { Set s = new Set(); int anElement = 5; s.Insert(anElement); Assert.IsTrue(s.Contains(anElement)); }

Dojo info Karate or MA Dojo is training room Everyone takes turns trying out techniques One produces test cases supplier would be the aggressor in karate Other codes to make test cases pass receiver would be the defender in karate

TDD Dojo: A Stack Implement a Stack class using TDD Demonstration by teacher Implement a List class using TDD Done by students Iterate between teacher and students Teaches does one small feature for the stack, students do the same feature for the list as a dojo Repeat for a while Some features first day, continued second day

Value of Testing vs Specification Testing is by samples Testing can only prove a system to be wrong Test cases may be executed Specification Specification describes general case Specification describes what is right Specifications may often be executed Imperfect tests, run frequently, are much better than perfect tests that are never written at all

TDD vs Architecture and Design Coplien and Martin Debate TDD, CDD and Professionalism Bob Martin = Robert C. Martin (Uncle Bob) Jim Coplien = James Coplien

Testing vs. xDD Traditional Unit, Integration, System and Acceptance Testing are done after the fact Code, then write test Ideally, system and acceptance tests are written before design and coding xDD (TDD, BDD) ”tests” are written before design and implementation They are ”driving” the development Also called Example Driven Development No development is done unless there is a failing test TDD tests are As much about exploring the design of the system As they are about bug catching TDD is how I do it, not what I do

Tim Ottingers TDD in Three Index Cards Three Index Cards To Easily Remember The Essence Of Test-Driven Development Card #1. Uncle Bob’s Three Laws Fail first, Only enough test to fail, Only enough solution to pass Card #2: FIRST Principles Fast, Isolated, Repeatable, Self-verifying, Timely Card #3: Core of TDD Red, Green, Refactor

Uncle Bob’s Three Laws of TDD Do not write a line of production code until you have written a failing unit test No production code can be written until there is a failing unit test Do not write more of a unit test than is sufficient to fail, and not compiling is failing So you cannot write very much of the unit test before you write production code Do not write more production code than is sufficient to pass the test You cannot write a little bit of unit test and then run off and write production code. These three laws lock you into a cycle that is perhaps 30 seconds long You are actually writing unit tests and production code concurrently, with the tests perhaps 30 seconds to a minute ahead ”That is my definition of TDD”

FIRST Principles ast Mind-numbingly fast, as in hundreds or thousands per second. solated The test isolates a fault clearly. epeatable I can run it repeatedly and it will pass or fail the same way each time. elf-verifying The Test is unambiguously pass-fail. imely Produced in lockstep with tiny code changes.

Red/Green/Refactor Start Write a test for new capability Refactor as needed (*) Compile Run the test And see it pass Fix compile errors Write the code Run the test And see it fail (*) Always on a green solution 22

TDD Pattern: Red, Green, Refactor Test Driven Development: By Example, Kent Beck, Addison-Wesley Longman, 2002 Simple example: Push for stack Create test case: testPush Compile error: no such method exists Create push method (stub) No compile error, but test case does not pass Implement push to satisfy test Test passes Refactor (if needed) Always refactor on a fully working (green) system

TDD Pattern: Arrange, Act, Assert William C. Wake's Blog December 2003 import junit.framework.*; public void TestClass extends TestCase {    public void testSomething() {      Stack stack = new Stack();      stack.push("Test string");      String result = stack.pop().toString();      assertEquals("Expected last value pushed", "Test string", result);    } } Arrange Act Assert

Unit Testing vs Integration Testing A test is not a unit test if It talks to the database It communicates across the network It touches the file system It can't run correctly at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it It is an integration test [Feather.UnitTestRulz]

Acceptance Testing Requirement documents become outdated And frequently not updated Executable specifications are always accurate Are actually executed

Frameworks for Automatic Acceptance Testing Fit Executes HTML tables with matching input and output FitNesse Front-end to Fit and wiki to organize tests RSpec (for Ruby) Write tests in plain english JSpec RSpec for Java All do Specification by Examples

Working with Acceptance Testing End user / product owner specify examples Examples are encoded in framework Selected examples drive development top-down Normally complemented by unit tests bottom-up