SlideShare a Scribd company logo
From Zero to One
How we evolved our test automation processes and
mindset in Deep Security
Copyright 2018 Trend Micro Inc.2
Introduction
Copyright 2018 Trend Micro Inc.4
What is Deep Security?
Copyright 2018 Trend Micro Inc.5
What is Deep Security?
Copyright 2018 Trend Micro Inc.6
Deep Security
• Deep Security is a collaborative effort between Taiwan and
Ottawa, with about 200 R&D people working on both sides
Copyright 2018 Trend Micro Inc.7
Deep Security
• Aside from the 12/13-hour communication gap, we also
have to work through the language and cultural barriers
• Since we are such a diverse team, we have to be able to
work together to release Deep Security
Copyright 2018 Trend Micro Inc.8
Automation in Deep Security
• I’ve been in the DS automation team since I joined Trend
about x years ago
• Over the years, automation has evolved from just a simple
test tool, to a team-wide integration of DevOps principles
• The revolution has been quite beautiful !
Copyright 2018 Trend Micro Inc.9
Automation in Deep Security
Deep Security Automation Framework
Copyright 2018 Trend Micro Inc.10
Automation in Deep Security
13000
test cases
Copyright 2018 Trend Micro Inc.11
Automation in Deep Security
release branch
feature branch
Copyright 2018 Trend Micro Inc.12
Automation in Deep Security
Copyright 2018 Trend Micro Inc.13
From Zero to One
Copyright 2018 Trend Micro Inc.14
Introducing the Rogue One team
• We are a 3-person team responsible for
– Install / upgrade automation
– Test case development
– Innovating automation practices
– Provide guidance for feature teams for anything related to automation
• In Ottawa, we have a counterpart called the Phoenix team
Copyright 2018 Trend Micro Inc.15
9.5
9.6
10.0
12.0
11.0
Established 2017
Copyright 2018 Trend Micro Inc.16
• Initial goal of our team is to revamp the existing install /
upgrade automation to make it more efficient, flexible and
user friendly
• So we made Lift.
Copyright 2018 Trend Micro Inc.17
Lift
Copyright 2018 Trend Micro Inc.18
Lift
Copyright 2018 Trend Micro Inc.19
Environment Creation
• The main parts of install / upgrade automation is to be able
to spin up a host on the fly for testing
• In the old system, this is done by having a pool of VMs (all
supported platforms has one VM), and keeping a CLEAN
snapshot of each VM
• Whenever a test is started, this VM is started up and
reverted to the CLEAN state
• Guess what kind of issues we had with this setup?
Copyright 2018 Trend Micro Inc.20
Environment Creation
• Issues:
– Only one test can run at a time
– Long test times
– If something fails and needs attention, other tests in sequence
cannot run
– If something needs updating, all snapshots need to be updated
Copyright 2018 Trend Micro Inc.21
Environment Creation
• Ansible is an open-source tool for environment
orchestration.
• Ansible can help you with config management, deployment
and task automation.
Copyright 2018 Trend Micro Inc.22
Ansible
• Why use Ansible?
– No Agent
• SSH / Python
• Fast deployment
– Use YAML
• Easy to understand
– Many available modules
– Open-source
– Small learning curve
– Ansible Tower
Copyright 2018 Trend Micro Inc.23
Test Case Frameworks
Copyright 2018 Trend Micro Inc.24
Test Cases Framework
• JUnit was the first test framework for DS
• It was initially made to create automation tests for the FW /
DPI feature
• Overtime, it grew to support all features of DS, including AM
• Without a proper PR process, it became too big, too dirty
(dependencies everywhere! !) and very hard to maintain
• So we made DSAF.
Copyright 2018 Trend Micro Inc.25
Test Cases Framework
• One of the reasons why we moved from JUnit to DSAF, is
because of flaky tests
• A test could fail ONCE out of 10x
• It’s a big problem especially when you run Nightly tests on
multiple combinations of environments
• How do you classify that test?
– Do you fix it?
– Do you remove it?
– What do you do with it?
Copyright 2018 Trend Micro Inc.26
Test Cases Framework
• Test Case Robustness
Copyright 2018 Trend Micro Inc.27
Test Cases Framework
Copyright 2018 Trend Micro Inc.28
Promote Solution to QA / SDET
Copyright 2018 Trend Micro Inc.29
Promote Solution
• The most difficult point is not task, it’s
human.
– Team member change
– Knowledge
– I have my own tool, script. That’s enough.
– Data analysis
– Fix once, solve everywhere
Copyright 2018 Trend Micro Inc.30
Promote Solution - Seed team
TaiwanCanada
Feature
Team
Feature
Team
Feature
Team
Feature
Team
Feature
Team
Feature
Team
Copyright 2018 Trend Micro Inc.31
Promote Solution - Continue
• Pull
– New features
– Utility, Tool and Report
• Push
– End old service
– Manager
Copyright 2018 Trend Micro Inc.32
How – Code Review
• Code Review
– Collaborator
– GitHub
Copyright 2018 Trend Micro Inc.33
How – Code Review
• Change Size
• Review Time < 1 hour
• Coding Rule
Copyright 2018 Trend Micro Inc.34
How – Code Review
Copyright 2018 Trend Micro Inc.35
How – Code Review
• Comment
• Code as Document
Copyright 2018 Trend Micro Inc.36
How – Continue
• Wiki
– Guide
– Document
– Help
• Jira Cases
Copyright 2018 Trend Micro Inc.37
Resource / Performance /
Dashboard for Environment
Copyright 2018 Trend Micro Inc.38
What issues we encountered
• Guess and Try
• Evidence
• Performance
Copyright 2018 Trend Micro Inc.39
Why dashboard
• Take aim & Focus
• Ignore detail information
• 2 dimensions for human
• Learning curve
• Sporadic
Copyright 2018 Trend Micro Inc.40
Tools
• Grafana
• InfluxDB
• Prometheus
• Jenkins
• ElasticSearch
Copyright 2018 Trend Micro Inc.41
Targets
• Disk
• Memory
• CPU
• Job queue
• Garbage
Copyright 2018 Trend Micro Inc.42
Auto Alert to Auto Fix
• Disk -> remove some files
• Memory, CPU -> record, scale up
• Job queue -> record, scale up
• Garbage -> remove it!
Copyright 2018 Trend Micro Inc.43
@app.route('/alert', methods=['POST'])
def get_alert():
j = request.get_json(force=True)
print j
return "SUCCESS"
Copyright 2018 Trend Micro Inc.44
Copyright 2018 Trend Micro Inc.45
Dashboard for Test Result
Copyright 2019 Trend Micro Inc.46
Test Result on Testrail…..
Copyright 2019 Trend Micro Inc.47
Test Result on Jenkins……
Copyright 2019 Trend Micro Inc.48
Jenkinis API
Python
Copyright 2019 Trend Micro Inc.49
What about the volume of logs?
Copyright 2019 Trend Micro Inc.50
Elasticsearch is a real-time distributed and open
source full-text search and analytics engine. It is
accessible from RESTful web service interface and
uses schema less JSON (JavaScript Object Notation)
documents to store data.
Copyright 2019 Trend Micro Inc.51
Push test results and logs to ES
Copyright 2019 Trend Micro Inc.52
DSL Query (Domain Specific Language)
POST _search
{
"query": {
"bool": {
"should": [
{
"match": {
"job_name":
"Lift/Integration/DSM_Upgrade/win2012R2x64_sql12_10_0"
}
}
]
}
}
}
Copyright 2019 Trend Micro Inc.53
Visualize data from ES
Copyright 2019 Trend Micro Inc.54
Root Cause Analysis
Copyright 2019 Trend Micro Inc.55
Copyright 2019 Trend Micro Inc.56
Copyright 2019 Trend Micro Inc.57
Data
Collection
What’s the
question we
want to ask?
A query for
answer the
question
Data
Visualization
Dashboard for
each question
How we made them…
Copyright 2018 Trend Micro Inc.58
Our Works
Copyright 2018 Trend Micro Inc.59
• Zero-Click
• Mothra
• Rose
Copyright 2018 Trend Micro Inc.60
Zero-Click
Copyright 2018 Trend Micro Inc.61
Zero-Click
• Have you wondered if your branch is sane enough to be merged to the
main branch?
• Have you wondered if the branches being merged into main branch are
safe?
• Have you ever encountered a bug after PR caused by a merge from a
buggy or untested branch?
• How much do you trust your own code?
Copyright 2018 Trend Micro Inc.62
Zero-Click
Copyright 2018 Trend Micro Inc.63
Zero-Click
Copyright 2018 Trend Micro Inc.64
Zero-Click
Copyright 2018 Trend Micro Inc.65
Zero-Click
• Runs smoke tests before merging code to main branch
• Auto-triggered for every PR, every commit
• Takes about 40 mins to run
• Failed 0-click job means a BUG, and will BLOCK your PR
• A guarantee that your branch is shippable
Copyright 2018 Trend Micro Inc.66
SonarQube
Copyright 2018 Trend Micro Inc.67
Zero-Click
• Zero-Click was the first collaboration between the automation teams in Taiwan
and Ottawa
• We spent 2 weeks, working closely together in one room in the Ottawa office
Copyright 2018 Trend Micro Inc.68
Consolidated Test Result (Mothra)
Copyright 2018 Trend Micro Inc.69
Multi pipelines across Canada & Taiwan
• Inconsistent data on TestRail
• Overview on all test environments
• The most important factors
– Build number
– Platform
– Feature
– More?
Copyright 2018 Trend Micro Inc.70
Issues
• Detail and Log
• New database or Existed database?
• ElasticSearch or PostgreSQL?
• How to push test result?
– Command line on multi-platform
• Dashboard for everyone, by everyone
Copyright 2018 Trend Micro Inc.71
Solution
Copyright 2018 Trend Micro Inc.72
Platform name
• TestRail Config ID
• Mothra ID
• Mapping table on every environment
• Mapping table on Mothra
– Allow strings
Copyright 2018 Trend Micro Inc.73
Copyright 2018 Trend Micro Inc.74
Big Data
Relationship of Source Code and Test System (ROSE !)
Copyright 2018 Trend Micro Inc.76
What are the problems ROSE is
trying to solve?
Copyright 2019 Trend Micro Inc.77
1. Where can I find the automation pipeline and test suite to test my code
change?
2. Are the tests from Zero-Click enough to test my code change (PR)?
3. Is it possible to find the relationship between the source code and the
existing tests so that we can determine which tests should run for the code
changes?
4. What’s the code coverage rate of our automation testing?
5. What are the features we don’t have tests for?
Copyright 2018 Trend Micro Inc.78
Automation
Pipelines
Run Test
Collect Test
Coverage Data
Mapping
Coverage Data
with Tests
Developer
Create a Pull
Request
Analyze Code
Change and
Recommend
Covered Tests
Run
Recommended
Tests Before the
Pull Request
Pass the
Tests and
Finish the
Pull Request
Copyright 2018 Trend Micro Inc.79
How do we find the relationship
between the source code and testing
in DSM?
Copyright 2019 Trend Micro Inc.80
Copyright 2018 Trend Micro Inc.81
Copyright 2018 Trend Micro Inc.82
Copyright 2018 Trend Micro Inc.83
COCO
Listener
COCO
Web
Service
COCO
Portal
COCO
Reports
Copyright 2018 Trend Micro Inc.84
Copyright 2018 Trend Micro Inc.85
How do we learn from data
collected by COCO?
Copyright 2019 Trend Micro Inc.86
MATT (Machine Determined Testing)
Copyright 2019 Trend Micro Inc.87
Multi-label classification
DSM Installation Anti-Malware
Copyright 2018 Trend Micro Inc.88
COCO
Java
File
Java
File
Java
File
MATT
Java
File
Java
File
Java
File
Unknown
Java files
Predicted Result
Copyright 2019 Trend Micro Inc.89
Result
Copyright 2019 Trend Micro Inc.90
Result (Cont.)
Copyright 2018 Trend Micro Inc.91
Copyright 2018 Trend Micro Inc.92
Data-Driven Decision Making
Copyright 2018 Trend Micro Inc.93
Code Coverage
Data
Decision/Learning
Increase Code
Coverage
Testing
Copyright 2018 Trend Micro Inc.94
https://code.fb.com/developer-tools/predictive-test-selection/
Copyright 2018 Trend Micro Inc.95
Copyright 2018 Trend Micro Inc.96
Code
Coverage
Copyright 2018 Trend Micro Inc.97
https://arxiv.org/abs/1810.05286
Copyright 2018 Trend Micro Inc.98
Product
Automation Testing
System Automation
Data Collection
Data Visualization
Data Analysis
Machine Learning
Microservices
Copyright 2018 Trend Micro Inc.99
Q&A
Copyright 2018 Trend Micro Inc.100

