Tests every developer should run

ShreyaBee
2 min readDec 9, 2020

When wondering how to fit QA into a DevOps setup, devs and QAs should ideally collaborate to achieve maximum efficiency and optimal product quality. A DevOps pipeline is not complete without a serious contribution from both parties.

When it comes to the developer side of the DevOps table, they should also be able to run rudimentary unit tests on their own code before pushing it to version control. This article will discuss 4 core tests every developer should run on their own code before pushing it to the Quality Assurance phase.

A few of these developer tests are:

  • Unit Testing: Unit Tests verify the performance of a single method, function or class. They are run on the smallest testable unit of software — procedures, interfaces, classes, etc. They determine if individual units of source code are suitable for integration in the larger codebase.
  • Basic Functionality Testing: Unit Tests determine if the code is returning the right output. But outside of that, devs can use a basic functionality test to evaluate if all aspects of the code works. For example, are all the buttons working? Can a user enter simple text without crashing the whole thing? Can the text on buttons/links be seen clearly?
  • Code Review: Code Review, sometimes also called Code Peer Review is a practice by which a developer pair with one of their fellow devs to check each other’s code for errors. This streamlines and accelerates the coding process by giving every set of code a second set of eyes for verification.
  • Static Code Analysis: Static code analysis is the practice of checking the code without executing it. It runs through the basic code structure and ensures that the code is aligned with a number of standards and guidelines. Generally, static analysis looks for the following issues:
  1. Programming errors
  2. Violations of commonly followed coding standards
  3. Syntax anomalies
  4. Security issues
  5. Vague or undefined values

The Role of Real Devices

All developer testing, regardless of the software being created and tested, must be conducted on real devices. Developer testing can only be effective when tests are being run in real user conditions. Running tests on emulators or simulators cannot provide 100% accurate results, and therefore developers won’t be able to evaluate the quality of their code adequately.

Whether manual testing or automated Selenium testing, real devices are non-negotiable in the testing equation. In the absence of an in-house device lab (that is regularly updated with new devices and maintains each of them at highest levels of functionality), opt for cloud-based testing infrastructure.

By running tests on a real device cloud, developers can run tests with the assurance that they are getting accurate results every time. Comprehensive and error-free testing at dev-level prevents bugs from showing up (usually magnified) at later stages, which reduces time and effort required to handle them.

--

--

ShreyaBee

Likes books, cake, tech, tea and sunsets in freezing mountains.