Code example on blue background

Cypress Magento Tests

In the e-commerce sector, where every second counts, ensuring a smooth and error-free user experience is a decisive competitive advantage.

TESTIFY's Cypress Magento plugin is designed for agile monitoring and optimisation of Magento-based online shops. With a simple installation and user-friendly configuration, our commands enable in-depth automation of tests tailored to Magento's unique features and functions. 

Overview of tests

Below we show you the various tests that are included in the Cypress.IO Magento plugin, which is freely available on our Github page.

Magento Logo
Magento Logo

Generate multiple search results

 

Befehl: cy.ttSearchForMultipleResults()
Magento shops often offer an extensive product portfolio. This Cypress test checks whether the search function of a Magento shop works correctly when entering a search term that leads to multiple results. The test performs a search and then validates whether the search results page displays multiple products that match the term entered. This confirms that the search function works effectively and provides relevant results for user queries.

Validate search without results

 

Befehl: cy.ttSearchForNoResults()
It is equally important that a search without relevant products reflects this correctly. This Cypress test validates the behaviour of the search function in a Magento shop when the search returns no results. The test simulates a user search with a search term that is expected to return no product matches. It then checks that the page displays an appropriate message telling the user that no products have been found. This is important to ensure a good user experience by providing clear feedback when there are no search results.

Only customers who find what they are looking for online can be converted.
Only customers who find what they are looking for online can be converted.

Checking product images

 

Befehl: cy.ttProductHasImage()
A Magento shop lives from its visual presentation. This Cypress test checks whether each product on a particular page of a Magento shop has an associated image. The availability of product images is crucial for online shopping websites as they provide customers with a visual idea of the product and can therefore contribute significantly to the purchase decision.

Validation of price and title

 

Befehl: cy.ttProductHasPriceAndTitle()
The display of price and product name is critical in Magento to quickly provide customers with the most important information, and this Cypress test validates that each product on a given page of a Magento shop has a visible title and price. This check is essential to ensure that product information is displayed correctly and completely for customers, which is a basic requirement for a functioning e-commerce website.

All products must be displayed correctly, especially on mobile devices
All products must be displayed correctly, especially on mobile devices

Colour filter application

 

Befehl: cy.ttSetFilterColor()
The filter function in Magento enables fine-tuning of the product search. This Cypress test checks the functionality of the colour filter on a product page of a Magento shop. The test navigates to the product page, activates a specific colour filter and then validates that only products that match the selected colour are displayed. This check ensures that the filter is applied correctly and that the user experience meets expectations.

Product sorting by price

 

Befehl: cy.ttSortByPrice()
Price-based sorting is a fundamental feature in Magento shops. This Cypress test is designed to check whether the sorting function by price works correctly in a Magento shop. The test first navigates to the product overview page, selects the "Price" sorting option and then checks whether the products are displayed in the correct order, either ascending or descending. To do this, the prices of the listed products are extracted and compared to ensure that they are sorted according to the selected option.

The shopping cart - the centrepiece of a web shop
The shopping cart - the centrepiece of a web shop

Validation of the shopping cart

 

Befehl: cy.ttaddCartWishlistCompare()
This command validates the core of online shopping - adding products to the shopping cart, wish list and comparison list. Especially with Magento, where individual options and product variants are common, it is essential that this process works flawlessly in order to maximise conversions and strengthen customer loyalty.

Roland Golla professional bug hunter

Let us test your project

Are you grappling with the complexities of testing your website and infrastructure? Allow us to navigate through these challenges for you. TESTIFY.TEAM is here to refine your processes and reclaim your valuable time. Reach out to elevate your website today!

Call now