SlideShare a Scribd company logo
1 of 27
19 - 20 August 2016
Bangalore
www.xpconference.in
FULL STACK
XPGame show!!!!
THE RULES
➤ Everyone in the room is a contestant. Congrats!
➤ Form groups and get to know each other.
➤ Tactically, to win the game you'll want a cross functional group:
knowledge of front end, middle, and back end.
➤ If you're in a bad group then act fast! Run!
➤ The game show host will be final arbiter in cases of a tie.
GOOD LUCK!!! SOME OF YOU ARE
GOING TO NEED IT!
ANSWER THE
FOLLOWING➤ True/False
➤ Blue is the best color
➤ Which of the following is the
best number:
1. 42,
2. -5, or
3. 6i^2.
PRACTICE QUESTION
FULL STACK
TDD
System Testing
Emergent design
Shared code ownership
Pair Programming
Simple Design
System Metaphor
Sustainable Pace
Planning Game
Continuous Integration
…
Image source:
WHAT'S THE EASIEST
TIER TO DO XP IN:
1. Front,
2. Middle, or
3. Back?
MIDDLE
TIERThe "easy tier."
@GET
@Path("squirrels/{id}")
@Produces("application/json")
public Squirrel getSquirrel(@PathParam("id") String id) {
Squirrel aSquirrel;
try {
aSquirrel = thePark.getSquirrel(id);
if (aSquirrel == null)
throw new SquirrelGoneMissingException(“No squirrel: “ + id);
} catch (Exception e) {
throw new ServiceException();
}
return aSquirrel;
}
MIDDLE TIER
➤ App server, a VM runtime
environment, SOA.
➤ True or false:
➤ Test First can be done to
drive this all this code?
➤ What line of code must be
system tested rather than unit
tested?
➤ How many unit tests are
needed to cover this code?
WHICH OF THE FOLLOWING IS
ALLOWED IN A UNIT TEST:
1. Network access,
2. File access,
3. hardware clock, or
4. DB access.
➤ Is using an in-memory DB a
suitable unit test strategy?
DEADLY UNIT TEST SINS
ANSWER THE
FOLLOWING➤ Using Spring for dependency
injection requires the use of
what configuration file?
➤ For writing system tests, is it
an acceptable strategy to
require this file?
➤ For writing unit tests, is it an
acceptable strategy to require
this file?
➤ What's an alternative strategy
for unit testing code that uses
Spring?
SPRING AND TDD
BACK ENDThe "develop docs before the code" tier.
WHICH OF THE FOLLOWING
DESCRIBES EMERGENT DESIGN:
1. Defining schema a year in
advance;
2. Defining schema a month in
advance;
3. Defining schema a sprint in
advance;
4. Defining schema during the
sprint; or
5. All of the above.
WHICH OF THE FOLLOWING
SUPPORTS EMERGENT DESIGN:
1. Source control,
2. Migration scripts,
3. TDD, or
4. All of the above?
WHICH OF THE FOLLOWING IS A
SUITABLE UNIT TEST STRATEGY FOR
STORED PROCEDURES:
1. Tests written in C# and Nunit
going over a data connection
targeting a stored procedure;
2. Tests written in a stored
procedure language targeting a
stored procedure;
3. Tests written in C# and
Selenium driving a web app,
targeting a stored procedure; or
4. You can't unit test the database
so forget about it?
CREATE OR REPLACE PROCEDURE truncit (
tab IN VARCHAR2,
sch IN VARCHAR2 := NULL
)
IS
BEGIN
EXECUTE IMMEDIATE 'truncate table ' || NVL (sch, USER) || '.' || tab;
END;
ANSWER THE
FOLLOWING➤ Stored procedures typically
are dependent on?
➤ For writing system tests, is it
an acceptable strategy to
require many tables and rows
of data?
➤ For writing unit tests, is it an
acceptable strategy to require
many tables and rows of
data?
➤ What's an alternative strategy
for unit testing code in a
stored procedure?
DATA SETUP AND TDD
FRONT ENDThe "our code is too simple to unit test" tier.
CAN BE UNIT
TESTED➤ Layout looks correct.
(True/False)
➤ Spelling of text is correct.
➤ Form validation works.
➤ Colors aren't clashing.
➤ The page contains all the
widgets.
➤ Activating widgets causes
reaction.
FAST FEEDBACK
➤ True or false:
➤ Test First can be done to
drive this all this code.
➤ What line of code must be
system tested rather than unit
tested?
➤ How many unit tests are
needed to cover this code?
➤ What can refactoring would
enable more unit tests?
var renderAllPurchases = function(purchases) {
var purchasesMap = {};
var allPurchasesList = $('ul.purchases-tile-list.all');
var deferred = $.Deferred();
shopDust.render('ui-purchases-tiles-template', { purchases: purchases, includeIds: true }, bundle).done(function(out) {
$(allPurchasesList).empty().append(out).shopPaymentsTileList();
// Create a map of the purchases (indexed by cust id)
$.each(purchases, function(index, cust) {purchasesMap[cust.id] = cust;});
// attach the purchases map to the document
$(document).data('purchasesMap', purchasesMap);
// toggle classes based on list contents
setListClasses(allPurchasesList);
deferred.resolve();
});
return deferred;
};
HOW MANY UNIT
TESTS?➤ To test drive changing a CSS
class, how many unit tests?
➤ To test drive changing HTML,
how many unit tests?
ANSWER THE
FOLLOWING➤ JavaScript functions that
directly manipulate the DOM
often rely on preconditions
stored in what file(s)?
➤ For writing system tests, is it
an acceptable strategy to
require these file(s)?
➤ For writing unit tests, is it an
acceptable strategy to require
these files? (Jasmine Fixture
files)
➤ What's an alternative strategy
for unit testing code such
code?
UNIT TESTING DOM
MANIPULATION
BIG PICTURE
WHICH IS HARDEST
TO UNIT TEST?
1. Front end
2. Back end
3. Middle
4. Mobile
5. Embedded controller
6. HTML/CSS
7. Configuration files
WHICH TEST STRATEGY
PROVIDES WHAT BENEFIT
➤ Makes refactoring easy
➤ Indicates there is a regression
➤ Indicates approximate location of the
code causing a regression
➤ Confirms the app still works
➤ Confirms the code works as the
developer intended
➤ Confirms the app works as the
customer has specified
➤ Confirms scalability, security, and
performance.
➤ Gives feedback in seconds to
minutes.
➤ Gives feedback in hours to days.
SYSTEM TEST OR UNIT TEST
Manual
& GUI Tests
System Tests
Unit Tests
GOOD WAY TO
DIFFERENTIATE SYSTEM
FROM UNIT TEST (T/F):
1.Don’t bother so it takes 20
minutes+ to run unit tests.
2.Using maven with the appropriate
life-cycle (test and integration-test).
3.Run unit or system tests within
Eclipse but it takes 5+ clicks.
4.Use JUnit test suites, one for Unit
Tests, the other for System Tests.
5.Separate directory for unit test and
separate for system tests, then use
run-as->Junit Test
6.Mingle unit tests with product code.
System Tests in another project.
TEST INVENTORY ORGANIZATION
Manual
& GUI Tests
System Tests
Unit Tests
WHICH OF THE FOLLOWING PEOPLE
ARE PROFICIENT AT TDD?
➤ From left to right, person 1, 2, 3,
or 4.
I’ve written 50 unit
tests in the past 4
weeks.
I do TDD the
it’s policy.
I’ve written thousands of
unit tests in my ten year
career.
Yesterday I went to
work and didn’t write a
unit test.
TAKEAWAYS
➤ Cleanup test inventories
➤ Test drive all your OO, DB procedures, and functional language
code. (90-99% of your code)
➤ System Test what you can’t unit test (10%)
➤ Unit test your full stack: (tools I prefer) NUnit, JUnit, UTPlSql,
T.S.T.Sql, (test in a Nodejs environment with—Karma + Chai or
Jasmine)
➤ System Test what’s left: Selenium, BDD framework,
➤ Automate your DB migration: FlywayDB
➤ Refer to: ConfessionsOfAnAgileCoach.blogspot.com
HOPE YOU ENJOYED AND WON A SCRUM
COMIC, AGILE NOVEL, OR …!