More Related Content

What's hot

Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise ScaleSecuring Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
DevOps.com
 
Blueprinting DevOps for Digital Transformation_v4
Blueprinting DevOps for Digital Transformation_v4Blueprinting DevOps for Digital Transformation_v4
Blueprinting DevOps for Digital Transformation_v4
Aswin Kumar
 
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
AgileNetwork
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
aspiresystem
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
aspiresystem
 
DevOps and the Case for ROI to Executives
DevOps and the Case for ROI to ExecutivesDevOps and the Case for ROI to Executives
DevOps and the Case for ROI to Executives
IBM UrbanCode Products
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
aspiresystem
 

What's hot (20)

intro to DevOps
intro to DevOpsintro to DevOps
intro to DevOps
 
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise ScaleSecuring Red Hat OpenShift Containerized Applications At Enterprise Scale
Securing Red Hat OpenShift Containerized Applications At Enterprise Scale
 
Blueprinting DevOps for Digital Transformation_v4
Blueprinting DevOps for Digital Transformation_v4Blueprinting DevOps for Digital Transformation_v4
Blueprinting DevOps for Digital Transformation_v4
 
Sendachi | 451 | GitHub Webinar: Demystifying Collaboration at Scale: DevOp...
Sendachi | 451 | GitHub Webinar: Demystifying Collaboration at Scale: DevOp...Sendachi | 451 | GitHub Webinar: Demystifying Collaboration at Scale: DevOp...
Sendachi | 451 | GitHub Webinar: Demystifying Collaboration at Scale: DevOp...
 
