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
Jano González
October 27, 2012
Programming
860
2
Share
Testing, automatización y otros secretos contra el dolor de cabeza
Presentación para el Encuentro Linux 2012
Jano González
October 27, 2012
More Decks by Jano González
See All by Jano González
Containerizing your monolith
janogonzalez
0
490
Migrando a Microservicios
janogonzalez
1
340
Extracting services from a monolith
janogonzalez
3
290
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
520
Microservices in Practice
janogonzalez
7
720
Two programmers in one
janogonzalez
1
230
The Bipolar Programmer
janogonzalez
4
650
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
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
実用!Hono RPC2026
yodaka
2
310
AIと共に生きる技術選定 2026
sgash708
0
140
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
3k
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
770
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
420
My daily life on Ruby
a_matsuda
3
320
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
170
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.9k
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1.1k
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
460
Ethics towards AI in product and experience design
skipperchong
2
270
A Modern Web Designer's Workflow
chriscoyier
698
190k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Agile that works and the tools we love
rasmusluckow
331
21k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
540
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