Slide 1

Slide 1 text

VCS, Tests & CI For great good!

Slide 2

Slide 2 text

Version Control System (VCS) – If you don't use one, leave this room now! – Everything in VCS – Source Code – Tests – Application Configuration – Environment Configuration – Check-in regularly into master – Add proper message in every commit

Slide 3

Slide 3 text

Test, test, test ... ● It soon becomes too late!

Slide 4

Slide 4 text

Tests from A-Z – Unit Tests (< 5 min) – Smoke tests – Functional Tests: – Component Tests – Integration Tests – Acceptance Tests: – Subcutaneous Tests – UI Tests (< 1 hrs) – Non-functional Tests: – Load Test – Performance Test – Security Test

Slide 5

Slide 5 text

Test Pyramid Unit Tests Component Tests Integration Tests Subcutaneous Tests UI Tests Exploratory Testing

Slide 6

Slide 6 text

Exploratory Testing Unit Tests Component Tests Integration Tests Subcutaneous Tests UI Tests Ice cream cone (anti-pattern)

Slide 7

Slide 7 text

Commit stage tests – Kind of tests: – Unit test (Mockist / Classicist style) – Component tests – Functional tests – Smoke tests – Should be: – < 5 minutes – No real 3rd party access – No Databse – No External Services – 75% minimum code coverage – CRAP-iness < 30

Slide 8

Slide 8 text

Automate Acceptance Tests – Type of tests: – Integration Tests – Subcutaneous Tests – UI Tests – Requirements: – Less than 1 hrs – No external services – Business values – Cover at least 80%

Slide 9

Slide 9 text

Test Driven Development – Acceptance Test for every user story at the beginning – Cover at least on important happy path – Unit test before writing any line of code – At least 75% percent code coverage – Reduce code CRAP-iness < 30 – Change Risk Anti-Patterns – Run unit and component tests often – Do not comment tests except for a very valid reason – Do not remove tests except for a very valid reason

Slide 10

Slide 10 text

Continues Integration ● Who should be blamed!

Slide 11

Slide 11 text

What is CI? “Continuous integration (CI) is the practice, in software engineering, of merging all developer working copies with a shared mainline several times a day. It was first named and proposed by Grady Booch in his method,[1] who did not advocate integrating several times a day.” – wikipedia “Continues Integration represents a paradigm shift. Without continues integration , your software is broken until somebody proves it works, usually during a testing or integration stage.” –Continues devlivery “Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible.” – Martin fowler

Slide 12

Slide 12 text

What's good about CI? – Say goodbye to long and tense integrations – Increase visibility which enables greater communication – Catch issues fast and nip them in the bud – Spend less time debugging and more time adding features – Proceed in the confidence you’re building on a solid foundation – Stop waiting to find out if your code’s going to work – Reduce integration problems allowing you to deliver software more rapidly

Slide 13

Slide 13 text

Continues Integration – Run commit tests with every commit – Commit test should not take more that 10 minutes – Team should stop their job if tests are broken to fix – Smoke tests should run – Functional tests should run upon successful commit – Functional tests should run in parallel (< 2 hrs) – Non-functional tests should run at this stage Environment should be same as production

Slide 14

Slide 14 text

I want to do every thing in the world that can be done. Fanny Kemble