DEV Community

Cover image for Should we run unit tests in the cloud?
Jonathan
Jonathan

Posted on β€’ Edited on

Should we run unit tests in the cloud?

Imagine if you could push your current branch to a test server and have it automatically run all of your unit tests!

You could get feedback on your entire test suite in a few minutes, rather than waiting for a lengthier CI process, which might take up to ~20 minutes (depending on the infrastructure and setup in your organisation).

Several automation test platforms now exist, to perform cloud testing on longer-running end-to-end tests. These include Selenium Grid, TestingBot and BrowserStack.

Why not extend this kind of service also to unit tests?

Advantages of cloud-based unit test execution over CI:

  • CI can be time-consuming, if it runs a full build, linting, type-checking and other operations. Cloud-based unit testing lets us isolate just the tests.
  • CI tends to be monitored on a separate web-page. Cloud-based unit testing (in theory) could be integrated directly into the developer's IDE, so it would feel similar to running the tests locally.

Advantages of cloud-based unit test execution over local:

  • When working with a very large code base, with a large number of tests, and not well de-coupled, we might want to run all the tests. An optimised cloud environment might be able to do this faster than a dev box, and without consuming resources which could cause our IDE and other tools to slow down.

So far I don't know of any platforms that actually do this, but perhaps the aforementioned automation testing platforms could be configured/tweaked to enable it.

What do you think?

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more