The Testing Pyramid: How to Structure Your Test Suite

For over a decade, the testing pyramid has been helping developers plan automated software tests. In this article, we’ll explore what makes up the pyramid, how it is helpful, and what alternative “shapes” there are.

What Is the Testing Pyramid?

Introduced by Mike Cohn in his book Succeeding with Agile (2009), the pyramid is a metaphor for thinking about testing in software. It’s an idea that has caught on so strongly that, to this day, it’s still the industry standard in engineering circles.

The pyramid attempts to visually represent a logical organization of testing standards. It consists of three distinct layers:

Do You Need to Test Everything?

At my previous job at a big multinational company, we didn’t have anything remotely resembling an automated test. What manual testing we did consisted of dragging and dropping a folder and mashing F5. When we skipped testing, however, the users ended up doing it for us. After they did their round of testing, they would call or show up at our office, wondering angrily why the product was not working as they expected.

I start with this story because I don’t want you to think that I do not value tests. I do. Very much. I believe we can’t live without them. But you can have too much of a good thing. However vital water may be, too much of it results in a flood.

You Get a Test; You Get a Test; Everyboooody Gets a Test!

Everybody gets a test…

Tests are living documentation, messages to other developers (and our future selves) about what the code is supposed to do. Tests enforce requirements and provide feedback, telling us when something breaks.

What Is API Test Automation?

APIs have become the heart of software development in various applications and systems, linking and exchanging data and code. Fortunately, testing the software will dramatically improve the efficiency of the entire testing process, allowing you to produce applications faster than ever before.

What Is an API?

The application programming interface (API) is a computer interface that allows two different software systems to communicate and share data. Newsdata.io Newsdata.io news API also allows two different software systems. The software system running an automation API requires many functions/subroutines from another software program.

Fluent Assertions Reloaded

If you’re not using fluent assertions in your tests yet and just rely on basic JUnit assertions, you might be missing out on a simple but very effective tool to write high-quality test code. The article starts with a short recap about the virtues of fluent assertions and how they address the shortcomings of basic assertions.

But while very much in favor of fluent assertion I think that current implementations don’t realize their full power: Problems are demonstrated in AssertJ, the main fluent assertion library for Java. Finally, I present a new solution to overcome these issues.

How to Mock a Web Server in Your Java Applications

When you need to test an application that consumes a web API, you basically have two options:

  1. Use Testcontainers to start a container that will run the web API which your application will consume.
  2. Mock a Web Server to emulate the web API which your application will consume.

Many times, starting a container for that is not an option. For instance: you might not have a container environment available, or you just don’t have the artifacts to create that container (it might be a 3rd part API), or it is hard to emulate the needed behavior with containers.

Test Environments: Why Test in the Cloud?

This article was published with permission from freelance writer, Justin Reynolds.


Many companies today have outdated, inefficient, and complex IT test environments. This leads to a variety of pitfalls, such as high costs, workflow issues, reduced performance, and delayed releases, among others.

Simple Code: Acceptance Tests

Acceptance tests are a great tool to verify that the application or system works as expected from end to end. Sometimes these tests can be called end-to-end tests but sometimes end-to-end tests have a different meaning. Another term to describe the same functionality is QA tests and a subset of acceptance tests is often referred to as smoke tests.

The Idea

The idea is to define input and the expected output and once the system and all its dependant services are running the whole system can be verified to work as expected. In an ideal world, the acceptance tests would be implemented based on the acceptance criteria of the use case.

Simple Code: Unit Tests

Unit tests are the developer's number one safety net. Let that sink in. This is the number one reason for writing unit tests.

Unit tests are written by developers for developers to ensure that the code works as expected and handles happy and sad paths correctly. With enough unit test coverage, the tests enable a safe environment for refactoring and rewriting code.

7 Test Frameworks To Follow in 2021 for Java/Fullstack Developers

It is time to learn new test frameworks to improve your code quality and decrease the time of your testing phase. I have selected six testing frameworks that sound promising. Some have existed for quite a long time but I have not heard about them before.

