{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":["typography","box","badge"]},"redocly_category":"Articles","type":"markdown"},"seo":{"title":"Sticking to a principle","description":"Principles matter. For any group, of any size, principles bring clarity, they provide a sense of purpose and they offer direction when the road ahead is difficult or complex.","siteUrl":"https://docs.worldpay.com/access","image":"/access/assets/worldpay-logo-light.21b7daf79984773a9fcd7d4fbcb07ae5289dfffd6023c4c3dca720c7058e53dc.33f780a6.svg","keywords":"documentation, api, openapi, sdks, developer, payments, json, payouts, 3ds","jsonLd":{"@context":"https://schema.org","@type":"Organization","url":"https://docs.worldpay.com/access","name":"Worldpay"},"meta":[{"name":"google-site-verification","content":"zjziIKaP3ImsqsfhYnEBnq1R85UabiSwl7HTXuwtZuo"},{"name":"doc_product","content":"Access"},{"name":"doc_category","content":"Documentation"}],"llmstxt":{"hide":false,"sections":[{"title":"Payments API","description":"Payment orchestration API combining fraud assessment, 3ds authentication, SCA exemptions, Worldpay Token creation and a card or wallet based payment.","includeFiles":["products/payments/@20240601/**/*"],"excludeFiles":[]},{"title":"Payment Queries API","description":"Querying your payments data, based on a variety of parameters.","includeFiles":["products/payment-queries/@v1/**/*"],"excludeFiles":[]},{"title":"Card BIN Data API","description":"Provides detailed information about a card.","includeFiles":["products/card-bin/@v1/**/*"],"excludeFiles":[]},{"title":"3DS Authentication API","description":"Request 3DS authentication to protect against fraud, be SCA compliant and to shift liability using this standalone API.","includeFiles":["products/3ds/@v3/**/*"],"excludeFiles":[]},{"title":"FraudSight API","description":"Request a risk assessment and receive a response with an outcome (e.g. lowRisk) using this standalone API.","includeFiles":["products/fraudsight/@v1/**/*"],"excludeFiles":[]},{"title":"Checkout SDK","description":"Integrate using our clientside SDKs for both web and native devices. Benefit from SAQ-A/PCI-SSF compliance.","includeFiles":["products/checkout/web/@v2/**/*","products/checkout/ios/@v4/**/*","products/checkout/android/@v4/**/*","products/checkout/react-native/@v3/**/*","products/checkout/flutter/@v1/**/*"],"excludeFiles":[]},{"title":"Tokens API","description":"Minimizes the exposure of sensitive card details and increases the security of your customer's card details.","includeFiles":["products/tokens/@v3/**/*"],"excludeFiles":[]},{"title":"Card Payments API","description":"Request a card payment using this standalone API, requires separate requests for 3DS, Fraud assessment etc.","includeFiles":["products/card-payments/@v7/**/*"],"excludeFiles":[]},{"title":"Card Verifications API","description":"Verify your customer's card to maximize your authentication rates.","includeFiles":["products/card-verifications/@v6/**/*"],"excludeFiles":[]},{"title":"Account Payouts API","description":"Send funds to your customer's bank accounts and search for payouts using parameters.","includeFiles":["products/account-payouts/@20250101/**/*"],"excludeFiles":[]},{"title":"APMs","description":"Pay using eWallets, bank transfers, direct debits, local card schemes, Postpay and eInvoice/ Buy Now Pay Later.","includeFiles":["products/apms/@20240701/**/*"],"excludeFiles":[]},{"title":"Balance API","description":"Request your account details for a single account or all accounts under an entity.","includeFiles":["products/balance/@20250101/**/*"],"excludeFiles":[]},{"title":"Card Payouts API","description":"Send funds to your customer's cards.","includeFiles":["products/card-payouts/@v4/**/*"],"excludeFiles":[]},{"title":"Events (Webhooks)","description":"Receive status updates from Access Worldpay by setting up a webhook.","includeFiles":["products/events/@v1/**/*"],"excludeFiles":[]},{"title":"FX API","description":"Manage Foreign Exchange (FX) on your payments.","includeFiles":["products/fx/@v1/**/*"],"excludeFiles":[]},{"title":"Hosted Payment Pages (HPP) API","description":"Our low-code option to take payments securely at the lowest PCI compliance level - SAQ A.","includeFiles":["products/hosted-payment-pages/@v1/**/*"],"excludeFiles":[]},{"title":"Money Transfers API","description":"Money Transfer OCTs (Original Credit Transaction) allow funds to be pushed to an eligible card in 30 minutes or less.","includeFiles":["products/money-transfers/@v1/**/*"],"excludeFiles":[]},{"title":"Parties API","description":"Create parties, manage your payout instruments and beneficial owners and carry out identity verification checks.","includeFiles":["products/parties/@20250101/**/*"],"excludeFiles":[]},{"title":"SCA Exemptions API","description":"Maximize a frictionless checkout experience by using issuer data insights to apply exemptions.","includeFiles":["products/sca-exemptions/@v1/**/*"],"excludeFiles":[]},{"title":"Split Payments API","description":"Divide funds from a single payment amongst yourself and your parties/sellers.","includeFiles":["products/split-payments/@20250625/**/*"],"excludeFiles":[]},{"title":"Statements API","description":"Retrieve your account statement and see individual entries for all credits and debits.","includeFiles":["products/statements/@20250101/**/*"],"excludeFiles":[]},{"title":"Transfers API","description":"Transfer funds from source account to target account.","includeFiles":["products/transfers/@20250101/**/*"],"excludeFiles":[]},{"title":"Verified Tokens API","description":"Verified Tokens ensures that your customer's payment details are valid and CIT compliant when creating a token.","includeFiles":["products/verified-tokens/@v3/**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Typography","attributes":{"fontSize":"1.2em","as":"div"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/articles"},"children":["← Back to articles list"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"sticking-to-a-principle","__idx":0},"children":["Sticking to a principle"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-access-worldpay-tests-infrastructure-code","__idx":1},"children":["How Access Worldpay tests infrastructure code"]},{"$$mdtype":"Tag","name":"Box","attributes":{"display":"inline-flex","gridTemplateColumns":["1fr 1fr","1fr 1fr 1fr","1fr 1fr 1fr"],"gridGap":"1rem","mt":"1rem","mb":"1rem"},"children":[{"$$mdtype":"Tag","name":"Badge","attributes":{"size":"small","fontWeight":"bold","color":"white","mt":"0rem","mb":"0.5rem","px":"1rem","py":"0.5rem","borderRadius":"6rem","bg":"var(--wp-colour-light-blue)"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ways of working"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Written by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Oludayo Fafiolu"]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ","24 April 2020"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Principles matter. For any group, of any size, principles bring clarity, they provide a sense of purpose and they offer direction when the road ahead is difficult or complex. This is certainly true at Access Worldpay team, where test-driven development (TDD) is a guiding principle. Does it still hold true when put under stress?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["At Access Worldpay, everything is tested, all the time, and the phrase \"If it's not tested, it's broken\" has become a mantra for the team. Rigorously applying this principle takes effort, even in software development where TDD has become commonplace. Maintaining the same rigour becomes far more challenging in newer areas, particularly infrastructure code. Why?"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"big-change-new-skills","__idx":2},"children":["Big change, new skills"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Infrastructure itself has changed rapidly and significantly, from localized hardware and software to remotely-located cloud-hosted services, such as AWS. This requires users to configure and code remote servers to their precise needs and then test that this code meets their required specifications."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Testing infrastructure code is, therefore, an entirely new discipline - one that is wholly embraced by Access Worldpay, albeit with open eyes. Dominic Byrne, a cloud engineer, explains: \"Infrastructure code at the moment is in its infancy - for example, terraforming is releasing at a pretty rapid rate. It's what we use, but it's still in beta.\""]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"new-code-no-context","__idx":3},"children":["New code, no context"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As a result, Dominic explains, reliable testing frameworks do not yet exist. \"People are reluctant to develop them because early ones don't work anymore,\" he says. \"They were just built around a basic configuration plan so they become completely useless whenever the structure of that plan changes.\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["What's more, many cloud engineers are unused to TDD. \"In the past, infrastructure engineers and application developers were two different teams,\" says Daniel Beddoe, a senior software engineer at Access Worldpay. In addition, he explains, people used to question why infrastructure configuration files needed testing at all. \"It turns out there's every need to do so because now you could write something very bad in just one line of configuration that could mess up your whole infrastructure.\""]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"same-team-single-path","__idx":4},"children":["Same team, single path"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Instead of treating application and infrastructure engineering separately, Access Worldpay takes the same approach to every piece of work. \"We're making everything one team and applying practices from application development into infrastructure,\" says Dan. This means identifying requirements and defining success before work begins on each project, whatever its nature: \"We're saying that you need to write tests for your infrastructure just as much as you need them for your applications.\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Part of this shift is organic. \"People are increasingly moving from application development into operations and infrastructure,\" Dominic explains. \"They like the tools they currently use and they want to bring the same principles into infrastructure code.\""]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"live-tests-late-feedback","__idx":5},"children":["Live tests, late feedback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["That's easier said than done, because infrastructure code is tested against a live service, which makes the feedback loop much longer. \"Without building anything, loading my spec files and running my tests on my current project averages about 44 seconds,\" says Dominic: \"For an application developer, tests taking that long to finish aren't good.\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A central goal, therefore, is to ensure that this feedback cycle remains manageable - particularly since it lengthens further whenever code is altered. \"If I change, say, an elastic search server, the loop goes from 44 seconds to 10 minutes at least - that's just the reality of those services online,\" Dominic explains. \"So for infrastructure code, following basic TDD principles where you write your tests and watch them fail means allowing for the time it takes in your feedback loop.\" That this can be difficult is hardly a surprise given the pioneering nature of the work, but the team has devised new ways to ameliorate these challenges."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"testing-spec-teaming-up","__idx":6},"children":["Testing spec, teaming up"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["One approach is to change how infrastructure code is written before testing begins. Instead of writing and testing segments of code incrementally and enduring the long feedback loop each time, \"you try to write each instance as the final product,\" Dominic explains. \"For example, saying ‘I want it to have these forwarding rules; I want this origin to match this specification,' and you write all that and then you start your feedback loop to test that spec.\""]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The issue with working this way, of course, is unpicking the code should a test fail. But perhaps such workarounds need only be temporary; as infrastructure code is more widely adopted and tested, eventually more robust frameworks to support those tests may be built"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the meantime, Access Worldpay is supporting TDD for infrastructure code by physically pairing software developers and cloud engineers to shed old, silo thinking and encourage the broader outlook that cloud-based infrastructure requires. \"There's a whole world of delivery to actually get your thing to work - you need to know how to get your application out into the world,\" Dominic says: \"Just knowing how it works locally isn't useful for anyone.\""]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"towards-better-even-slowly","__idx":7},"children":["Towards better, even slowly"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["However imperfect today's situation, Access Worldpay remains committed to testing infrastructure code. Partly this is to uphold the principle that TDD produces better, more reliable products for its customers, and partly because testing documents systems more clearly. This makes it easier for product owners to prioritize future work and for new team-mates to make useful changes quickly and with confidence."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The end goal of being able to apply traditional application development practices to infrastructure code in a consistent, rigorous way is still some way off. In the meantime, Access Worldpay is trying to develop a methodology that makes infrastructure code tests not only rigorous but also practical - staying true to its core principle while always analyzing its approach and making further refinements wherever necessary or possible. Progress, however uncertain, is still progress."]}]},"headings":[{"value":"Sticking to a principle","id":"sticking-to-a-principle","depth":1},{"value":"How Access Worldpay tests infrastructure code","id":"how-access-worldpay-tests-infrastructure-code","depth":3},{"value":"Big change, new skills","id":"big-change-new-skills","depth":2},{"value":"New code, no context","id":"new-code-no-context","depth":2},{"value":"Same team, single path","id":"same-team-single-path","depth":2},{"value":"Live tests, late feedback","id":"live-tests-late-feedback","depth":2},{"value":"Testing spec, teaming up","id":"testing-spec-teaming-up","depth":2},{"value":"Towards better, even slowly","id":"towards-better-even-slowly","depth":2}],"frontmatter":{"seo":{"title":"Sticking to a principle","description":"Principles matter. For any group, of any size, principles bring clarity, they provide a sense of purpose and they offer direction when the road ahead is difficult or complex."},"markdown":{"toc":{"hide":true}}},"lastModified":"2025-10-28T16:40:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/articles/sticking-to-a-principle","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}