[Code] Review for Test Automation Nicolae Oprean QA Technical - - PowerPoint PPT Presentation

code review for test automation
SMART_READER_LITE
LIVE PREVIEW

[Code] Review for Test Automation Nicolae Oprean QA Technical - - PowerPoint PPT Presentation

[Code] Review for Test Automation Nicolae Oprean QA Technical Expert Who am I? Nicolae Oprean QA Technical Expert at Ullink PhD in Computer Science Programmer (1y), Client Service (5y) and QA (6y) [Code] Review For Test Automation


slide-1
SLIDE 1

[Code] Review for Test Automation

Nicolae Oprean QA Technical Expert

slide-2
SLIDE 2

[Code] Review For Test Automation

Who am I?

Nicolae Oprean

❯ QA Technical Expert at Ullink ❯ PhD in Computer Science ❯ Programmer (1y), Client Service (5y) and QA (6y)

slide-3
SLIDE 3

[Code] Review For Test Automation

QA Paradigm Initial Problems

START

When I joined, we had 200 manual test cases stored in Excel files 1 year later => a portfolio of 1000+ (manual) test cases

slide-4
SLIDE 4

[Code] Review For Test Automation

Extracted smoke tests outside

  • f the full suite

5 QAs started automating

QA Paradigm Automation Focus

slide-5
SLIDE 5

[Code] Review For Test Automation

QA Paradigm What else can we do?

❯ Best practices stored in Confluence ❯ Do formal code reviews ❯ Integrate with Gerrit and GIT ❯ Request help from developers

slide-6
SLIDE 6

[Code] Review For Test Automation

Current QA Review Process

Both QAs and developers review test automation code 3D interaction between QA teams Cross-functional teams Test automation code is DAMP & DRY

slide-7
SLIDE 7

[Code] Review For Test Automation

Functional Knowledge Transfer (Higher Bus Factor) Improves Code Quality Technical Knowledge Transfer

Benefits of Code Review

Reduced Cost of Fixing Bugs

slide-8
SLIDE 8

[Code] Review For Test Automation

Rules for Code Review

This shall not be merged

  • 2

I would prefer this is not merged as it is

  • 1

I reviewed the change (partially or fully) but don’t have an opinion yet Looks good to me, but someone else must approve

+1

Reviews look good to me, approved

+2

slide-9
SLIDE 9

[Code] Review For Test Automation

Code Review Schema

slide-10
SLIDE 10

[Code] Review For Test Automation

Gerrit Dashboard

slide-11
SLIDE 11

[Code] Review For Test Automation

Foreman / Forewoman

Uncle Bob’s thoughts:

❯ Concept of the responsibilities on a construction site: the foreman’s role ❯ How this maps to software development, in particular to the code review process

Useful reading from Uncle Bob:

❯ Where is Foreman? ❯ Oh Foreman, Where art Thou? ❯ A Spectrum of Trust

slide-12
SLIDE 12

[Code] Review For Test Automation

Foreman Role Within Our Company

Started off with a small number of foremen Encouraged and supported people to do as much code review as possible across projects and technologies When the quality and quantity threshold was reached, people got appointed foreman Introduced a pre-merge code review tool called Gerrit Self-obviating system

slide-13
SLIDE 13

[Code] Review For Test Automation

Total Number

  • f Foreman
slide-14
SLIDE 14

[Code] Review For Test Automation

Gerrit Review Downsides

Initial problems ❯ Many reviews vs. too few people to approve ❯ Length of the process... ❯ Persisting frustration

slide-15
SLIDE 15

[Code] Review For Test Automation

Gerrit Review Tool Improvements

❯ Easy to be reviewed - Gerrit dashboard displays size

  • f commit

❯ Visibility - Integration with Slack ❯ Responsibility - Punish self-reviewers through cats

slide-16
SLIDE 16

[Code] Review For Test Automation

Review Tips

Criticize the code not the writer Avoid the “Why” questions… Ask questions rather than make statements… Remember that there is often more than one way to approach a solution… Suggest an improvement instead of saying code is bad Format your comments to be clean and readable Don’t rush through code review Help people to improve Remember to praise… Team commitment

slide-17
SLIDE 17

[Code] Review For Test Automation

Language Agnostic Rules 1 2 3 4

A patch must be small and relate to a single unit of work A class or method should have a single responsibility Methods must be clear and readable Code must be clean

slide-18
SLIDE 18

[Code] Review For Test Automation

Lessons Learned

Foster technical discussions Ask, don’t yell 

  • What do you think about … ?
  • Did you consider … ?
  • Can you clarify … ?

Avoid negativity … be positive “Why didn’t you just … ?” Follow a review checklist

  • Best Practices
  • Functionality
  • Complexity

Sustain a strong code review culture

  • Better Code
  • Better Developers
  • Team Ownership
  • Healthy Debate
slide-19
SLIDE 19

[Code] Review For Test Automation

Summary

Do Code Review with Developers DAMP & DRY Bus Factor Use an automated code review tool Shorten feedback loops Maintain lessons learned Share knowledge with others

slide-20
SLIDE 20

Questions?

Nicolae Oprean QA Technical Expert Twitter: @noprean Email: nicolae.oprean@ullink.com Linkedin: nicolae-oprean