Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Testing, automatización y otros secretos contra...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jano González
October 27, 2012
Programming
2
860
Testing, automatización y otros secretos contra el dolor de cabeza
Presentación para el Encuentro Linux 2012
Jano González
October 27, 2012
Tweet
Share
More Decks by Jano González
See All by Jano González
Containerizing your monolith
janogonzalez
0
480
Migrando a Microservicios
janogonzalez
1
330
Extracting services from a monolith
janogonzalez
3
280
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
510
Microservices in Practice
janogonzalez
7
710
Two programmers in one
janogonzalez
1
220
The Bipolar Programmer
janogonzalez
4
640
Ruby for your two internal programmers
janogonzalez
4
290
Ruby for Java minds
janogonzalez
4
1.1k
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
460
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
410
Unity6.3 AudioUpdate
cova8bitdots
0
130
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
280
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
210
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
110
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
2
280
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
170
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
860
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
320
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
260
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
290
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
440
Six Lessons from altMBA
skipperchong
29
4.2k
The SEO identity crisis: Don't let AI make you average
varn
0
410
The Mindset for Success: Future Career Progression
greggifford
PRO
0
280
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
210
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
150
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Done Done
chrislema
186
16k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.9k
Designing for Performance
lara
611
70k
KATA
mclloyd
PRO
35
15k
Transcript
testing, automatización y otros SECRETOS contra el dolor de cabeza
> el CHARLISTA
@janogonzalez
HopIn
@dynlangchile
> EL PROBLEMA
CH CH CH CHANGES
CAMBIO constante
CASTILLOS DE NAIPES
muchas tareas MANUALES
muchas tareas RUTINARIAS
propenso a ERRORES
SEÑALES DE HUMO
FEEDBACK TARDÍO
DOLOR DE CABEZA
PREVENIR ES MEJOR QUE CURAR
> CÓDIGO
APRENDE y USA LAS CONVECIONES
Ruby
Python
PHP
Java
> WTFM
Siempre CREA UN README
instrucciones para INSTALAR
UN EJEMPLO VALE MIL PALABRAS
DOCUMENTA CLASES y MÉTODOS
> BUILD
EL BUILD DEBE SER AUTOMÁTICO
make / rake / ant / etc...
> SCM
git
hg
svn
VERSIONA TODO
$ git init
$ git add README
$ git commit -m “Initial commit”
CREA COMMITS ATÓMICOS
$ git log --oneline 0e48171 Add password recovery to login
page 7b11d9b Create login page 69c32e9 Create project structure b543a0c Initial commit
usa buenos mensajes
$ git commit -m “Changes” ¡MAL!
$ git commit -m “Add password recovery in login” BIEN
$ git commit -m “CLOSE [84712] Add password recovery in
login” BIEN
USA bien LOS BRANCHES
$ git checkout -b password- recovery
$ git checkout -b wip-password- recovery
BRANCH PRINCIPAL DEPLOYABLE
USA LOS TAGS
$ git tag 1.0.0 -m “Initial release”
COMMIT EN FORMA TEMPRANA
PUSH EN FORMA TEMPRANA
> DEPENDENCIAS
MANEJO EN FORMA DECLARARTIVa
comportamiento predecible
<project> ... <dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId>
</dependency> </dependencies> ... </project> Maven
$ mvn clean install Maven
source 'https://rubygems.org' gem 'sinatra' gem 'json' gem 'sequel_pg', require: 'sequel'
gem 'koala' gem 'redis' gem 'mini_magick' gem 'aws-sdk' group :test do gem 'rack-test' end Bundler
$ bundle install Bundler
{ "require": { "monolog/monolog": "1.2.*" } } Composer
$ php composer.phar install Composer
> configuración
DATOS POR AMBIENTE
SEPARADO DEL ENTREGABLE
> TESTING
JUNIT / RSPEC / MOCHA / etc...
existen dos estrategias
UNITARIO / ACEPTACIÓN
PROBAR COMPONENTE AISLADO Unitario
CENTRADO en PROBAR UN FEATURE Aceptación
independiente
repetible
automatizado
> CI
Jenkins
CC
Travis
CREANDO BUILDS automáticos
Bajar código Compilar Ejecutar Pruebas Ejecutar Métricas Entregable
> DEPLOYMENT
cap
fab
CREANDO deploys automáticos
$ cap staging deploy cap
$ cap staging deploy:rollback cap
$ cap -s tag=1.0.0 production deploy cap
> Más ALLá
LEVANTAR AMBIENTES AUTOMÁTICAMENTE
> EJEMPLOS
> CONCLUSIONES
ACEPTA EL CAMBIO
AUTOMATIZA TODO LO QUe PUEDAS
OBTEN FEEDBACK TEMPRANO
Y SIEMPRE MEJORA
> ¡GRACIAS!
http://upload.wikimedia.org/wikipedia/commons/2/21/David_Bowie_Chile.jpg http://upload.wikimedia.org/wikipedia/commons/0/01/Card_castle6.JPG http://upload.wikimedia.org/wikipedia/commons/1/1c/Frederic_Remington_smoke_signal.jpg http://upload.wikimedia.org/wikipedia/commons/a/ad/Migraine.jpg