More Related Content

What's hot

Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Mohamed Taman
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Babul Mirdha
 
Test driven development
Test driven developmentTest driven development
Test driven developmentNascenia IT
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and WhenPaul Gower
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDDavid Rodenas
 
Dependency Injection in iOS
Dependency Injection in iOSDependency Injection in iOS
Dependency Injection in iOSPablo Villar
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Vijay Kumbhar
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019Paulo Clavijo
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your codePascal Larocque
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentMireia Sangalo
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
Code Review
Code ReviewCode Review
Code Reviewrantav
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven developmenttoteb5
 
Test driven development_continuous_integration
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integrationhaochenglee
 
Utility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDUtility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDXP Conference India
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy CodeAdam Culp
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 

What's hot (20)

Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.Unit testing & TDD concepts with best practice guidelines.
Unit testing & TDD concepts with best practice guidelines.
 
Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)Test Driven iOS Development (TDD)
Test Driven iOS Development (TDD)
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
TDD with RSpec
TDD with RSpecTDD with RSpec
TDD with RSpec
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
TDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDDTDD CrashCourse Part2: TDD
TDD CrashCourse Part2: TDD
 
Dependency Injection in iOS
Dependency Injection in iOSDependency Injection in iOS
Dependency Injection in iOS
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
 
Test driven development - Zombie proof your code
Test driven development - Zombie proof your codeTest driven development - Zombie proof your code
Test driven development - Zombie proof your code
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Code Review
Code ReviewCode Review
Code Review
 
