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 el dolor de cabeza
Search
Jano González
October 27, 2012
Programming
2
830
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
200
Migrando a Microservicios
janogonzalez
1
230
Extracting services from a monolith
janogonzalez
3
240
¿Después de 10 años, realmente entiendo esta industria?
janogonzalez
3
390
Microservices in Practice
janogonzalez
7
610
Two programmers in one
janogonzalez
1
120
The Bipolar Programmer
janogonzalez
4
560
Ruby for your two internal programmers
janogonzalez
4
200
Ruby for Java minds
janogonzalez
4
950
Other Decks in Programming
See All in Programming
GitHub Copilot Tips and Tricks
yuichielectric
26
7.4k
AppDeveloperCon 2024 EU: Building polyglot developer experiences in 2024
salaboy
0
370
両面どころかインフラもTSでできるよ ~ 全方位TypeScriptによるプロダクト開発 ~
myfinder
8
2.2k
Dockerで始めるAWS Lambda開発
stutkhd0709
13
2.5k
The Future of C++ Interoperability: Insights from Porting a Game to Swift
teamhimeh
0
260
もうすぐ新年度、Babylon.jsがお勧めな3個の理由
hideg
0
160
コミュニティに参加したことで起きた変化
ohmori_yusuke
3
130
マイ隙間家具OSSたちのご紹介
karupanerura
2
150
TDDと今まで
kanayannet
0
140
Understanding Ast By Looking
inouehi
0
120
決断するための勇気、そのためのBacklog / Courage to make decisions, Backlog for that.
seike460
PRO
4
1.9k
オブジェクトしこう
okuramasafumi
2
130
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
215
8.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.4k
Testing 201, or: Great Expectations
jmmastey
27
6.3k
The Brand Is Dead. Long Live the Brand.
mthomps
48
21k
A designer walks into a library…
pauljervisheath
199
23k
4 Signs Your Business is Dying
shpigford
174
21k
The Pragmatic Product Professional
lauravandoore
24
5.7k
Principles of Awesome APIs and How to Build Them.
keavy
119
16k
RailsConf 2023
tenderlove
0
510
Designing for Performance
lara
601
67k
What's in a price? How to price your products and services
michaelherold
236
11k
It's Worth the Effort
3n
180
27k
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