Continuous delivery : 2nd DevOps Pillar
CI = build and UT after code checkin
Six Principle
2.1.1 Build less than 5 min
2.1.2 Commit small bits
2.1.3 Don't leave the build broken
2.1.4 Trunk based development flow
2.1.5 Don't allow flaky test. Fix them
2.1.6 build should return status, log and artifact
CDelivery = CI + deploy at production like environment (staging) + automate integration testing + automate acceptance testing + smoke testing
Principles
2.2.1 Build artifact once
2.2.2 Artifact should be immutable
2.2.3 Deployment to production like environment = load balancers + n/w settings + security controls + data that matches production
2.2.4 stop if previous step fails
2.2.5 Deployment should be idempotent
CDeployment = CDelivery + Full automated testing + Deployed to production
For higher performances teams
* Less than 3 branch (ideally 1 branch)
* Their life span is less than a day and then merge to trunk.
It is not about how much you can deliver but it is about how little you can
CDelivery the build is not always release to production environment.
CDeployment, the build is always release to production environment.
Tools
Build Systems : Jenkins, Bamboo, Teamcity etc
Online build : Circle CI, Travis CI
Monitoring tool: Datadog
./hooks/git-pre-commit.hooks
webhooks : Notify external service with POST request about changes in repository.
Jenkins :
* We can add, remove steps in build "configure"
* We can add/remove plugins for different languages : C, Go etc
* We can configure those plugins using global tools configuration.
* Jenkins plugin repository https://plugins.jenkins.io/ We can add custom plugins. Plugins to notify on slack about build failure. Based on installed plugin we can get options in build
* Pipeline feature converts GUI to "build as code".
* BUILD_NUMBER is env. variable. We can add this number as tag and commit back to git repo for backward compatibility.
Test terms
* Shift Left : test at developer's machine by developer. Left side in L to R pipeline
* Test Fixture : e.g. sample data, Linux server configuration. They are also artifacts.
Test Philosophy
TDD: first right negative TCs
BDD: Tool Cucumber
ATD : Acceptance Test Driven
KDD: Keyword driven testing
Test Split
70 % Unit Testing
20 % Integration Testing
10 % E2E Testing
JQ is good tool to deal with JSON data
YQ converts YAML to JSON.
REST API Markup Language
Tools: Swagger, RAML ; abao, Mocha, chai are also relevant tools
GUI Testing
1. Selenium
2. Robot f/w
2.1 Selenium2Library is plugin for Robot f/w, that connects both.
2.2 PageObject design pattern
Dynamic Security Testing
1. Gauntlt : Given, When, Then conventions
2. arachni
3. nmap
4. Fortify
5. Vericode
6. Brakeman
7. Bundler
8. Audit
9. Retire.js
Reference
https://testing.googleblog.com
Crazy Fast Build: https://www.infoq.com/presentations/Crazy-Fast-Build-Times-or-When-10-Seconds-Starts-to-Make-You-Nervous
http://dan.bodar.com/2012/02/28/crazy-fast-build-times-or-when-10-seconds-starts-to-make-you-nervous/
Six Principle
2.1.1 Build less than 5 min
2.1.2 Commit small bits
2.1.3 Don't leave the build broken
2.1.4 Trunk based development flow
2.1.5 Don't allow flaky test. Fix them
2.1.6 build should return status, log and artifact
CDelivery = CI + deploy at production like environment (staging) + automate integration testing + automate acceptance testing + smoke testing
Principles
2.2.1 Build artifact once
2.2.2 Artifact should be immutable
2.2.3 Deployment to production like environment = load balancers + n/w settings + security controls + data that matches production
2.2.4 stop if previous step fails
2.2.5 Deployment should be idempotent
CDeployment = CDelivery + Full automated testing + Deployed to production
For higher performances teams
* Less than 3 branch (ideally 1 branch)
* Their life span is less than a day and then merge to trunk.
It is not about how much you can deliver but it is about how little you can
CDelivery the build is not always release to production environment.
CDeployment, the build is always release to production environment.
Tools
Build Systems : Jenkins, Bamboo, Teamcity etc
Online build : Circle CI, Travis CI
Monitoring tool: Datadog
./hooks/git-pre-commit.hooks
webhooks : Notify external service with POST request about changes in repository.
Jenkins :
* We can add, remove steps in build "configure"
* We can add/remove plugins for different languages : C, Go etc
* We can configure those plugins using global tools configuration.
* Jenkins plugin repository https://plugins.jenkins.io/ We can add custom plugins. Plugins to notify on slack about build failure. Based on installed plugin we can get options in build
* Pipeline feature converts GUI to "build as code".
* BUILD_NUMBER is env. variable. We can add this number as tag and commit back to git repo for backward compatibility.
Test terms
* Shift Left : test at developer's machine by developer. Left side in L to R pipeline
* Test Fixture : e.g. sample data, Linux server configuration. They are also artifacts.
Test Philosophy
TDD: first right negative TCs
BDD: Tool Cucumber
ATD : Acceptance Test Driven
KDD: Keyword driven testing
Test Split
70 % Unit Testing
20 % Integration Testing
10 % E2E Testing
JQ is good tool to deal with JSON data
YQ converts YAML to JSON.
REST API Markup Language
Tools: Swagger, RAML ; abao, Mocha, chai are also relevant tools
GUI Testing
1. Selenium
2. Robot f/w
2.1 Selenium2Library is plugin for Robot f/w, that connects both.
2.2 PageObject design pattern
Dynamic Security Testing
1. Gauntlt : Given, When, Then conventions
2. arachni
3. nmap
4. Fortify
5. Vericode
6. Brakeman
7. Bundler
8. Audit
9. Retire.js
Reference
https://testing.googleblog.com
Crazy Fast Build: https://www.infoq.com/presentations/Crazy-Fast-Build-Times-or-When-10-Seconds-Starts-to-Make-You-Nervous
http://dan.bodar.com/2012/02/28/crazy-fast-build-times-or-when-10-seconds-starts-to-make-you-nervous/
0 comments:
Post a Comment