Scrum and Test-driven development
Scrum and Test-driven developmentScrum and Test-driven development
Scrum and Test-driven development
 
Test driven development_continuous_integration
Test driven development_continuous_integrationTest driven development_continuous_integration
Test driven development_continuous_integration
 
Utility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDDUtility of Test Coverage Metrics in TDD
Utility of Test Coverage Metrics in TDD
 
TDD refresher
TDD refresherTDD refresher
TDD refresher
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Refactoring Legacy Code
Refactoring Legacy CodeRefactoring Legacy Code
Refactoring Legacy Code
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 

Viewers also liked

Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...
Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...
Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...XP Conference India
 
Common blind spots on the journey to production vijay raghavan aravamudhan
Common blind spots on the journey to production  vijay raghavan aravamudhanCommon blind spots on the journey to production  vijay raghavan aravamudhan
Common blind spots on the journey to production vijay raghavan aravamudhanXP Conference India
 
Pair Programming in Theory and Practice By Garrick West
Pair Programming in Theory and Practice By Garrick WestPair Programming in Theory and Practice By Garrick West
Pair Programming in Theory and Practice By Garrick WestXP Conference India
 
CVEnglish_2016
CVEnglish_2016CVEnglish_2016
CVEnglish_2016Jurgen Put
 
Mule Cloudhub Connector
Mule Cloudhub ConnectorMule Cloudhub Connector
Mule Cloudhub ConnectorAnkush Sharma
 
εορτασμος ημερας νερού
εορτασμος ημερας  νερούεορτασμος ημερας  νερού
εορτασμος ημερας νερούkonmaria
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoTkumar gaurav
 
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016Tim Schaap
 
Creating treasure hunt with Actionbound
Creating treasure hunt with ActionboundCreating treasure hunt with Actionbound
Creating treasure hunt with ActionboundLamia Büşra YEŞİL
 
"Питательная поддержка в комплексном лечении курабельных осложнений противооп...
"Питательная поддержка в комплексном лечении курабельных осложнений противооп..."Питательная поддержка в комплексном лечении курабельных осложнений противооп...
"Питательная поддержка в комплексном лечении курабельных осложнений противооп...rnw-aspen
 
25o final program scientific
25o final program scientific25o final program scientific
25o final program scientificpsaltakis
 

