Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Test Architecture for Global Platforms

milan
October 17, 2019

Test Architecture for Global Platforms

milan

October 17, 2019
Tweet

More Decks by milan

Other Decks in Technology

Transcript

  1. Markets N26 at a Glance +4M Customers 26 Markets +$500M

    Funding +$2Bn Monthly transaction volume 4 Locations +1300 Employees
  2. ⬒ 400+ engineers - Berlin/Barcelona/New York/Vienna ⬒ Deploying to production

    400+ times per week ⬒ Building crash-free mobile applications ⬒ Achieving regularly 5 stars in the App/Play Stores N26 is a tech company building modern banking worldwide @milan_kuveljic
  3. PRODUCT USER PAYMENTS SHARED DATA LAYER API TESTS COMPONENT INTEGRATION

    TESTS UNIT UI E2E TESTS PERFORMANCE SECURITY TESTS EXTERNAL/STUB SERVICE Testing in Monoliths
  4. If it’s big, hard to maintain and coordinate If it’s

    down, everything is down Performance slows down with complexity BadMono Innovation is difficult
  5. APPLICATION LAYER AUTH SERVICE 3RD PARTY SERVICE APPLICATION LAYER PAYMENT

    SERVICE APPLICATION LAYER PRODUCT SERVICE APPLICATION LAYER USER SERVICE
  6. For large and complex platforms CI/CD - easier deployment Better

    testability MicroBenefits Better reliability Technology independent
  7. 3RD PARTY/STUB SERVICE APPLICATION LAYER AUTH SERVICE APPLICATION LAYER USER

    SERVICE API COMPONENT INTEGRATION TESTS UNIT UI TESTS E2E CONTRACT TESTS PERFORMANCE TESTS SECURITY
  8. APPLICATION LAYER USER SERVICE BUILD & TEST SECURITY REPORT CONTRACT

    TEST VERIFICATION DOCKER BUILD & PUSH DEV ENV DEPLOY DEV ENV HEALTHCHECK DEV API TEST STAGING ENV DEPLOY STAGING ENV HEALTHCHECK STAGING API TEST PERFORMANCE TEST LIVE DEPLOY LIVE TEST
  9. BUILD SECURITY REPORT TEST DOCKER BUILD & PUSH DEV ENV

    DEPLOY TEST STAGING ENV DEPLOY INTEGRATION TEST UI TEST A11Y TEST E2E TEST LIVE DEPLOY
  10. Testing Challenges E2E tests are even more brittle Testing scope

    is constantly growing Region specific services are dependent on global services More regions require different deployment branches One app serves users in all regions Global services serve users in isolated regions
  11. val defaultCurrencyForRegion = when (Region.getRegion()) { Region.REGION_US -> Currency.getInstance("USD") else

    -> Currency.getInstance("EUR") companion object { lateinit var preUser: User lateinit var postUser: User private val regionBasedTestConfig = mapOf( Region.REGION_EU to RegionBasedTestConfig(ExternalIdType.IBAN, false, UserEntity.EU), Region.REGION_US to RegionBasedTestConfig(ExternalIdType.USBAN, true, UserEntity.US) Architecture Domain Test structure Test suites
  12. Architecture Test Data Configurable static test data Dynamic test data

    - API helpers ! users_europe.yml ! users_us.yml ! users_add_whatever_region.yml
  13. Capabilities of a specific tool Tool meets specific needs. Tool

    doesn’t seem to provide full test coverage Tool costs exceed the team budget Tools
  14. Takeaways • Layered test architecture • Structured test suites and

    scope • Consistent test data - static + dynamic • Clean environments across regions • Investment in testability • Leverage infrastructure and tools • Testing out-of-band UNIT TESTS INTEGRATION/COMPONENT TESTS E2E TESTS EXPLORATORY TESTING PERFORMANCE TESTS CONTRACT TESTS UI/VISUAL TESTS