At the end of the article, please tell me what you think about them and what your favorite ones are.

Robot Framework

Robot Framework is a generic open-source automation framework. It can be used for test automation and robotic process automation (RPA).

Get a Jump Into GitHub Actions

On January 27, 2021, Angie Jones of Applitools hosted Brian Douglas, aka "bdougie", a Staff Developer Advocate at GitHub, for a webinar to help you jump into GitHub Actions. You can watch the entire webinar on YouTube. This article goes through the highlights for you.

Introduction

Brian Douglas and Angie Jones infographic.

Angie Jones serves as Senior Director of Test Automation University and as Principal Developer Advocate at Applitools. She tweets at @techgirl1908, and her website here

Introduction to Contract Testing, Setting the Context

Application development has evolved, and therefore new needs have arisen when it comes to testing and new tools to deal with them. Let’s take a look!

We have gone from having monolithic architectures to applications based on (micro) services. Why do I say (micro) services instead of microservices? Because although the literature talks about the evolution of development from monolithic applications to applications based on microservices, in reality, we often find ourselves with the integration of services (as is, without the need for them to be micro). The concept at hand applies equally well to the concept of microservices as it does to services, so from here on we will simplify using the term services.

End2End Testing With TestContainers…and a Lot of Patience

This time I would like to show my experience creating an End2End test for a Camel integration application that connects these layers:

  • Apache Kafka
  • Apache ActiveMQ Artemis
  • PostgreSQL
  • Localstack ( AWS similar )
  • Red Hat Ingress upload service
  • Minio ( AWS similar )
  • KIE server ( rules engine )
  • Apache Camel rest endpoints. (<- the app)
apache camel integration


Don’t Use assertTrue to Verify Text in Your Test

Introduction

It is common, especially in functional tests on any front-end (web, mobile), to include text validation in our tests to verify that the returned value is the expected one. These validations are user failures or even information about a successfully executed command.

However, it is common to see many professionals using the assertTrue command instead of assertEquals to validate the returned text.

Five Data-Driven Reasons To Add Visual AI To Your End-To-End Tests

Do you believe in learning from the experiences of others? If others found themselves more productive adding Visual AI to their functional tests, would you give it a try?

In November 2019, over 3,000 engineers signed up to participate in the Applitools Visual AI Rockstar Hackathon. 288 completed the challenge and submitted tests — comparing their use of coded test validation versus the same tests using Visual AI. They found themselves with better coverage, faster test development, more stable test code, with easier code test code maintenance.

How Do You Catch More Bugs In Your End-To-End Tests?

How much is it worth to catch more bugs early in your product release process? Depending on where you are in your release process, you might be writing unit or systems tests. But, you need to run end-to-end tests to prove behavior, and quality engineers require a high degree of skill to write end-to-end tests successfully.

What would you say if a single validation engine could help you ensure data integrity, functional integrity, and graphical integrity in your web and mobile applications? And, as a result, catch more bugs earlier in your release process?

DevOps Your Skill: End-to-End Tests

This type of test allows us to verify if the interaction of the software components in our Alexa Skill, such as, VUI, lambda, or if a database works as expected. In summary, end-to-end testing tests the application's ability to satisfy all the requests that the end-user can make.

In terms of voice it is not easy to achieve this kind of tests because of the interaction of the voice as an input of the end-to-end test. We will use Bespoken to write our end-to-end tests. Bespoken allow us to make this kind of tests in an easy way!

DevOps Your Skill: Integration Tests

Integration tests ensure that the components of an application is running properly at a level that includes the auxiliary infrastructure of the application, such as the voice user interface, the backend, and the integration with external systems.

Integration tests evaluate the components of an application at a higher level than unit tests. Unit tests are used to test isolated software components, such as individual class methods. Integration tests check that two or more components of an application work together, and they generate an expected result, possibly including all the components necessary to fully process a request.