Viewers also liked (19)

Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...
Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...
Perspectives on Continuous Integration at Scale by Hrishikesh K & Vinaya Mura...
 
Common blind spots on the journey to production vijay raghavan aravamudhan
Common blind spots on the journey to production  vijay raghavan aravamudhanCommon blind spots on the journey to production  vijay raghavan aravamudhan
Common blind spots on the journey to production vijay raghavan aravamudhan
 
AQUAPRO SHOWER FILTER UAE
AQUAPRO SHOWER FILTER UAEAQUAPRO SHOWER FILTER UAE
AQUAPRO SHOWER FILTER UAE
 
Pair Programming in Theory and Practice By Garrick West
Pair Programming in Theory and Practice By Garrick WestPair Programming in Theory and Practice By Garrick West
Pair Programming in Theory and Practice By Garrick West
 
CVEnglish_2016
CVEnglish_2016CVEnglish_2016
CVEnglish_2016
 
Ramón Bañol Garcia
Ramón Bañol Garcia	Ramón Bañol Garcia
Ramón Bañol Garcia
 
Mule Cloudhub Connector
Mule Cloudhub ConnectorMule Cloudhub Connector
Mule Cloudhub Connector
 
εορτασμος ημερας νερού
εορτασμος ημερας  νερούεορτασμος ημερας  νερού
εορτασμος ημερας νερού
 
Actionbound
ActionboundActionbound
Actionbound
 
Extreme sports
Extreme sportsExtreme sports
Extreme sports
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoT
 
Los test de cf
Los test de cfLos test de cf
Los test de cf
 
Tutorial Pixton
Tutorial PixtonTutorial Pixton
Tutorial Pixton
 
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016
BNI Training: Hoe 10 minuten voor te bereiden 20-10-2016
 
Creating treasure hunt with Actionbound
Creating treasure hunt with ActionboundCreating treasure hunt with Actionbound
Creating treasure hunt with Actionbound
 
Web.2.0 araçları
Web.2.0 araçlarıWeb.2.0 araçları
Web.2.0 araçları
 
"Питательная поддержка в комплексном лечении курабельных осложнений противооп...
"Питательная поддержка в комплексном лечении курабельных осложнений противооп..."Питательная поддержка в комплексном лечении курабельных осложнений противооп...
"Питательная поддержка в комплексном лечении курабельных осложнений противооп...
 
Vorgia
VorgiaVorgia
Vorgia
 
25o final program scientific
25o final program scientific25o final program scientific
25o final program scientific
 

Similar to XP in the full stack

Google test training
Google test trainingGoogle test training
Google test trainingThierry Gayet
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit TestingMike Lively
 
Testing In Software Engineering
Testing In Software EngineeringTesting In Software Engineering
Testing In Software Engineeringkiansahafi
 
Seacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools TrackSeacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools TrackMark Rendell
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testingAdam Stephensen
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration TestingDavid Berliner
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2Tricode (part of Dept)
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkPeter Kofler
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to considerLloydMoore
 
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...acijjournal
 

Similar to XP in the full stack (20)

TDD Best Practices
TDD Best PracticesTDD Best Practices
TDD Best Practices
 
AAA Automated Testing
AAA Automated TestingAAA Automated Testing
AAA Automated Testing
 
Google test training
Google test trainingGoogle test training
Google test training
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit Testing
 
Testing In Software Engineering
Testing In Software EngineeringTesting In Software Engineering
Testing In Software Engineering
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Why unit testingl
Why unit testinglWhy unit testingl
Why unit testingl
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
Python and test
Python and testPython and test
Python and test
 
Seacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools TrackSeacon Continuous Delivery Pipeline Tools Track
Seacon Continuous Delivery Pipeline Tools Track
 
An introduction to unit testing
An introduction to unit testingAn introduction to unit testing
An introduction to unit testing
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Unit testing php-unit - phing - selenium_v2
Unit testing   php-unit - phing - selenium_v2Unit testing   php-unit - phing - selenium_v2
Unit testing php-unit - phing - selenium_v2
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
Ubiquitous Testing
Ubiquitous TestingUbiquitous Testing
Ubiquitous Testing
 
