Barebone Automated Testing

Minimalism in automated testing can be attained by following KISS (Keep it Simple Stupid)

KEEP IT SIMPLE

Most of the times, in the process of making the code and application testable, the code written for testing is dependent on very heavy libraries, don’t get me wrong, these are good libraries however every aspect of it is not needed and introducing it in the code results in slowing the process considerably.

So how do we make our testing efficient?

Test the server-side API/routes using baretest and supertest, these are very light libraries and allows the developer to test the implementation as frequently as they wish without delaying the process.

“Baretest is a fast and simple JavaScript test runner. It offers near-instant performance and a brainless API. It makes testing tolerable. ”

supertest allows you to test HTTP endpoints without really having the NodeJS application listen to a port, Although supertest can be used to make the assertions but using baretest as test runner simplifies the process.

End to end testing can be easily done by using a combination of baretest and the node module selenium web driver.

Very simple combination of scripts and all it does is speeds up the development process! Really a minimalist approach towards Software Development & DevOps.

This article applies fully to NodeJS on the server-side and any JS framework on the client side

References:

https://volument.com/baretest#getting-started
https://github.com/visionmedia/supertest