20-Jun-15 XP Again. Test-Driven Development Advantages of writing tests first: Clarifies what the methods are supposed to do Methods are testable Methods.

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

The Secrets of Practical Verification… © 2008 Think Verification.
CIT 590 Unit testing.
30-Apr-15 Extreme Programming. 2 Software engineering methodologies A methodology is a formalized process or set of practices for creating software An.
PS4: Test Driven Development Based on Test Driven Development by Example By Kent Beck.
1-Jun-15 JUnit. 2 Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (running whatever tests.
CS 2110 Software Design Principles II Based on slides originally by Juan Altmayer Pizzorno port25.com.
CS351 © 2003 Ray S. Babcock Software Testing What is it?
13-Jun-15 Extreme Programming. 2 Software engineering methodologies A methodology is a formalized process or set of practices for creating software An.
EXtreme.NET Dr. Neil Roodyn. eXtreme.NET Who is Dr. Neil? MISSION: To increase the value of your Software Business Working with software for way too long.
16-Jun-15 Recognizers. 2 Parsers and recognizers Given a grammar (say, in BNF) and a string, A recognizer will tell whether the string belongs to the.
CS201 - Laboratory Submittal Using the submit command.
21-Jun-15 JUnit. 2 Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (running whatever tests.
23-Jun-15 Unit Testing in Ruby. Programming methodologies The grim facts: The majority of large programming projects fail Projects that succeed are usually.
26-Jun-15 JUnit. 2 Test suites Obviously you have to test your code to get it working in the first place You can do ad hoc testing (running whatever tests.
Revisions If you received the grade: “R” If you received the grade: “R” You must do a revision to receive a grade for lab 2. You must do a revision to.
Test-Driven Development “Test first, develop later!” –OCUnit.
Living Requirements using Behavior Driven Development
Test-Driven Development Gary Brown Building better software one test at a time.
Writing “large” software.. How do you eat an Elephant? – One bite at a time.
By for Test Driven Development: Industry practice and teaching tool Robert Vanderwall, Ph.D. 1 WISTPC-15.
Test Driven Development TDD. Testing ”Testing can never demonstrate the absence of errors in software, only their presence” Edsger W. Dijkstra (but it.
Test Driven Development An approach to writing better code Jimmy Zimmerman Intel Corporation.
High Ceremony Programming (HCP) CSE301 University of Sunderland Harry R. Erwin, PhD.
1 Project Information and Acceptance Testing Integrating Your Code Final Code Submission Acceptance Testing Other Advice and Reminders.
BTEC Unit 06 – Lesson 08 Principals of Software Design Mr C Johnston ICT Teacher
Pair Programming. XP Rule of Thumb “When something is difficult or painful, do it more often until it becomes easier.”
October, 2006 © Copyright 2006, Larry A. Beaty. Copying and distribution of this document is permitted in any medium, provided this notice is preserved.
The First in GPON Verification Classic Mistakes Verification Leadership Seminar Racheli Ganot FlexLight Networks.
By for Testing Tools: Test Automation and supporting tools Jariro Pava, Robert Vanderwall 1 WISTPC-14.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
From Quality Control to Quality Assurance…and Beyond Alan Page Microsoft.
Debugging Strategies from Software Carpentry. Agan's Rules Many people make debugging harder than it needs to be by: Using inadequate tools Not going.
C++ REVIEW – POINTERS AND TEST DRIVEN DEVELOPMENT.
Software Architecture as design John D. McGregor.
XP Practices The University of California Berkeley Extension Copyright © 2007 Patrick McDermott
Test-Driven Development Eduard Miric ă. The problem.
Using Test Driven Development Jon Kruger Blog: Twitter: JonKruger.
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,
CSC 480 Software Engineering Test Planning. Test Cases and Test Plans A test case is an explicit set of instructions designed to detect a particular class.
Contact Information Leena Razzaq WVH 310B Office Hours: Monday 12:00 – 2:00 pm And by appointment.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
Agenda: Overview of Agile testing Difference between Agile and traditional Methodology Agile Development Methodologies Extreme Programming Test Driven.
25-Feb-16 Extreme Programming. 2 Software engineering methodologies A methodology is a formalized process or set of practices for creating software An.
Continuous Improvement. Start Simple and Continually Improve E.g., Gmail Labels 1.
Laboratory Investigations Each lab group will submit a single input. All members of the group will get THE SAME grade UNLESS... You are observed goofing.
Automated Testing with PHPUnit. How do you know your code works?
Software Development. The Software Life Cycle Encompasses all activities from initial analysis until obsolescence Analysis of problem or request Analysis.
The Basics of Robert's Rules of Order Ed Blackman Local Officer's College January 2009.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
Testing and delivery Web design principles. Web development is software development.
PRG 420 Week 4 Learning Team Quality Control Review To purchase this material click below link Week-4-Learning-Team-Quality-Control-Review.
Agile Project Management and the yin & yang of
Test-driven development
Test-Driven Development
Sample Wiki Comments?.
Test Driven Development
The Software Development Cycle
More On Testing Why, Where, How, When.
English Conversation I – Correction Techniques
GCSE: Algebraic Fractions
Run For Your Life Early Warning System OR Damage Zones
Extreme Programming 7-Dec-18.
CSE 303 Concepts and Tools for Software Development
TDD & ATDD 1/15/2019.
Test Driven Development
Test Driven Development
The Software Development Cycle
Testing Slides adopted from John Jannotti, Brown University
Presentation transcript:

20-Jun-15 XP Again

Test-Driven Development Advantages of writing tests first: Clarifies what the methods are supposed to do Methods are testable Methods tend to be simpler and single-purpose Methods tend to be more independent of the environment Tests get written XP slogans: “Test Everything That Could Possibly Break” “If it hasn’t been tested, it doesn’t work.” One of the XP principles is: Respect Trust your team members not to submit nonworking code

TDD development cycle Here’s how TDD should be done: while (program isn’t complete) { write a nonworking “stub” method write a test for that method run the test and make sure it fails do { improve the method test the method while (the test fails) } It’s OK to start with a large number of stubs, but make each method work before you go on to the next

TDD maintenance After your program is fully written and tested, bugs can still appear Usually this is something you forgot to test Here’s what to do: First, write a test case that exposes the error (by failing) Then (and only then) correct the code

Suggestions for working with partners Make sure you are clear on what classes and methods are to be written Follow the exact specs given on the assignment If you want additional methods, agree on what they are Divide up the effort (by class or by method) Do TDD Give your partner working code Remember: “If it hasn’t been tested, it doesn’t work.” Agree who is to do the last-minute integration testing (and submission)

Other XP terms DTSTTCPW “Do The Simplest Thing That Could Possibly Work” If it needs to be more efficient, that’s best done with simple, understandable code The compiler is better at optimization than you are DRY “Don’t Repeat Yourself” OAOO “OnceAndOnlyOnce” Test Infected “When you can't even go pee unless you have a GreenBar” Source: YAGNI “You Ain’t Gonna Need It”

The End