Testing
TestingTesting
Testing
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to consider
 
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
 

More from XP Conference India

Power of Measurement to Attain True Agility Meetu Arora
Power of Measurement to Attain True Agility Meetu Arora Power of Measurement to Attain True Agility Meetu Arora
Power of Measurement to Attain True Agility Meetu Arora XP Conference India
 
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni    Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni XP Conference India
 
Refactoring for software design smells XP Conference 2016 Ganesh Samarthyam...
Refactoring for software design smells  XP Conference 2016  Ganesh Samarthyam...Refactoring for software design smells  XP Conference 2016  Ganesh Samarthyam...
Refactoring for software design smells XP Conference 2016 Ganesh Samarthyam...XP Conference India
 
Building Big Architectures by Ramit Surana
Building Big Architectures by Ramit SuranaBuilding Big Architectures by Ramit Surana
Building Big Architectures by Ramit SuranaXP Conference India
 
Journey with XP a case study in embedded domain by Pradeep Kumar NR
Journey with XP a case study in embedded domain  by Pradeep Kumar NRJourney with XP a case study in embedded domain  by Pradeep Kumar NR
Journey with XP a case study in embedded domain by Pradeep Kumar NRXP Conference India
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016XP Conference India
 
Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana GulatiXP Conference India
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016XP Conference India
 
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...XP Conference India
 
Who will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniWho will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniXP Conference India
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil KumarXP Conference India
 
Nightmare to nightly builds Vijay Bandaru
Nightmare to nightly builds   Vijay BandaruNightmare to nightly builds   Vijay Bandaru
Nightmare to nightly builds Vijay BandaruXP Conference India
 

More from XP Conference India (16)

Power of Measurement to Attain True Agility Meetu Arora
Power of Measurement to Attain True Agility Meetu Arora Power of Measurement to Attain True Agility Meetu Arora
Power of Measurement to Attain True Agility Meetu Arora
 
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni    Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni
Devops like lance Armstrong by Yahya Poonawala & Siddharth Kulkarni
 
Refactoring for software design smells XP Conference 2016 Ganesh Samarthyam...
Refactoring for software design smells  XP Conference 2016  Ganesh Samarthyam...Refactoring for software design smells  XP Conference 2016  Ganesh Samarthyam...
Refactoring for software design smells XP Conference 2016 Ganesh Samarthyam...
 
Building Big Architectures by Ramit Surana
Building Big Architectures by Ramit SuranaBuilding Big Architectures by Ramit Surana
Building Big Architectures by Ramit Surana
 
Journey with XP a case study in embedded domain by Pradeep Kumar NR
Journey with XP a case study in embedded domain  by Pradeep Kumar NRJourney with XP a case study in embedded domain  by Pradeep Kumar NR
Journey with XP a case study in embedded domain by Pradeep Kumar NR
 
Introduction to Docker - Learning containerization XP conference 2016
Introduction to Docker - Learning containerization  XP conference 2016Introduction to Docker - Learning containerization  XP conference 2016
Introduction to Docker - Learning containerization XP conference 2016
 
Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana Gulati
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016
 
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...
Bashing cultural monsters in continuous integration by Vivek Ganesan XP Confe...
 
S.O.L.I.D xp
S.O.L.I.D xpS.O.L.I.D xp
S.O.L.I.D xp
 
Xp conf-tbd
Xp conf-tbdXp conf-tbd
Xp conf-tbd
 
Developer 2.0
Developer 2.0  Developer 2.0
Developer 2.0
 
Play2 Java
Play2 JavaPlay2 Java
Play2 Java
 
Who will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyaniWho will test_your_tests_yahya poonawala- priti biyani
Who will test_your_tests_yahya poonawala- priti biyani
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
 
Nightmare to nightly builds Vijay Bandaru
Nightmare to nightly builds   Vijay BandaruNightmare to nightly builds   Vijay Bandaru
Nightmare to nightly builds Vijay Bandaru
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 

