CloudDevelopersDevOpsFeaturedLet's Talk

What Is Integration Testing And Why Is It The Next Big Thing?

0

Co-founder of AtomicJar discusses Integration Testing.

AtomicJar is on a mission to build tools that developers love, and to help change automated testing for the better. Founded by Richard North (the developer behind the world’s most popular testing library, Testcontainers) and Sergei Egorov (a co-maintainer of Testcontainers as well as Java Champion, Reactive Foundation TOC member, Apache Software Foundation committer, contributor to a variety of open-source projects, and former staff engineer at Pivotal), AtomicJar helps developers build and release their software with confidence. With over a million builds per month, the company’s work has clearly caught on.

AtomicJar observed that DevOps changed many things, such as when and how we deploy software and how we develop software. However, one thing that hasn’t changed is how we test software. According to Sergei Egorov, Co-founder, CEO at AtomicJar, we’re still “stuck with old ways of doing things.” He continues to say, “We need a more modern approach to testing. And that’s what AtomicJar is doing with Testcontainers, the library we created that modernized testing for the masses.”

Egorov describes the term Integration Testing: “Let’s say we replicate a production environment and then we test that everything works correctly. Or maybe we run just one service, and seven were revised. This single service, integrated into the environment, works correctly.” Egorov makes a point to say that Integration Testing is not system testing, staging environments, or unit tests, but the next step in testing.

As to the importance of testing, Egorov mentions that companies need to redefine how they test because everything is shifting to microservices. With this shift, unit testing is not enough. Egorov offers up this example: A microservice “obtains data from some IO source (let’s say from a database), performs some transformations, and returns output to a REST endpoint, for example, or maybe Kafka. This transformation can be trivial, but the queries we write are what makes our service perform.” He continues, “We cannot unit test database behavior and we need this database to run this test. This is why integration testing becomes more and more popular.”

Egorov also touches on the importance of testing culture. To this end, he says, “For a very long time, the assumption was that QA should be a dedicated team who tests the software. And then there are developers who write the software and delegate the testing to the QA team. And it worked well.” At the same time, Egorov mentions that there are some things developers are better capable of testing, and the shift left focus helps developers test faster because they can test on their own machines. He makes the point of Infrastructure as Code (IaC) and how “developers can now do testing as code, including some advanced scenarios where they test with production components.”

Another very important point made is how testing is often used as a part of the development process because “basically it’s the only way to verify that what they just developed works correctly.” And as to the trend of “just copying the production environment,” Egorov says, “Maybe there are some external service providers that only work in production, but do not provide staging environments. And one would not want to connect to a payment gateway from a staging environment that serves production transactions.”

Don't miss out great stories, subscribe to our newsletter.

Login/Sign up