How to go from waterfall app dev to secure agile development in 2 weeks
How to go from waterfall app dev to secure agile development in 2 weeks How to go from waterfall app dev to secure agile development in 2 weeks
How to go from waterfall app dev to secure agile development in 2 weeks
 
SecDevOps: Development Tools for Security Pros
SecDevOps: Development Tools for Security ProsSecDevOps: Development Tools for Security Pros
SecDevOps: Development Tools for Security Pros
 
BUDDY White Paper
BUDDY White PaperBUDDY White Paper
BUDDY White Paper
 
Dependency Health: Removing the Barriers to Keeping Projects in Shape
Dependency Health: Removing the Barriers to Keeping Projects in ShapeDependency Health: Removing the Barriers to Keeping Projects in Shape
Dependency Health: Removing the Barriers to Keeping Projects in Shape
 
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
Agile Gurugram Conference 2020 | Keeping software secure in agile | Gurpreet ...
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Single pane of glass monitoring tool myth or reality
Single pane of glass monitoring tool   myth or realitySingle pane of glass monitoring tool   myth or reality
Single pane of glass monitoring tool myth or reality
 
Realize Unified Cloud Monitoring | The Devil’s in the Details
Realize Unified Cloud Monitoring | The Devil’s in the DetailsRealize Unified Cloud Monitoring | The Devil’s in the Details
Realize Unified Cloud Monitoring | The Devil’s in the Details
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
 