XP in the full stack

  • 1. 19 - 20 August 2016 Bangalore www.xpconference.in
  • 3. THE RULES ➤ Everyone in the room is a contestant. Congrats! ➤ Form groups and get to know each other. ➤ Tactically, to win the game you'll want a cross functional group: knowledge of front end, middle, and back end. ➤ If you're in a bad group then act fast! Run! ➤ The game show host will be final arbiter in cases of a tie. GOOD LUCK!!! SOME OF YOU ARE GOING TO NEED IT!
  • 4. ANSWER THE FOLLOWING➤ True/False ➤ Blue is the best color ➤ Which of the following is the best number: 1. 42, 2. -5, or 3. 6i^2. PRACTICE QUESTION
  • 5. FULL STACK TDD System Testing Emergent design Shared code ownership Pair Programming Simple Design System Metaphor Sustainable Pace Planning Game Continuous Integration … Image source:
  • 6. WHAT'S THE EASIEST TIER TO DO XP IN: 1. Front, 2. Middle, or 3. Back?
  • 8. @GET @Path("squirrels/{id}") @Produces("application/json") public Squirrel getSquirrel(@PathParam("id") String id) { Squirrel aSquirrel; try { aSquirrel = thePark.getSquirrel(id); if (aSquirrel == null) throw new SquirrelGoneMissingException(“No squirrel: “ + id); } catch (Exception e) { throw new ServiceException(); } return aSquirrel; } MIDDLE TIER ➤ App server, a VM runtime environment, SOA. ➤ True or false: ➤ Test First can be done to drive this all this code? ➤ What line of code must be system tested rather than unit tested? ➤ How many unit tests are needed to cover this code?
  • 9. WHICH OF THE FOLLOWING IS ALLOWED IN A UNIT TEST: 1. Network access, 2. File access, 3. hardware clock, or 4. DB access. ➤ Is using an in-memory DB a suitable unit test strategy? DEADLY UNIT TEST SINS
  • 10. ANSWER THE FOLLOWING➤ Using Spring for dependency injection requires the use of what configuration file? ➤ For writing system tests, is it an acceptable strategy to require this file? ➤ For writing unit tests, is it an acceptable strategy to require this file? ➤ What's an alternative strategy for unit testing code that uses Spring? SPRING AND TDD
  • 11. BACK ENDThe "develop docs before the code" tier.
  • 12. WHICH OF THE FOLLOWING DESCRIBES EMERGENT DESIGN: 1. Defining schema a year in advance; 2. Defining schema a month in advance; 3. Defining schema a sprint in advance; 4. Defining schema during the sprint; or 5. All of the above.
  • 13. WHICH OF THE FOLLOWING SUPPORTS EMERGENT DESIGN: 1. Source control, 2. Migration scripts, 3. TDD, or 4. All of the above?
  • 14. WHICH OF THE FOLLOWING IS A SUITABLE UNIT TEST STRATEGY FOR STORED PROCEDURES: 1. Tests written in C# and Nunit going over a data connection targeting a stored procedure; 2. Tests written in a stored procedure language targeting a stored procedure; 3. Tests written in C# and Selenium driving a web app, targeting a stored procedure; or 4. You can't unit test the database so forget about it? CREATE OR REPLACE PROCEDURE truncit ( tab IN VARCHAR2, sch IN VARCHAR2 := NULL ) IS BEGIN EXECUTE IMMEDIATE 'truncate table ' || NVL (sch, USER) || '.' || tab; END;
  • 15. ANSWER THE FOLLOWING➤ Stored procedures typically are dependent on? ➤ For writing system tests, is it an acceptable strategy to require many tables and rows of data? ➤ For writing unit tests, is it an acceptable strategy to require many tables and rows of data? ➤ What's an alternative strategy for unit testing code in a stored procedure? DATA SETUP AND TDD
  • 16. FRONT ENDThe "our code is too simple to unit test" tier.
  • 17. CAN BE UNIT TESTED➤ Layout looks correct. (True/False) ➤ Spelling of text is correct. ➤ Form validation works. ➤ Colors aren't clashing. ➤ The page contains all the widgets. ➤ Activating widgets causes reaction.
  • 18. FAST FEEDBACK ➤ True or false: ➤ Test First can be done to drive this all this code. ➤ What line of code must be system tested rather than unit tested? ➤ How many unit tests are needed to cover this code? ➤ What can refactoring would enable more unit tests? var renderAllPurchases = function(purchases) { var purchasesMap = {}; var allPurchasesList = $('ul.purchases-tile-list.all'); var deferred = $.Deferred(); shopDust.render('ui-purchases-tiles-template', { purchases: purchases, includeIds: true }, bundle).done(function(out) { $(allPurchasesList).empty().append(out).shopPaymentsTileList(); // Create a map of the purchases (indexed by cust id) $.each(purchases, function(index, cust) {purchasesMap[cust.id] = cust;}); // attach the purchases map to the document $(document).data('purchasesMap', purchasesMap); // toggle classes based on list contents setListClasses(allPurchasesList); deferred.resolve(); }); return deferred; };
  • 19. HOW MANY UNIT TESTS?➤ To test drive changing a CSS class, how many unit tests? ➤ To test drive changing HTML, how many unit tests?
  • 20. ANSWER THE FOLLOWING➤ JavaScript functions that directly manipulate the DOM often rely on preconditions stored in what file(s)? ➤ For writing system tests, is it an acceptable strategy to require these file(s)? ➤ For writing unit tests, is it an acceptable strategy to require these files? (Jasmine Fixture files) ➤ What's an alternative strategy for unit testing code such code? UNIT TESTING DOM MANIPULATION
  • 22. WHICH IS HARDEST TO UNIT TEST? 1. Front end 2. Back end 3. Middle 4. Mobile 5. Embedded controller 6. HTML/CSS 7. Configuration files
  • 23. WHICH TEST STRATEGY PROVIDES WHAT BENEFIT ➤ Makes refactoring easy ➤ Indicates there is a regression ➤ Indicates approximate location of the code causing a regression ➤ Confirms the app still works ➤ Confirms the code works as the developer intended ➤ Confirms the app works as the customer has specified ➤ Confirms scalability, security, and performance. ➤ Gives feedback in seconds to minutes. ➤ Gives feedback in hours to days. SYSTEM TEST OR UNIT TEST Manual & GUI Tests System Tests Unit Tests
  • 24. GOOD WAY TO DIFFERENTIATE SYSTEM FROM UNIT TEST (T/F): 1.Don’t bother so it takes 20 minutes+ to run unit tests. 2.Using maven with the appropriate life-cycle (test and integration-test). 3.Run unit or system tests within Eclipse but it takes 5+ clicks. 4.Use JUnit test suites, one for Unit Tests, the other for System Tests. 5.Separate directory for unit test and separate for system tests, then use run-as->Junit Test 6.Mingle unit tests with product code. System Tests in another project. TEST INVENTORY ORGANIZATION Manual & GUI Tests System Tests Unit Tests
  • 25. WHICH OF THE FOLLOWING PEOPLE ARE PROFICIENT AT TDD? ➤ From left to right, person 1, 2, 3, or 4. I’ve written 50 unit tests in the past 4 weeks. I do TDD the it’s policy. I’ve written thousands of unit tests in my ten year career. Yesterday I went to work and didn’t write a unit test.
  • 26. TAKEAWAYS ➤ Cleanup test inventories ➤ Test drive all your OO, DB procedures, and functional language code. (90-99% of your code) ➤ System Test what you can’t unit test (10%) ➤ Unit test your full stack: (tools I prefer) NUnit, JUnit, UTPlSql, T.S.T.Sql, (test in a Nodejs environment with—Karma + Chai or Jasmine) ➤ System Test what’s left: Selenium, BDD framework, ➤ Automate your DB migration: FlywayDB ➤ Refer to: ConfessionsOfAnAgileCoach.blogspot.com
  • 27. HOPE YOU ENJOYED AND WON A SCRUM COMIC, AGILE NOVEL, OR …!