SlideShare a Scribd company logo
1 of 96
Download to read offline
DevOps TDD
SPOOKY

Programmer
DevOps
Team Leader
Java 6 years
Javascript 1.5 years



smlsun@facebook
trunk-studio.com
blog.trunk-studio.com
OUTLINE
• DevOps
• DevOps
• DevOps
• TDD
• TDD
• TDD
• TDD CI
•
DevOps
DevOps
Agile Lean
DevOps IT 

AGILEVS LEAN
• Agile:
•
• Lean:
•
•
DEVOPS
•
•
DEVOPS
• 90
• 2 1
DevOps 1.5 18


DevOps
DevOps
Develop Operator
DevOpsTools
Tools as objects to think with
Tools
DEVOPS
•
•
•
•
TDD


DevOps ...
•
•
•
•
TEST
DeveloperQA
TEST SPEC
/
FAIL
Edge of Tomorrow
TDD test
Tools as objects to think with
Tools
TDD is not about test
but think about better design
...
TDD
TEST CODE
TDD
XTEST vs OTEST
-4
-2
-60
TDD
NODEJS
Package

Library
Application
Server
LOGIN
• 3 step Login
INITIAL
var liftApp = async () => {
await models.sequelize.sync({
force: config.connection.force
});
await bootstrap();
app.listen(config.port);
return app;
}
if (env !== 'test') liftApp();
module.exports = liftApp
import chai from 'chai';
import request from 'supertest';
import sinon from 'sinon';
import liftApp from '../../server';
chai.should();
global.sinon = sinon;
before(async (done) => {
let app = await liftApp();
global.app = app;
global.request =
request.agent(app.listen());
done();
});
AP

start
test framework