DevOps and the Case for ROI to Executives
DevOps and the Case for ROI to ExecutivesDevOps and the Case for ROI to Executives
DevOps and the Case for ROI to Executives
 
Developing a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps SuccessDeveloping a Testing Strategy for DevOps Success
Developing a Testing Strategy for DevOps Success
 
Aspire ppt - 01.06.15
Aspire   ppt - 01.06.15Aspire   ppt - 01.06.15
Aspire ppt - 01.06.15
 
Metrics to Power DevOps
Metrics to Power DevOpsMetrics to Power DevOps
Metrics to Power DevOps
 
Automated Governance
Automated GovernanceAutomated Governance
Automated Governance
 
How-To-Guide for Software Security Vulnerability Remediation
How-To-Guide for Software Security Vulnerability RemediationHow-To-Guide for Software Security Vulnerability Remediation
How-To-Guide for Software Security Vulnerability Remediation
 

Similar to From zero to one - How we evolved our test automation processes and mindset in Deep Security

Enabling Agility Through DevOps
Enabling Agility Through DevOpsEnabling Agility Through DevOps
Enabling Agility Through DevOps
Leland Newsom CSP-SM, SPC5, SDP
 
Fri benghiat gil-odsc-data-kitchen-data science to dataops
Fri benghiat gil-odsc-data-kitchen-data science to dataopsFri benghiat gil-odsc-data-kitchen-data science to dataops
Fri benghiat gil-odsc-data-kitchen-data science to dataops
DataKitchen
 

Similar to From zero to one - How we evolved our test automation processes and mindset in Deep Security (20)

Agile-plus-DevOps Testing for Packaged Applications
Agile-plus-DevOps Testing for Packaged ApplicationsAgile-plus-DevOps Testing for Packaged Applications
Agile-plus-DevOps Testing for Packaged Applications
 
Enabling Agility Through DevOps
Enabling Agility Through DevOpsEnabling Agility Through DevOps
Enabling Agility Through DevOps
 
Fri benghiat gil-odsc-data-kitchen-data science to dataops
Fri benghiat gil-odsc-data-kitchen-data science to dataopsFri benghiat gil-odsc-data-kitchen-data science to dataops
Fri benghiat gil-odsc-data-kitchen-data science to dataops
 
ODSC data science to DataOps
ODSC data science to DataOpsODSC data science to DataOps
ODSC data science to DataOps
 
Comcast Labs Connect - PHLAI Conference Philadelphia 2018
Comcast Labs Connect - PHLAI Conference Philadelphia 2018 Comcast Labs Connect - PHLAI Conference Philadelphia 2018
Comcast Labs Connect - PHLAI Conference Philadelphia 2018
 
QCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented DevelopmentQCon SF 2017 - Microservices: Service-Oriented Development
QCon SF 2017 - Microservices: Service-Oriented Development
 
Top Lessons Learned While Researching and Writing The DevOps Handbook
Top Lessons Learned While Researching and Writing The DevOps HandbookTop Lessons Learned While Researching and Writing The DevOps Handbook
Top Lessons Learned While Researching and Writing The DevOps Handbook
 
Microservices product development blueprint
Microservices product development blueprintMicroservices product development blueprint
Microservices product development blueprint
 
Veritas + MongoDB
Veritas + MongoDBVeritas + MongoDB
Veritas + MongoDB
 
Office 365 Monitoring Best Practices
Office 365 Monitoring Best PracticesOffice 365 Monitoring Best Practices
Office 365 Monitoring Best Practices
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
R+Hadoop - Ask Bigger (and New) Questions and Get Better, Faster Answers
R+Hadoop - Ask Bigger (and New) Questions and Get Better, Faster AnswersR+Hadoop - Ask Bigger (and New) Questions and Get Better, Faster Answers
R+Hadoop - Ask Bigger (and New) Questions and Get Better, Faster Answers
 
