info@brightest.be
+32 3 450 88 42

Technical Thursday

Why collaboration in testing tools help us deliver a quality product

Posted by: Eva
Category: Test automation
Working as a test automation engineer in a software development team has its challenges, certainly during a pandemic. A large part of our communication with the development team consists of reporting bugs. Even more now, working isolated from our home-offices, we need to be aware of the perception that all testers do is finding bugs and ‘throwing them over the wall’. Luckily, there are many testing tools that can help facilitate team collaboration. Testing tools help us visualize our test efforts and remind our team members that we share a common goal: delivering a quality product. Today we will take a closer look at two test automation tools that enable the developer-tester collaboration.

CYPRESS

Cypress, testing tool, logo

Cypress is an open source, JavaScript based testing framework, built for modern web applications. It is a testing tool that allows developers and testers to speed up the UI testing process.

Front-end developers can use this framework to write UI component and integration tests. While a test automation engineer can elaborate on this test set by adding his own integration and end-2-end regression tests.

The benefits of collaboration in cypress

  • Adding tests in the same repository promotes communication between developer and tester. It is easier to have a look at each other’s code and see which scenarios are not covered yet. This will also help prevent writing duplicate test scenarios.
  • It fits perfectly in a test-driven development workflow. Having a test automation engineer add additional test scenarios from his/her viewpoint during this process, will decrease the chance of finding bugs at a later stage.
  • It allows them to write complex test scenarios together based on a shared framework. By expanding the framework from both points of view, we can also accelerate the writing and maintenance of tests, avoid code duplication, and improve readability of code.

Key pain points solved by Cypress

While focusing on UI testing, Cypress addresses these key pain points developers and test automation engineers face when writing tests:

Cypress takes snapshots as your tests run. You can simply hover over commands in the Command Log to see exactly what happened at each step.
Cypress snapshot

You do not have to add waits or sleeps to your test scripts. Cypress automatically waits for commands and assertions before moving on. How? Behind the scenes of our written test commands, the Cypress engine executes hidden commands to ensure that the state of the application matches what our commands expect about it. Any waiting or retrying that is necessary to ensure a command was successful, must complete before the next command executes. The test will fail when the default timeout of a command is reached.

The Cypress test runner provides readable errors and stack traces. You also have access to all the developer tools.

Cypress gives you direct access to the HTTP requests in your test run. By intercepting these requests, you can easily confirm expected network calls with the server and control, stub and test edge cases without involving your server.

In our upcoming brownbag session we will dive deeper into the Cypress features, look at the differences with Selenium, and learn how to get started with Cypress.

POSTMAN

postman logo

Postman is a collaboration platform for API development and testing. It simplifies the API testing process and contains some useful features that benefit developers as well as testers.

Its API client will help you create a manageable and structured workflow, document and share your work in a dedicated workspace. Besides that, it enables your teammates to collaborate on it. Postman also provides a good overview of the existing projects/products, their APIs, and the tests that help guarantee the APIs quality.

Postman’s paid plan enables unlimited shared requests which is essential for setting up a team workspace. With this plan, a possible setup is to create a shared team workspace for projects or products and add a collection for each API. These collections can contain the requests or even folders with specific test scenarios.

eam workspace cypress

The benefits of collaboration in Postman

  • Developers and testers can actively collaborate on writing API tests and debugging during the API development process
  • It increases knowledge sharing between developers and testers
  • All API test scenarios are stored in one place and team workspaces can be easily maintained through a Git-like version control process. So, you can maintain a single source of truth and stay in sync
  • Clear overview of existing products and projects, their APIs and added documentation will fasten the onboarding process of new developers and testers

Features to simplify the API testing process

Apart from these benefits, Postman has many features to simplify the API testing process, including:

Postman lets you send REST, SOAP and GraphQL requests.

API client cypress
click to enlarge

Quickly add tests by using the provided code snippets.

code snippet cypress
click to enlarge

Run your API tests directly from the command line. Integrate this into your CI/CD pipeline to ensure that any code changes will not break the API in production.

Run your API tests directly from the command line
Click to enlarge

Monitors help you stay up to date on the health and performance of your APIs. You can schedule health checks and will automatically get notified through email when a test fails.

In case you want to know more about Postman and its features, our Brightest Academy has an in-house API testing training where you will learn more about writing tests in Postman.


Written by Thomas Moors, Test Automation Engineer.