Skip to main content

Introduction to Mink Behat

Mink is an open source browser controller/emulator for web applications. In order to test user interaction and to ensure web application behaves correctly, we need a way to simulate user interaction between the browser and the web application in our tests. For this we need Mink. Mink help you to choose best emulator for your project by removing API differences between different browser emulators, by providing different drivers, for every browser emulator. 

There are two types of browser emulator, Headless and browser controller. Main difference between both is that headless are faster but provide no support for JS/Ajax, while browser emulator like selenium provide support for JS/Ajax but are slower compare to headless. Also browser controller like Selenium and Sahi require an installed browser and extra configuration. In real world application we need to use both browser Headless and browser contoller for our project.

Some Key Points about Mink

  • Mink is a library that allows you to browse application programmatically and access its contents.
  • Mink is a PHP 5.3+ library that you'll use inside your test and feature suites.
  • Lead developers of Mink are Konstantin Kudryashov, Christophe Coevoet and Alexander Obuhovich.
  • Mink is Integrated with Behat using MinkExtension. The extension takes care of all configuration and initialization of the Mink.
  • Mink always talks with browser emulators through its driver. 
  • Mink is an open source browser controller/emulator for web applications which you can install using Composer.

Video Tutorial: Introduction to Behat Mink

Tags
Submitted by tgoswami on September 5, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.