Ten10 Seminar: Test Automation, Tooling and the Future (slides)
Ten10 Seminar: Test Automation, Tooling and the Future (slides)Ten10 Seminar: Test Automation, Tooling and the Future (slides)
Ten10 Seminar: Test Automation, Tooling and the Future (slides)
 
DevOps Hits Adolescence – what’s next?
DevOps Hits Adolescence – what’s next?DevOps Hits Adolescence – what’s next?
DevOps Hits Adolescence – what’s next?
 
5 strategies for enterprise cloud infrastructure success
5 strategies for enterprise cloud infrastructure success5 strategies for enterprise cloud infrastructure success
5 strategies for enterprise cloud infrastructure success
 
Migrate to microservices
Migrate to microservicesMigrate to microservices
Migrate to microservices
 
9 Hyperion Performance Myths and How to Debunk Them
9 Hyperion Performance Myths and How to Debunk Them9 Hyperion Performance Myths and How to Debunk Them
9 Hyperion Performance Myths and How to Debunk Them
 
Who Broke My Cloud? SaaS Monitoring Best Practices
Who Broke My Cloud? SaaS Monitoring Best PracticesWho Broke My Cloud? SaaS Monitoring Best Practices
Who Broke My Cloud? SaaS Monitoring Best Practices
 
(R)evolutionize APM
(R)evolutionize APM(R)evolutionize APM
(R)evolutionize APM
 
Intelligent data summit: Self-Service Big Data and AI/ML: Reality or Myth?
Intelligent data summit: Self-Service Big Data and AI/ML: Reality or Myth?Intelligent data summit: Self-Service Big Data and AI/ML: Reality or Myth?
Intelligent data summit: Self-Service Big Data and AI/ML: Reality or Myth?
 

More from Jen-Chieh Ko

The right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
The right It : How to make your assumption - Agile HsinChu 2020 Mar GatheringThe right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
The right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
Jen-Chieh Ko
 

More from Jen-Chieh Ko (20)

RSG Taipei 2023 LeSS Design Principles
RSG Taipei 2023 LeSS Design PrinciplesRSG Taipei 2023 LeSS Design Principles
RSG Taipei 2023 LeSS Design Principles
 
Practical Testing Strategy for Agile Team
Practical Testing Strategy for Agile TeamPractical Testing Strategy for Agile Team
Practical Testing Strategy for Agile Team
 
O.R.I.D 初探 - 新竹敏捷分享.pdf
O.R.I.D 初探 - 新竹敏捷分享.pdfO.R.I.D 初探 - 新竹敏捷分享.pdf
O.R.I.D 初探 - 新竹敏捷分享.pdf
 
2021 台灣軟體測試現狀調查
2021 台灣軟體測試現狀調查2021 台灣軟體測試現狀調查
2021 台灣軟體測試現狀調查
 
Agile summit2021 - Talk About Exploratory Testing
Agile summit2021 - Talk About Exploratory TestingAgile summit2021 - Talk About Exploratory Testing
Agile summit2021 - Talk About Exploratory Testing
 
Stop Retrospective, Start Continuous Improving
Stop Retrospective, Start Continuous ImprovingStop Retrospective, Start Continuous Improving
Stop Retrospective, Start Continuous Improving
 
Mopcon 2021 Scrum 是新的死亡行軍嗎?
Mopcon 2021   Scrum 是新的死亡行軍嗎?Mopcon 2021   Scrum 是新的死亡行軍嗎?
Mopcon 2021 Scrum 是新的死亡行軍嗎?
 
啟動敏捷轉型的工具箱
啟動敏捷轉型的工具箱啟動敏捷轉型的工具箱
啟動敏捷轉型的工具箱
 
Exploratory testing survey in 2020
Exploratory testing survey in 2020Exploratory testing survey in 2020
Exploratory testing survey in 2020
 
如何把看板和 Scrum 發揮到極致
如何把看板和 Scrum 發揮到極致如何把看板和 Scrum 發揮到極致
如何把看板和 Scrum 發揮到極致
 
Agile Hsinchu 七月線上聚會: 我的教練旅程
Agile Hsinchu 七月線上聚會: 我的教練旅程Agile Hsinchu 七月線上聚會: 我的教練旅程
Agile Hsinchu 七月線上聚會: 我的教練旅程
 
The right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
The right It : How to make your assumption - Agile HsinChu 2020 Mar GatheringThe right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
The right It : How to make your assumption - Agile HsinChu 2020 Mar Gathering
 
Agile tourhsinchushare踩過的scrum event坑
Agile tourhsinchushare踩過的scrum event坑Agile tourhsinchushare踩過的scrum event坑
Agile tourhsinchushare踩過的scrum event坑
 
