Slide 1

Slide 1 text

http://images.meredith.com/wood/images/p_411_1_1.gif Prácticas de desarrollo de software de alta calidad

Slide 2

Slide 2 text

Slide 3

Slide 3 text

Ingeniero en Computación @ CUCEI Senior Consultant @ MagmaLabs http://ferperales.net Promotor @ FLOSS Apasionado @ Desarrollo Web

Slide 4

Slide 4 text

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Marzo 2017

Slide 16

Slide 16 text

Slide 17

Slide 17 text

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

http://cwebhealth.com/wp-content/uploads/2013/12/need-want-like-keys- showing-craving-and-desire_GyMuC-vu-702x336.jpg REQUERIMIENTOS

Slide 20

Slide 20 text

Entregar el software correcto

Slide 21

Slide 21 text

Specification by example

Slide 22

Slide 22 text

“Es un enfoque colaborativo para definir requetimientos y pruebas funcionales orientadas al negocio para productos de software con base en capturar e ilustrar los requerimientos usando ejemplos reales en lugar de sentencias abstractas”

Slide 23

Slide 23 text

Traducimos esto:

Slide 24

Slide 24 text

http://www.pmscs.net/images/Client.png Quiero que mi sistema tenga un Login de usuarios

Slide 25

Slide 25 text

En Esto:

Slide 26

Slide 26 text

Feature: Login In order to use the application As a user I want to be able to login Scenario: with invalid credentials Given I visit the / page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be shown a message error Scenario: with valid credentials Given I have created an account in the past And I visit the /events page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be redirected to events page

Slide 27

Slide 27 text

Gherkin!

Slide 28

Slide 28 text

“Es un lenguaje de dominio específico, leíble desde el lago de negocios que permite describir el funcionamiento del software sin detallar cómo será implementado”

Slide 29

Slide 29 text

Ya que Tenemos Lo que necesitamos

Slide 30

Slide 30 text

Manejo del proyecto http://www.targetprocess.com/blog/wp-content/uploads/2014/06/Kanban-with-time.jpg

Slide 31

Slide 31 text

“Una holística y flexicle estrategia de desarrollo de producto donde un equipo de desarrollo trabaja como una unidad para alcanzar un objetivo común "

Slide 32

Slide 32 text

Tres roles: http://braintrustgroup.com/assets/2012/09/SM-TM-PO-3pigs-01.png

Slide 33

Slide 33 text

Team Members: hacen las cosas

Slide 34

Slide 34 text

Product Owners: Representan la voz del cliente

Slide 35

Slide 35 text

Scrum master: Se asegura de que todo marche sobre ruedas

Slide 36

Slide 36 text

Product backlog

Slide 37

Slide 37 text

“Una comprensible lista de tareas, expresadas en orden de importancia para el negocio y cuánto valor aportan al mismo”

Slide 38

Slide 38 text

Herramientas

Slide 39

Slide 39 text

Sistema de Control de Versiones http://blog.laaz.org/tech/wp-content/uploads/2011/08/git-tree.png

Slide 40

Slide 40 text

“Un sistema que guarda los cambios hechos a un archivo o conjunto de archivos a través del tiempo”

Slide 41

Slide 41 text

Herramientas

Slide 42

Slide 42 text

Pruebas http://venturebeat.com/wp-

Slide 43

Slide 43 text

Pruebas unitarias

Slide 44

Slide 44 text

“Una metodología de pruebas de software en la que las unidades individuales de código son probadas para determinar si son aptas para ser utilizadas”

Slide 45

Slide 45 text

Herramientas

Slide 46

Slide 46 text

class User < ActiveRecord::Base # Método que prueba si un usuario tiene una cuenta de @magmalabs.io def has_magmalabs_account? !!self.email.match(/@magmalabs.io$/) end end

Slide 47

Slide 47 text

require 'rails_helper' describe User do let(:user_with_magmalabs_account) { User.create email: '[email protected]' } let(:user_with_gmail_account) { User.create email: '[email protected]' } describe '.has_magmalabs_account?' do it 'returns true when email ends with "@magmalabs.io"' do expect( user_with_magmalabs_account.has_magmalabs_account? ).to be true end it 'returns false when email ends with "other domain"' do expect( user_with_gmail_account.has_magmalabs_account? ).to be false end end end

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Pruebas de Integración

Slide 50

Slide 50 text

“La fase de pruebas de software en la cual las unidades individuales se combinan y prueban como un grupo”

Slide 51

Slide 51 text

Herramientas

Slide 52

Slide 52 text

Desarrollo basado En comportamiento

Slide 53

Slide 53 text

“Un método de pruebas en el que se utilizan ejemplos para describir el comportamiento de la aplicación o el comportamiento de la misma”

Slide 54

Slide 54 text

¿Recuerdan esto?

Slide 55

Slide 55 text

Feature: Login In order to use the application As a user I want to be able to login Scenario: with invalid credentials Given I visit the / page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be shown a message error Scenario: with valid credentials Given I have created an account in the past And I visit the /events page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be redirected to events page

Slide 56

Slide 56 text

¡Se puede convertir en código!

Slide 57

Slide 57 text

Feature: Login In order to use the application As a user I want to be able to login Scenario: with invalid credentials Given I visit the / page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be shown a message error Scenario: with valid credentials Given I have created an account in the past And I visit the /events page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be redirected to events page

