The Biggest Gap in QA You've Never Heard Of
Tags: testing, saas
Published: 2020-02-24 19:23:27

The developer ecosystem for test automation is huge.  Need to test your web app?  Look no further than Selenium or Puppeteer and the myriad frameworks built on top.  Is your team only responsible for the API layer?  Postman's great for automation and exploration.  Oh, your team builds mobile apps?  Appium to the rescue.

What few realize is that, despite this vast ecosystem, these tools are all used to maintain quality for just a fraction of the ways in which a customer experiences a product, company, or brand: code.  Even at technology companies, code is just one piece of the customer experience pie.

## Where No QA Has Gone Before

For example, the process by which a customer discovers, learns about, purchases, and renews a product is almost entirely driven by automation in many organizations.  The logic and rules for these business processes are almost exclusively architected, implemented, and maintained by people who are not developers; they are technology administrators in groups like Marketing Operations or Sales Operations.

They automate these processes by purchasing, integrating, and configuring SaaS software like Salesforce, HubSpot, Tealium, and [literally thousands](https://chiefmartec.com/2019/04/marketing-technology-landscape-supergraphic-2019/) more, with only minimal (and commonly no) support from developers or testers.

![Visual Programming for Business Users](https://dev-to-uploads.s3.amazonaws.com/i/df1brzyy2fvrf6s3kc3v.png)
<figcaption>Some platforms allow business users to define their logic using visual programming.</figcaption>

This shift has been accelerating as subscription-based SaaS software has increasingly become the norm over the past decade.  And on the whole, this transition has been good for everyone!  Business users are no longer beholden to limited development capacity to solve their problems, meanwhile developers are more free to work on innovation in their products.  But there are downsides too.

Far from the QA rigor and influence of product and IT teams, these business technologists end up owning complex, distributed, and brittle systems that break down in emergent and costly ways.  What could be worse than a bug in a system with millions of dollars in ads and technology in front of it and the potential for lost revenue and unhappy customers behind it?

## Bringing QA to The Rest of the Business

It's with this context in mind that we built a test automation tool called [Crank](https://crank.run?utm_medium=referral&utm_source=dev.to&utm_campaign=biggest%20gap%20in%20qa).  Our goal is to empower engineers, SDETs, and QA Engineers who support these business users and interface with their technologies to close the quality gap.  (And full disclosure: we're also [building a business](https://www.automatoninc.com) on top of it to empower the business users who don't have developers supporting them at all.)

What is Crank?  Well, it's a BDD test automation framework for integrated SaaS.  That's a dense summary, so let's unpack it:

**BDD**: If there was ever a use-case for Behavior-Driven Development, this is it.  What better way to collaborate with _the business_ when testing something that they themselves have created?  Here's an example Scenario file that works with Crank:

```yml
scenario: Contact Form Lead Sync
description: Proves the Contact-Us Form Works.

steps:
- step: Given I navigate to https://example.com/contact?utm_source=ABC
- step: When I fill out input[name=fullName] with Emily Doritos 
- step: And I fill out input[name=email] with emilyd@example.com
- step: And I submit the form by clicking input[type=submit]
- step: Then the FullName field on Salesforce Lead emilyd@example.com should be Emily Doritos
- step: And the UtmSource field on Salesforce Lead emilyd@example.com should be ABC
- step: Finally, delete the emilyd@example.com Salesforce Lead
```

**Test Automation**: Just like developers, business technologists move fast too, so automation is key.  Crank is a CLI that can run BDD test scenarios like the one above.  You can run it locally before or after a launch.  You can install it and run it in your CI/CD pipeline.  You can schedule it via cron.  Use it however best suits your organization.

![Crank Run - Business Technology Test Automation](https://dev-to-uploads.s3.amazonaws.com/i/ai5km40cf1n8dn7mf3bh.gif)

**Framework**: Crank is extensible.  It's [built on gRPC](https://crank.automatoninc.com/?utm_medium=referral&utm_source=dev.to&utm_campaign=biggest%20gap%20in%20qa) to enable any developer to write action and assertion steps in any supported language (packaged in docker containers we call Cogs) for any SaaS system.  We've built out [quite a few Cogs](https://crank.run/discover-cogs?utm_medium=referral&utm_source=dev.to&utm_campaign=biggest%20gap%20in%20qa) to start, but anyone can contribute to the global library of actions and assertions.

```protobuf
service CogService {
  // Define Cog metadata.
  rpc GetManifest (ManifestRequest) returns (CogManifest) {}

  // Run a single assertion/action step.
  rpc RunStep (RunStepRequest) returns (RunStepResponse) {}

  // Run a series of assertion/action steps.
  rpc RunSteps (stream RunStepRequest) returns (stream RunStepResponse) {}
}

```

**For Integrated SaaS**: By this, we mean two things.

First, Crank is not a test automation framework for everything; you won't use it to test your product's core features, just where your product or site interfaces with other SaaS technology.  Limiting its scope in this way allows us to stay focused in an already immense problem space.

Second, Crank's action and assertion steps rely on the APIs of SaaS platforms.  The Salesforce Cog, for example, exposes steps that use Salesforce CRUD APIs to alter and inspect the state of a Salesforce instance.  When you author a Scenario that spans multiple platforms, you can start to see the power in testing the complex ways in which SaaS tools interact.

---

Think this tool might help?  [Install Crank Now](https://crank.run/intro?utm_medium=referral&utm_source=dev.to&utm_campaign=biggest%20gap%20in%2qa).

Don't really work with this kind of stuff?  Forward this article to a colleague who does!  Better yet, seek out those marketing and sales technologists in your company and _help them_!  They need it.