max yekaterinenko - magento 2 & quality

27
© 2016 Magento, Inc. All rights reserved. @maksek_ua

Upload: meet-magento-italy

Post on 16-Apr-2017

635 views

Category:

Presentations & Public Speaking


0 download

TRANSCRIPT

© 2016 Magento, Inc. All rights reserved.

@maksek_ua

© 2016 Magento, Inc. Page | 2© 2015 Magento, Inc. Page | 2

Why Quality?

© 2016 Magento, Inc. Page | 3

Magento 2 Platform Goals

M2

Modern Tech Stack

Improved

Performance &

Scalability

Streamline

Customization

Simplify External

Integrations

Easier

installation &

upgrades

High code

quality

& testing

© 2016 Magento, Inc. Page | 4

Code Quality & Testing

MerchantExtension developer

System Integrator Magento Commerce

© 2016 Magento, Inc. Page | 5

”For the first time, testing was fun”

© 2016 Magento, Inc. Page | 6

”For the first time, testing was fun”

© 2016 Magento, Inc. Page | 7© 2015 Magento, Inc. Page | 7

Magento 2 Test Types (a little bit technical)

© 2016 Magento, Inc. Page | 8

Unit Test

• Isolated

• Fast

• Mocks, Stubs, Doubles

• Distributed with Module

• PhpUnit https://phpunit.de/

© 2016 Magento, Inc. Page | 9

Integration and API

• “Black-box”

• Integration Framework >dev/tests/integration/framework

• Not fast

• PhpUnit

© 2016 Magento, Inc. Page | 10

Integration and API

© 2016 Magento, Inc. Page | 11

Unit vs Integration

© 2016 Magento, Inc. Page | 12

Static – clean code

• PHPMD

• PHPCS

• PHPCPD

• Magento-specific integrity tests

• >dev/tests/static/

© 2016 Magento, Inc. Page | 13

Performance

• JMeter

• End-To-End Scenarios

© 2016 Magento, Inc. Page | 14

Magento Testing Framework Fucntional Tests

• End user experience testing

• >dev/tests/functional/

• Selenium Webdriver (+Grid)

• Slow, very slow

© 2016 Magento, Inc. Page | 15

Magento Testing Frameworkhttp://devdocs.magento.com

© 2016 Magento, Inc. Page | 16

Magento Testing Framework

© 2016 Magento, Inc. Page | 17

Magento 2 Test Types

Acceptance

Functional

Performance

Static

Integration& API

Unit

© 2016 Magento, Inc. Page | 18

Magento 2 Test Coverage

Unit Tests Integration Web API Functional

16000+ CE4000+ EE

>35%

3200+ CE400+ EE

640+ CE50+ EE

300+ scenarios1000 documented

© 2016 Magento, Inc. Page | 19© 2015 Magento, Inc. Page | 19

Magento “Kitchen” (Secret Information)

© 2016 Magento, Inc. Page | 20

Magento 2 Quality Stack

© 2016 Magento, Inc. Page | 21

Code Review

© 2016 Magento, Inc. Page | 22

Continuous Integratoin & Continuous delivery (a.k.a. CICD) - Bamboo

© 2016 Magento, Inc. Page | 23

Bamboo Build and build jobs

© 2016 Magento, Inc. Page | 24

Manual Acceptance TestYes, we still do manual checks

© 2016 Magento, Inc. Page | 25

Community members – Travis CI

© 2016 Magento, Inc. Page | 26

Code Quality & Testing

MerchantExtension developer

System Integrator Magento Commerce

© 2016 Magento, Inc. Page | 27© 2015 Magento, Inc. Page | 27

Thank you! Questions?

@maksek_ua