Slide 58

Slide 58 text

Given(/^I visit the (.*) page$/) do |page| visit page end

Slide 59

Slide 59 text

Feature: Login In order to use the application As a user I want to be able to login Scenario: with invalid credentials Given I visit the / page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be shown a message error Scenario: with valid credentials Given I have created an account in the past And I visit the /events page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be redirected to events page

Slide 60

Slide 60 text

And(/^I have entered (.*) as my username$/) do |username| fill_in 'user[login]', with: username end And(/^I have entered (.*) as my password$/) do |password| fill_in 'user[password]', with: password end

Slide 61

Slide 61 text

Feature: Login In order to use the application As a user I want to be able to login Scenario: with invalid credentials Given I visit the / page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be shown a message error Scenario: with valid credentials Given I have created an account in the past And I visit the /events page And I have entered demo as my username And I have entered demo1234 as my password When I press Sign in Then I will be redirected to events page

Slide 62

Slide 62 text

Given(/^I have created an account in the past$/) do @user = FactoryGirl.create :user, username: 'demo', password: 'demo1234' End Then(/^I will be shown a message error$/) do expect(page).to have_content 'Invalid login or password.' end When(/^I press Sign in$/) do click_button 'Sign in' end Then(/^I will be redirected to home page$/) do expect(page).to have_content 'Login successful' end Then(/^I will be redirected to (.*) page$/) do |url| path = URI.parse(current_url).path expect(path).to match "/#{url}" end

Slide 63

Slide 63 text

Herramientas

Slide 64

Slide 64 text

Pruebas multinavegador

Slide 65

Slide 65 text

Tools

Slide 66

Slide 66 text

Lanzamiento http://i.dawn.com/primary/2013/06/51b99d8da936d.jpg

Slide 67

Slide 67 text

Platform as A Service (PaaS)

Slide 68

Slide 68 text

Servicios

Slide 69

Slide 69 text

Virtual Private Servers (VPS)

Slide 70

Slide 70 text

Servicios

Slide 71

Slide 71 text

Herramientas

Slide 72

Slide 72 text

role :demo, %w{example.com example.org example.net} task :uptime do on roles(:demo), in: :parallel do |host| uptime = capture(:uptime) puts "#{host.hostname} reports: #{uptime}" end end

Slide 73

Slide 73 text

Hacer un deploy es tán fácil como correr:

Slide 74

Slide 74 text

cap production deploy

Slide 75

Slide 75 text

Continuos integration/ delivery/ deployment

Slide 76

Slide 76 text

“Continuous Integration is the practice of merging development work with a Master/Trunk/Mainline branch constantly so that you can test changes, and test that changes work with other changes” http://blog.assembla.com/AssemblaBlog/tabid/12618/bid/92411/Continu ous-Delivery-vs-Continuous-Deployment-vs-Continuous-Integration-Wait- huh.aspx

Slide 77

Slide 77 text

“Continuous Delivery is the continual delivery of code to an environment once the developer feels the code is ready to ship.” http://blog.assembla.com/AssemblaBlog/tabid/12618/bid/92411/Continu ous-Delivery-vs-Continuous-Deployment-vs-Continuous-Integration-Wait- huh.aspx

Slide 78

Slide 78 text

“Continuous Deployment is the deployment or release of code to Production as soon as it is ready” http://blog.assembla.com/AssemblaBlog/tabid/12618/bid/92411/Continu ous-Delivery-vs-Continuous-Deployment-vs-Continuous-Integration-Wait- huh.aspx

Slide 79

Slide 79 text

Herramientas

Slide 80

Slide 80 text

Calidad de código http://www.pts-qc.com/images/AUDITING.jpg

Slide 81

Slide 81 text

Code review

Slide 82

Slide 82 text

Herramientas

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

Métricas de código

Slide 85

Slide 85 text

Herramientas

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

Analizadores sintácticos

Slide 88

Slide 88 text

Rubocop CSSLinter JSHint Hound CI Herramientas

Slide 89

Slide 89 text

scss_files: "**/*.scss" linters: BangFormat: enabled: true space_before_bang: true space_after_bang: false BorderZero: enabled: true convention: zero # or `none` ColorKeyword: enabled: true ColorVariable: enabled: true Comment: enabled: true DebugStatement: enabled: true

Slide 90

Slide 90 text

No content

Slide 91

Slide 91 text

Mantenimiento http://www.mengsolutions.com.au/wp-

Slide 92

Slide 92 text

Reporte de errores

Slide 93

Slide 93 text

Herramientas

Slide 94

Slide 94 text

No content

Slide 95

Slide 95 text

Disponibilidad del sitio

Slide 96

Slide 96 text

Herramientas

Slide 97

Slide 97 text

No content

Slide 98

Slide 98 text

Hasta ahora sólo he hablado sobre herramientas y metodologías

Slide 99

Slide 99 text

Pero lo más Importante es

Slide 100

Slide 100 text

http://magmalabs.io/ about-us

Slide 101

Slide 101 text

“El software de alta calidad es creado por personas que se preocupan y aman su trabajo”

Slide 102

Slide 102 text

¿Preguntas?

Slide 103

Slide 103 text

¡Gracias! [email protected]