Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

DISCLAIMER THIS PRESENTATION SHOWS HOW A COMPANY IS TRYING TO IMPLEMENT THE SHIFT-LEFT APPROACH FROM A TECHNICAL PERSPECTIVE. THIS WILL SHOW OUR APPROACH, STRUGGLES AND WHAT WE CAN SEE IS A GOOD PRACTICE BASED ON OUR CONTEXT.

Slide 3

Slide 3 text

Focus

Slide 4

Slide 4 text

Traditional Shift-Left Testing Image from https://www.katalon.com/resources-center/blog/shift-left-testing-approach/

Slide 5

Slide 5 text

Traditional Shift-Left Testing Image from https://www.katalon.com/resources-center/blog/shift-left-testing-approach/

Slide 6

Slide 6 text

How are we organized

Slide 7

Slide 7 text

How are we organized https://less.works Backend Engineers Frontend Engineers Quality Engineers TWO PAIRS OF SPECIALIZED ENGINEER PER TEAM DELIVERING CLOUD-NATIVE APPS

Slide 8

Slide 8 text

What we are trying to achieve

Slide 9

Slide 9 text

What we are trying to achieve What • Fast feedback Why • To deliver a reliable product How • Verifying all the stages automatically

Slide 10

Slide 10 text

What we are trying to achieve Actual We run our release in Waves because we have dependencies with different internal microservices. The “base” microservices are tested first, following the most used ones by the customer perspective in 3 different waves: • Wave 1: base microservices • Wave 2: most important microservices from the customer perspective • Wave 3: other microservices + frontend Release time: 1 week

Slide 11

Slide 11 text

What we are trying to achieve What we want We want to get rid of the Release Waves process by applying the Shift-Left Testing approach in all the possible ways. • No more 1-week testing • main branch deliverable any time • Fully continuous testing

Slide 12

Slide 12 text

Tests we do, and automate • Unit (backend, frontend) • Integration (backend, frontend) • Database testing • data migration • database upgrade • API • functional • e2e • Web

Slide 13

Slide 13 text

Previous approach Tests we do, and automate Unit Integration Database API Web Backend | Frontend Engineer Backend | Frontend Engineer Quality Engineer Quality Engineer Quality Engineer

Slide 14

Slide 14 text

Non-technical steps

Slide 15

Slide 15 text

Non-technical steps: be present • 3 amigos • “Heavy” refinements sessions • DoD of the User Stories • Fully tested in all required levels

Slide 16

Slide 16 text

Non-technical steps: be present User Story Acceptance Criteria e2e Integration Unit Shared decision to place the AC in the right level Acceptance Criteria

Slide 17

Slide 17 text

Non-technical steps: quality engineering • Quality Advocates • Works closely within the other technical + business roles • Technical Role • Coder in 4 different languages (Java, Typescript, Groovy, Bash) • Expertise in multiples technical areas • DevOps • Frontend • Backend

Slide 18

Slide 18 text

Automate first approach

Slide 19

Slide 19 text

Automate first approach • We write test automation for all the acceptance criteria (yes, all) • We choose the right level to automate • Heavy focus and coverage on the API layer • Anything manual become an automation script • Automation by the Quality Engineer in parallel with the backend | frontend engineers

Slide 20

Slide 20 text

Constant refactoring

Slide 21

Slide 21 text

Constant refactoring By analyzing the total test execution time, we do changes in the test automation framework to speed it up • Fast data ingestion • Smart use of base test classes • Avoiding unnecessary steps

Slide 22

Slide 22 text

Surrounding areas

Slide 23

Slide 23 text

Pipelines • Everything is a “pipeline” • Regular CI/CD pipeline • Execution of any manual steps/commands • Reaggregated test suite executions

Slide 24

Slide 24 text

Ephemeral environments • We have implemented the Ephemeral environment approach using Kubernetes • Spin up a full environment based on certain conditions • It allows us to create an environment based on: • any past version • the current in-development version • based on branches where we generate a docker image

Slide 25

Slide 25 text

Same process, some changes… Unit Integration Database API Web Backend | Frontend Engineer Backend | Frontend Engineer Quality Engineer Quality Engineer Quality Engineer Current approach

Slide 26

Slide 26 text

Current approach Same process, some changes… Unit Integration Database API Web Backend | Frontend Engineer Backend Engineer Frontend Engineer Quality Engineer Automatically done Quality Engineer Quality Engineer Yes, the Quality Engineers also write Integration Tests (API) moving the API Functional testes to the Integration layer

Slide 27

Slide 27 text

Current approach Same process, some changes… Unit Integration Database API Web Backend | Frontend Engineer Backend Engineer Frontend Engineer Quality Engineer Automatically done Quality Engineer Quality Engineer Automatically done in a pipeline that runs data migration and database upgrade during the merge process

Slide 28

Slide 28 text

Current approach Same process, some changes… Unit Integration Database API Web Backend | Frontend Engineer Backend Engineer Frontend Engineer Quality Engineer Automatically done Quality Engineer Quality Engineer Faster test suites by architectural changes in the testing framework + moving tests to the integration layer

Slide 29

Slide 29 text

What is our target

Slide 30

Slide 30 text

Our target Shift-Left Testing result Backend | Frontend Engineers push their changes Quality Engineers works in different levels, in parallel Multi Pipelines to test all the levels before merge

Slide 31

Slide 31 text

Are we there?

Slide 32

Slide 32 text

Are we there? NO! • Definition of OKRs to technical improvements • The environment is still a problem, but less troubled • Constant technical coach/mentoring in the Quality Engineers

Slide 33

Slide 33 text

LinkedIn | Twitter | GitHub. @eliasnogueira Blog. eliasnogueira.com Scam Me!