Manage your Cypress tests along with manual ones with Testomat.io like a pro
Quck summary: Here is my story in 4 parts about Cypress, Cucumber, Testomat.io, and me or How I discovered the marvel of test case management systems in 2022.
Part 1: The challenge
This year for one of my projects I was asked to find a new home for manual test cases together with Cypress ones. So, I started researching modern software quality management systems. Before that, I used to work with many popular systems for managing test cases such as TestRail, Zephyr, TestLink, Qase, HP ALM, and many more. However, I wanted to try something new, something that supports Cypress, Cucumber, BDD, and especially something free. After a few minutes of googling with given expectations, I explored Testomat.io.
Part 2: Introduction
Testomat.io is a free modern and scalable software quality management system for manual and automated tests in one single place. Sounds cool, right? But what does it give us? Well, it provides a bunch of standard features and many exclusive:
- Import automated tests just in one command;
- Convert manual tests into automated;
- Execute test runs directly from the management system;
- Integration with CI/CD platforms;
- Living documentation;
- One of the best analytics & reporting metrics;
- Distributed version control system for test cases.
Although some of the features are not free, the free features are good enough for a single-person startup.
So, let’s create an account and give it a try.
Part 3: First impressions and tests
Testomat.io meets you with an intuitive, modern, and friendly user interface. Furthermore, Testomat.io carries excellent and meaningful documentation that will help you to start a project from scratch. So, I created a project for the demo web application ParaBank with BDD enabled. After that I went to the Import Project from the Source Code page, to import my automated tests to the system.
Selected Cypress as a Project Framework, Gherkin as a Project Language, and Mac Operation system, then I just copied the command, changed the path to the feature files, pasted it in my terminal, and ran it.
Then when you open the Testomat.io application you will see a sticky header:
Even more, after that, you will observe your automated tests on the tests page in the Automated section:
And you can see the scenario code in the test description, just like you have in your code:
That is awesome, but you may ask me how I can connect my test scenarios and Cypress tests to see the results of the run in the Testomat.io whenever I run my automated Cypress tests?
Firstly you need to install Testomat.io reporter as a development dependency by running the command:
npm i -D @testomatio/reporter
Register Testomat.io reporter just next to cucumber
preprocessor in cypress/plugins/index.js
file:
Now we can run our Cypress tests with the following command:
TESTOMATIO=1sF4fd2c2mhp npx cypress run --headless
We also need to provide TESTOMATIO system variable with valid API token value of our project. You can find your API token on the
settings/project
page.
Your terminal should show you something like this:
Yeah, as you can see one of our tests failed, but do not worry, let’s take a look at the terminal and find and open the URL for the Testomat.io report:
After opening this URL in the browser you should see the run report:
Also, Testomat.io can be connected to S3 storage to store and access saved test artifacts (screenshots, videos, and logs).
On top of that, we can create manual test scenarios using autocompletion from our automated Gherkin steps:
Even more, our analytics data is updated so that you can observe on the /analytics
page:
Part 4: Ending
All of the test case management systems that I used to work with have their advantages and disadvantages. However, almost all of them are not free and do not provide cutting-edge features. Perhaps, for now, you do not even need modern features to work with your test scenarios, but I would say that Testomat.io is worth taking a look at it.