Design sprint experience at Trend Micro
Design sprint experience at Trend MicroDesign sprint experience at Trend Micro
Design sprint experience at Trend Micro
 
Container and Test Automation Management Practices in TrendMicro
Container and Test Automation Management Practices in TrendMicroContainer and Test Automation Management Practices in TrendMicro
Container and Test Automation Management Practices in TrendMicro
 
Design sprint sharing of DS team
Design sprint sharing of DS team Design sprint sharing of DS team
Design sprint sharing of DS team
 
Beer game-public
Beer game-publicBeer game-public
Beer game-public
 
Agile Summit Taipei 2019 - Agile Testing Strategy
Agile Summit Taipei 2019 - Agile Testing StrategyAgile Summit Taipei 2019 - Agile Testing Strategy
Agile Summit Taipei 2019 - Agile Testing Strategy
 
Agile HR at Titansoft
Agile HR at TitansoftAgile HR at Titansoft
Agile HR at Titansoft
 
Experience sharing-in-scrum
Experience sharing-in-scrumExperience sharing-in-scrum
Experience sharing-in-scrum
 

Recently uploaded

Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with StrimziStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 

From zero to one - How we evolved our test automation processes and mindset in Deep Security

  • 1. From Zero to One How we evolved our test automation processes and mindset in Deep Security
  • 2. Copyright 2018 Trend Micro Inc.2 Introduction
  • 3. Copyright 2018 Trend Micro Inc.4 What is Deep Security?
  • 4. Copyright 2018 Trend Micro Inc.5 What is Deep Security?
  • 5. Copyright 2018 Trend Micro Inc.6 Deep Security • Deep Security is a collaborative effort between Taiwan and Ottawa, with about 200 R&D people working on both sides
  • 6. Copyright 2018 Trend Micro Inc.7 Deep Security • Aside from the 12/13-hour communication gap, we also have to work through the language and cultural barriers • Since we are such a diverse team, we have to be able to work together to release Deep Security
  • 7. Copyright 2018 Trend Micro Inc.8 Automation in Deep Security • I’ve been in the DS automation team since I joined Trend about x years ago • Over the years, automation has evolved from just a simple test tool, to a team-wide integration of DevOps principles • The revolution has been quite beautiful !
  • 8. Copyright 2018 Trend Micro Inc.9 Automation in Deep Security Deep Security Automation Framework
  • 9. Copyright 2018 Trend Micro Inc.10 Automation in Deep Security 13000 test cases
  • 10. Copyright 2018 Trend Micro Inc.11 Automation in Deep Security release branch feature branch
  • 11. Copyright 2018 Trend Micro Inc.12 Automation in Deep Security
  • 12. Copyright 2018 Trend Micro Inc.13 From Zero to One
  • 13. Copyright 2018 Trend Micro Inc.14 Introducing the Rogue One team • We are a 3-person team responsible for – Install / upgrade automation – Test case development – Innovating automation practices – Provide guidance for feature teams for anything related to automation • In Ottawa, we have a counterpart called the Phoenix team
  • 14. Copyright 2018 Trend Micro Inc.15 9.5 9.6 10.0 12.0 11.0 Established 2017
  • 15. Copyright 2018 Trend Micro Inc.16 • Initial goal of our team is to revamp the existing install / upgrade automation to make it more efficient, flexible and user friendly • So we made Lift.
  • 16. Copyright 2018 Trend Micro Inc.17 Lift
  • 17. Copyright 2018 Trend Micro Inc.18 Lift
  • 18. Copyright 2018 Trend Micro Inc.19 Environment Creation • The main parts of install / upgrade automation is to be able to spin up a host on the fly for testing • In the old system, this is done by having a pool of VMs (all supported platforms has one VM), and keeping a CLEAN snapshot of each VM • Whenever a test is started, this VM is started up and reverted to the CLEAN state • Guess what kind of issues we had with this setup?
  • 19. Copyright 2018 Trend Micro Inc.20 Environment Creation • Issues: – Only one test can run at a time – Long test times – If something fails and needs attention, other tests in sequence cannot run – If something needs updating, all snapshots need to be updated
  • 20. Copyright 2018 Trend Micro Inc.21 Environment Creation • Ansible is an open-source tool for environment orchestration. • Ansible can help you with config management, deployment and task automation.
  • 21. Copyright 2018 Trend Micro Inc.22 Ansible • Why use Ansible? – No Agent • SSH / Python • Fast deployment – Use YAML • Easy to understand – Many available modules – Open-source – Small learning curve – Ansible Tower
  • 22. Copyright 2018 Trend Micro Inc.23 Test Case Frameworks
  • 23. Copyright 2018 Trend Micro Inc.24 Test Cases Framework • JUnit was the first test framework for DS • It was initially made to create automation tests for the FW / DPI feature • Overtime, it grew to support all features of DS, including AM • Without a proper PR process, it became too big, too dirty (dependencies everywhere! !) and very hard to maintain • So we made DSAF.
  • 24. Copyright 2018 Trend Micro Inc.25 Test Cases Framework • One of the reasons why we moved from JUnit to DSAF, is because of flaky tests • A test could fail ONCE out of 10x • It’s a big problem especially when you run Nightly tests on multiple combinations of environments • How do you classify that test? – Do you fix it? – Do you remove it? – What do you do with it?
  • 25. Copyright 2018 Trend Micro Inc.26 Test Cases Framework • Test Case Robustness
  • 26. Copyright 2018 Trend Micro Inc.27 Test Cases Framework
  • 27. Copyright 2018 Trend Micro Inc.28 Promote Solution to QA / SDET
  • 28. Copyright 2018 Trend Micro Inc.29 Promote Solution • The most difficult point is not task, it’s human. – Team member change – Knowledge – I have my own tool, script. That’s enough. – Data analysis – Fix once, solve everywhere
  • 29. Copyright 2018 Trend Micro Inc.30 Promote Solution - Seed team TaiwanCanada Feature Team Feature Team Feature Team Feature Team Feature Team Feature Team
  • 30. Copyright 2018 Trend Micro Inc.31 Promote Solution - Continue • Pull – New features – Utility, Tool and Report • Push – End old service – Manager
  • 31. Copyright 2018 Trend Micro Inc.32 How – Code Review • Code Review – Collaborator – GitHub
  • 32. Copyright 2018 Trend Micro Inc.33 How – Code Review • Change Size • Review Time < 1 hour • Coding Rule
  • 33. Copyright 2018 Trend Micro Inc.34 How – Code Review
  • 34. Copyright 2018 Trend Micro Inc.35 How – Code Review • Comment • Code as Document
  • 35. Copyright 2018 Trend Micro Inc.36 How – Continue • Wiki – Guide – Document – Help • Jira Cases
  • 36. Copyright 2018 Trend Micro Inc.37 Resource / Performance / Dashboard for Environment
  • 37. Copyright 2018 Trend Micro Inc.38 What issues we encountered • Guess and Try • Evidence • Performance
  • 38. Copyright 2018 Trend Micro Inc.39 Why dashboard • Take aim & Focus • Ignore detail information • 2 dimensions for human • Learning curve • Sporadic
  • 39. Copyright 2018 Trend Micro Inc.40 Tools • Grafana • InfluxDB • Prometheus • Jenkins • ElasticSearch
  • 40. Copyright 2018 Trend Micro Inc.41 Targets • Disk • Memory • CPU • Job queue • Garbage
  • 41. Copyright 2018 Trend Micro Inc.42 Auto Alert to Auto Fix • Disk -> remove some files • Memory, CPU -> record, scale up • Job queue -> record, scale up • Garbage -> remove it!
  • 42. Copyright 2018 Trend Micro Inc.43 @app.route('/alert', methods=['POST']) def get_alert(): j = request.get_json(force=True) print j return "SUCCESS"
  • 43. Copyright 2018 Trend Micro Inc.44
  • 44. Copyright 2018 Trend Micro Inc.45 Dashboard for Test Result
  • 45. Copyright 2019 Trend Micro Inc.46 Test Result on Testrail…..
  • 46. Copyright 2019 Trend Micro Inc.47 Test Result on Jenkins……
  • 47. Copyright 2019 Trend Micro Inc.48 Jenkinis API Python
  • 48. Copyright 2019 Trend Micro Inc.49 What about the volume of logs?
  • 49. Copyright 2019 Trend Micro Inc.50 Elasticsearch is a real-time distributed and open source full-text search and analytics engine. It is accessible from RESTful web service interface and uses schema less JSON (JavaScript Object Notation) documents to store data.
  • 50. Copyright 2019 Trend Micro Inc.51 Push test results and logs to ES
  • 51. Copyright 2019 Trend Micro Inc.52 DSL Query (Domain Specific Language) POST _search { "query": { "bool": { "should": [ { "match": { "job_name": "Lift/Integration/DSM_Upgrade/win2012R2x64_sql12_10_0" } } ] } } }
  • 52. Copyright 2019 Trend Micro Inc.53 Visualize data from ES
  • 53. Copyright 2019 Trend Micro Inc.54 Root Cause Analysis
  • 54. Copyright 2019 Trend Micro Inc.55
  • 55. Copyright 2019 Trend Micro Inc.56
  • 56. Copyright 2019 Trend Micro Inc.57 Data Collection What’s the question we want to ask? A query for answer the question Data Visualization Dashboard for each question How we made them…
  • 57. Copyright 2018 Trend Micro Inc.58 Our Works
  • 58. Copyright 2018 Trend Micro Inc.59 • Zero-Click • Mothra • Rose
  • 59. Copyright 2018 Trend Micro Inc.60 Zero-Click
  • 60. Copyright 2018 Trend Micro Inc.61 Zero-Click • Have you wondered if your branch is sane enough to be merged to the main branch? • Have you wondered if the branches being merged into main branch are safe? • Have you ever encountered a bug after PR caused by a merge from a buggy or untested branch? • How much do you trust your own code?
  • 61. Copyright 2018 Trend Micro Inc.62 Zero-Click
  • 62. Copyright 2018 Trend Micro Inc.63 Zero-Click
  • 63. Copyright 2018 Trend Micro Inc.64 Zero-Click
  • 64. Copyright 2018 Trend Micro Inc.65 Zero-Click • Runs smoke tests before merging code to main branch • Auto-triggered for every PR, every commit • Takes about 40 mins to run • Failed 0-click job means a BUG, and will BLOCK your PR • A guarantee that your branch is shippable
  • 65. Copyright 2018 Trend Micro Inc.66 SonarQube
  • 66. Copyright 2018 Trend Micro Inc.67 Zero-Click • Zero-Click was the first collaboration between the automation teams in Taiwan and Ottawa • We spent 2 weeks, working closely together in one room in the Ottawa office
  • 67. Copyright 2018 Trend Micro Inc.68 Consolidated Test Result (Mothra)
  • 68. Copyright 2018 Trend Micro Inc.69 Multi pipelines across Canada & Taiwan • Inconsistent data on TestRail • Overview on all test environments • The most important factors – Build number – Platform – Feature – More?
  • 69. Copyright 2018 Trend Micro Inc.70 Issues • Detail and Log • New database or Existed database? • ElasticSearch or PostgreSQL? • How to push test result? – Command line on multi-platform • Dashboard for everyone, by everyone
  • 70. Copyright 2018 Trend Micro Inc.71 Solution
  • 71. Copyright 2018 Trend Micro Inc.72 Platform name • TestRail Config ID • Mothra ID • Mapping table on every environment • Mapping table on Mothra – Allow strings
  • 72. Copyright 2018 Trend Micro Inc.73
  • 73. Copyright 2018 Trend Micro Inc.74 Big Data
  • 74. Relationship of Source Code and Test System (ROSE !)
  • 75. Copyright 2018 Trend Micro Inc.76 What are the problems ROSE is trying to solve?
  • 76. Copyright 2019 Trend Micro Inc.77 1. Where can I find the automation pipeline and test suite to test my code change? 2. Are the tests from Zero-Click enough to test my code change (PR)? 3. Is it possible to find the relationship between the source code and the existing tests so that we can determine which tests should run for the code changes? 4. What’s the code coverage rate of our automation testing? 5. What are the features we don’t have tests for?
  • 77. Copyright 2018 Trend Micro Inc.78 Automation Pipelines Run Test Collect Test Coverage Data Mapping Coverage Data with Tests Developer Create a Pull Request Analyze Code Change and Recommend Covered Tests Run Recommended Tests Before the Pull Request Pass the Tests and Finish the Pull Request
  • 78. Copyright 2018 Trend Micro Inc.79 How do we find the relationship between the source code and testing in DSM?
  • 79. Copyright 2019 Trend Micro Inc.80
  • 80. Copyright 2018 Trend Micro Inc.81
  • 81. Copyright 2018 Trend Micro Inc.82
  • 82. Copyright 2018 Trend Micro Inc.83 COCO Listener COCO Web Service COCO Portal COCO Reports
  • 83. Copyright 2018 Trend Micro Inc.84
  • 84. Copyright 2018 Trend Micro Inc.85 How do we learn from data collected by COCO?
  • 85. Copyright 2019 Trend Micro Inc.86 MATT (Machine Determined Testing)
  • 86. Copyright 2019 Trend Micro Inc.87 Multi-label classification DSM Installation Anti-Malware
  • 87. Copyright 2018 Trend Micro Inc.88 COCO Java File Java File Java File MATT Java File Java File Java File Unknown Java files Predicted Result
  • 88. Copyright 2019 Trend Micro Inc.89 Result
  • 89. Copyright 2019 Trend Micro Inc.90 Result (Cont.)
  • 90. Copyright 2018 Trend Micro Inc.91
  • 91. Copyright 2018 Trend Micro Inc.92 Data-Driven Decision Making
  • 92. Copyright 2018 Trend Micro Inc.93 Code Coverage Data Decision/Learning Increase Code Coverage Testing
  • 93. Copyright 2018 Trend Micro Inc.94 https://code.fb.com/developer-tools/predictive-test-selection/
  • 94. Copyright 2018 Trend Micro Inc.95
  • 95. Copyright 2018 Trend Micro Inc.96 Code Coverage
  • 96. Copyright 2018 Trend Micro Inc.97 https://arxiv.org/abs/1810.05286
  • 97. Copyright 2018 Trend Micro Inc.98 Product Automation Testing System Automation Data Collection Data Visualization Data Analysis Machine Learning Microservices
  • 98. Copyright 2018 Trend Micro Inc.99 Q&A
  • 99. Copyright 2018 Trend Micro Inc.100