Test frameworks provide scaffolding for building automated tests: domain-specific vocabulary to describe your business scenarios, loggers to generate test results in a standardized format, or “glue” to talk to various services. Such already implemented elements of the framework speed up scripting automated tests but not for everyone.
One test framework may work fine for multiple teams testing similar products and working in a similar way. However, in big organizations, different teams develop and test significantly different things and work in their own ways. The Akamai development culture is no different from that. In such cases, teams feel tempted to add more and more functionality to the already bloated framework, which results in an anti-pattern called Frankenstein’s Framework or Wunder Framework. Such frameworks illustrate needless complexity and immobility – they become hard to use and maintain.
We have learned that the hard way. However, we did not want to “throw the baby out with the bathwater”. We found routines common for different testing teams, but each one of them was still automating the same routines from scratch. For instance, in many teams test scripts start from authenticating to our flagship product, Luna Control Center. The authentication routine automated by one team can be shared via an authentication test library and reused by others. They can use one or more libraries, but it is up to the team which ones to pick up.
We have built a number of such libraries in one of our Akamai teams responsible for building Luna authentication (Luna exposes a variety of authentication schemes for end-users, customer applications and internal microservices; authentication schemes include: EdgeGrid/OPEN Auth, username/passwords, TLS client certificates, 2FA tokens, OAuth/Bearer Tokens, Basic Auth, and SSO delegated to third-party identity providers via SAML). The initial goal was to ease scripting regression tests for authentication, but ultimately the libraries proved useful for other Akamai teams. Two have been open sourced and are used by both customers building applications on top of the Akamai infrastructure and by the online community testing REST services unrelated to Akamai.
In a series of posts, I would like to share my experience of creating such libraries for tests. So stay tuned!