start
SPECdescribe('auth login spec', () => {
before(async (done) => {
let testUser = {'username': 'test', 'password': 'test'}
await models.User.create(testUser);
done();
});
it('login should be success.', async (done) => {
let loginUserFormData = {
'username': ‘test',
'password': ‘test'
};
request.post(‘/auth/login')
.send(loginUserFormData).expect(200)
.end((error, res) => {
if (error) done(error);
let loginResult = res.body;
loginResult.success.should.be.true;
done();
})
}
• Mocha test framework
• Supertest API
• Should or Chai spec
MOCK


EX
API

OR
• sinon 

Mock
Source code
Mock code
Spec
SPEC
SA/SD


/
SPEC
TDD CI
CI / CD
CI
AutoTrigger
–
“ ”
•
•
•
•
• from Clean Code
DEVOPS TDD
• Member
•
• Member
•
•
•
•
•
• Member
•
•
AGILEVS LEAN AND
• Agile:
•
• Lean:
•
• http://qualitycoding.org/tdd-testimonial/
• http://gamesfromwithin.com/backwards-is-forward-
making-better-games-with-test-driven-development
• http://punnode.com/archives/18016
• http://teddy-chen-tw.blogspot.tw/2014/09/blog-
post_22.html

More Related Content

What's hot

QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
Rodrigo Russo
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentation
Daniel Straus
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
Mike McGarr
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
amscanne
 

What's hot (20)

CI
CICI
CI
 
Karim Fanadka
Karim FanadkaKarim Fanadka
Karim Fanadka
 
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous IntegrationQConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
QConSP 2014 - Continuous Delivery - Part 03 - Continuous Integration
 
Gozengo sauce presentation
Gozengo sauce presentationGozengo sauce presentation
Gozengo sauce presentation
 
Continuous Integration & Drupal
Continuous Integration & DrupalContinuous Integration & Drupal
Continuous Integration & Drupal
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projects
 
QAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with AppiumQAAgility Presentation - Cucumber with Appium
QAAgility Presentation - Cucumber with Appium
 
Continuous delivery applied
Continuous delivery appliedContinuous delivery applied
Continuous delivery applied
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
How to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated TestingHow to Build and Maintain Quality Drupal Sites with Automated Testing
How to Build and Maintain Quality Drupal Sites with Automated Testing
 
Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...
Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...
Best practices for Continuous Deployment with Drupal - DrupalCon Latin Améric...
 
快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境快快樂樂打造自動化開發環境
快快樂樂打造自動化開發環境
 
Tips for better CI on Android
Tips for better CI on AndroidTips for better CI on Android
Tips for better CI on Android
 
Building the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for TestersBuilding the Test Automation Framework - Jenkins for Testers
Building the Test Automation Framework - Jenkins for Testers
 
DevOps Unicorns
DevOps UnicornsDevOps Unicorns
DevOps Unicorns
 
Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster Jfokus 2017 - The DevOps Disaster
Jfokus 2017 - The DevOps Disaster
 
Continuous Integration and PHP
Continuous Integration and PHPContinuous Integration and PHP
Continuous Integration and PHP
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
Docker в автоматизации тестирования
Docker в автоматизации тестированияDocker в автоматизации тестирования
Docker в автоматизации тестирования
 

Viewers also liked

Viewers also liked (20)

從軟體開發角度
談 Docker 的應用
從軟體開發角度
談 Docker 的應用從軟體開發角度
談 Docker 的應用
從軟體開發角度
談 Docker 的應用
 
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
Docker summit 2015: 以 Docker Swarm 打造多主機叢集環境
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具
 
Docker Introduction - DevOps Montreal Meetup
Docker Introduction - DevOps Montreal MeetupDocker Introduction - DevOps Montreal Meetup
Docker Introduction - DevOps Montreal Meetup
 
Developer team review of 2014
Developer team review of 2014Developer team review of 2014
Developer team review of 2014
 
html5 & phonegap
html5 & phonegaphtml5 & phonegap
html5 & phonegap
 
技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異技術單兵作戰及團隊開發流程差異
技術單兵作戰及團隊開發流程差異
 
GCPUG.TW - 2016活動討論
GCPUG.TW - 2016活動討論GCPUG.TW - 2016活動討論
GCPUG.TW - 2016活動討論
 
Google Cloud Platform 2014Q4
Google Cloud Platform 2014Q4Google Cloud Platform 2014Q4
Google Cloud Platform 2014Q4
 
中原大學 Shift to cloud
中原大學   Shift to cloud中原大學   Shift to cloud
中原大學 Shift to cloud
 
中華電信 教育訓練
中華電信 教育訓練中華電信 教育訓練
中華電信 教育訓練
 
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
為 Node.js 專案打造專屬管家進行開發流程整合及健康檢測
 
GCPUG.TW - 2015活動回顧
GCPUG.TW - 2015活動回顧GCPUG.TW - 2015活動回顧
GCPUG.TW - 2015活動回顧
 
Web development, from git flow to github flow
Web development, from git flow to github flowWeb development, from git flow to github flow
Web development, from git flow to github flow
 
JCConf 2015 - Google Dataflow 在雲端大資料處理的應用
JCConf 2015 - Google Dataflow 在雲端大資料處理的應用JCConf 2015 - Google Dataflow 在雲端大資料處理的應用
JCConf 2015 - Google Dataflow 在雲端大資料處理的應用
 
Docker with Cloud Service GCPUG
Docker with Cloud Service  GCPUGDocker with Cloud Service  GCPUG
Docker with Cloud Service GCPUG
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
 
Brocade - Stingray Application Firewall
Brocade - Stingray Application FirewallBrocade - Stingray Application Firewall
Brocade - Stingray Application Firewall
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
从Docker到容器服务
从Docker到容器服务从Docker到容器服务
从Docker到容器服务
 

Similar to DevOps 及 TDD 開發流程哲學

Similar to DevOps 及 TDD 開發流程哲學 (20)

The Road to DevOps V3
The Road to DevOps V3The Road to DevOps V3
The Road to DevOps V3
 
Getting Started with DevOps
Getting Started with DevOpsGetting Started with DevOps
Getting Started with DevOps
 
DevOps
DevOpsDevOps
DevOps
 
Introduction to devops
Introduction to devopsIntroduction to devops
Introduction to devops
 
What Is DevOps, Really
What Is DevOps, ReallyWhat Is DevOps, Really
What Is DevOps, Really
 
Devops Online Training - Edubodhi
Devops Online Training - EdubodhiDevops Online Training - Edubodhi
Devops Online Training - Edubodhi
 
AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?
 
Tech breakfast at Lab49
Tech breakfast at Lab49Tech breakfast at Lab49
Tech breakfast at Lab49
 
DevOps for absolute beginners
DevOps for absolute beginnersDevOps for absolute beginners
DevOps for absolute beginners
 
Dev ops != Dev+Ops
Dev ops != Dev+OpsDev ops != Dev+Ops
Dev ops != Dev+Ops
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
Practical DevOps
Practical DevOpsPractical DevOps
Practical DevOps
 
DevOps! What, Why and How?
DevOps! What, Why and How?DevOps! What, Why and How?
DevOps! What, Why and How?
 
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP IndonesiaStrengthen and Scale Security Using DevSecOps - OWASP Indonesia
Strengthen and Scale Security Using DevSecOps - OWASP Indonesia
 
Scale security for a dollar or less
Scale security for a dollar or lessScale security for a dollar or less
Scale security for a dollar or less
 
DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!DevOps Dilemma - Make Dev work with Ops!
DevOps Dilemma - Make Dev work with Ops!
 
Test box bdd
Test box bddTest box bdd
Test box bdd
 
Tdd
TddTdd
Tdd
 
Agile, DevOps & Test
Agile, DevOps & TestAgile, DevOps & Test
Agile, DevOps & Test
 
Nyenrode Masterclass 'DevOps unraveled' Apr 18, 2016
Nyenrode Masterclass 'DevOps unraveled' Apr 18, 2016Nyenrode Masterclass 'DevOps unraveled' Apr 18, 2016
Nyenrode Masterclass 'DevOps unraveled' Apr 18, 2016
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

DevOps 及 TDD 開發流程哲學