19/11
Notes by John C - come say hi at the eWAY stand!
@akent99 http://alankent.me
Magento 2 Integration
Integration points for Magento
- PIM
- SaaS (MailChimp, ShippingHQ)
- Buy buttong (FB, Twitter)
- Native App
- IoT
Magento 2 has easy APIs
- Service contracts - use PHP interface, Magento deals with formatting (REST, SOAP, etc) & Auth
Authentication options
- JavaScript - Session cookie
- Mobile apps - usename, password, token
- Enterprise - OAuth, etc.
APIs already available
- Catalog, Search, Cart, Tax, Order, Customer
- More to come
Use APIs/Service Contracts for cross-module communitcation
- Use for payments? checkoutPaymentInformationManagement
AMQP messaging support
- M2 EE only
- Also use service contracts
- Receive only at the moment, no reply
Future Explorations (maybe coming soon)
- Synchorous MQ (in & out)
- Outbound REST & SOAP
- Webhooks
@maksek_ua
Quality & Magento 2
Who wants code quality & testing? - everyone (Merchants, developers, integrators)
Test Types - Acceptance, functional, performance, static, unit
Unit test - fast, phpunit
Integration testing very slow, rollback or reload DB after every test
Static
- PHPMD, PHPCS, PHPCPD
- Magento specific
dev/tests/static
Perfomance
- JMeter
- Internal to Magento testing only
Functional tests
- Magento Testing Framework (MTF)
- Selenium
- XML scenarios
<scenario> <step> <step> </scenario>
dev/tests/functional
- Slow, very slow
Stats!
- 20K+ unit tests in M2 (35% coverage) - better than Magento 1 (0%)!
- 3600+ integration tests
- 700+ Web API tests
- 300+ functional scenarios (1000 are documented)
Magento 2 all Atlassian! Fisheye, JIRA, Bamboo
GitHub PR links to JIRA task
Dozens of CI test suites (composer install, package install, CE/EE)
AND Travis via GitHub
Will code tests be a criteria for Magento Marketplace testing?
- Someone else had the same thought - Max says yes
Why OAuth 1.0a, not newer versions?
- Because it is already there (feel free to PR)
Magento 1 SOAP is not properly compliant (hard to use with Java), is M2 better?
- There is some alternate code testing, maybe need more.
- Adding more binding variations easily (yay service contracts)
How do you put tests in your extension?
- Test in separate package. Use Namespaces. Integration & functional tests need work
Does Magento plan out of the box API integrations?
- Not sure how much Magento should do - at the moment no
Are there any M2 security tests?
- There are scans & audits. Marketplace extensions must also pass security tests.