Kraken E2E Testing: How to Test Multi-User Web and Android Apps
Kraken E2E testing lets you automate end-to-end tests where two or more users interact, across web and Android, using plain-English Gherkin scenarios. Here is what Kraken is, how to set it up and when to use it.

The Short Answer
Kraken is an open-source tool for automated end-to-end testing of Android and web apps. Its special feature is that it can run tests where two or more users interact at the same time, for example one user sends a message on a phone while another receives it in a browser. You write the tests in Gherkin, the plain-English "Given, When, Then" style, and Kraken coordinates the devices. It works black-box, so it needs only an APK file or a web page address, not the app's source code.
What Problem Kraken Solves
Most testing tools drive one browser or one device at a time. That is fine for a login form. It is awkward for features that involve several people at once, such as chat, ride-sharing, collaborative documents, multiplayer features or approval flows between a buyer and a seller.
To test these, you need to do two things at once and make the devices wait for each other. Kraken was built for that. The tool comes from The Software Design Lab and is described in an academic paper about multi-device interaction-based testing of Android apps. You can read the official documentation on the Kraken website.
How Kraken Works
Every scenario in a Kraken feature file runs on one device, which Kraken treats as a numbered user: @user1, @user2 and so on. Each scenario is also tagged with the device type, @mobile or @web. The devices then talk to each other through a simple signaling system. One device sends a signal, and another device waits for it, with a default timeout of 10 seconds. Kraken uses files to pass these signals between devices.
Web tests run through ChromeDriver or Geckodriver, and mobile tests run through Appium.
What You Need Before You Start
- Node.js (version 12 or later)
- Java
- The Android SDK with ADB and AAPT set up
- Appium
If you only want to test web apps, you will still want to run the doctor command below to check your setup.
Setting Up Kraken
In an empty project folder, run these commands:
npm init -y
npm install kraken-node --save
kraken-node doctor
npx kraken-node genkraken-node doctorchecks that everything you need is configured correctly.npx kraken-node gencreates afeaturesfolder with separatemobileandwebfolders. Each one holds step definitions and a support folder with hooks. It also creates a sample feature file and amobile.jsonfile.
For mobile tests, mobile.json stores your app details: the path to the APK, the package name and the launch activity. If you do not know the package or launch activity, Kraken can read them from the APK:
npx kraken-node apk-info <APK_PATH>By default, web tests use Chrome. To use Firefox, edit features/web/support/hooks.js and pass 'firefox' to the WebClient constructor.
Writing Your First Test
A Kraken test is a normal Gherkin feature file. Here is the example from Kraken's own documentation, where a mobile user says hi to a web user:
Feature: Example feature
@user1 @mobile
Scenario: As a first user I say hi to a second user
Given I wait
Then I send a signal to user 2 containing "hi"
@user2 @web
Scenario: As a second user I wait for user 1 to say hi
Given I wait for a signal containing "hi"
Then I waitRead it from top to bottom. User 1 uses an Android device and sends a signal containing "hi". User 2 uses a browser and waits for that signal. The test passes only if the signal arrives in time. Real tests replace the "I wait" steps with actions in your app, such as tapping a button or typing text.
You can also write your own steps. They go in the step definition files under features/mobile/ or features/web/.
Running the Tests
npx kraken-node runKraken runs each scenario on its own device and coordinates the signals between them. Make sure your Android device or emulator is connected first, and that Appium is available.
Useful Kraken Features
- Monkey testing. Kraken can send random taps and inputs to your app, using either ADB monkey or its own monkey. It is useful for finding crashes you did not think to test for.
- XML snapshots. A step can save the current screen's XML to a file. This helps you find the right element IDs and check what was on screen.
- A properties file. Store values such as passwords in
properties.jsonand refer to them in your steps, so you do not hard-code them in test files. - Fake data. Kraken can generate realistic values such as names and emails with Faker, and reuse the same value later in a scenario.
- Per-device apps. Each mobile device can run a different APK, so you can test a customer app and a driver app together.
When to Use Kraken and When Not To
Use Kraken when your feature involves more than one user at the same time, or when you need to test an Android app and a web app together. Chat, notifications, shared workspaces and marketplace flows are good examples.
For ordinary single-user web testing, tools like Playwright or Cypress are usually simpler to set up and have large communities. Kraken's setup is heavier because of Appium and the Android tools, so it is not worth it if you only test one browser.
Tips for Reliable Tests
- Keep scenarios short. One behaviour per scenario is easier to debug.
- Wait for signals, not for time. Use signal steps instead of fixed pauses, so tests do not break when your app is slow.
- Use properties for secrets. Keep passwords out of feature files.
- Run the doctor check after upgrades. Most setup problems come from a missing Android or Appium dependency.
- Test the code you ship. If you build quickly with AI help, as I wrote about in my post on vibe coding, end-to-end tests are your safety net.
Frequently Asked Questions
What is Kraken testing?
Kraken is an open-source tool for end-to-end testing of Android and web apps, with support for scenarios where several users interact at once. Tests are written in Gherkin.
Does Kraken need access to my source code?
No. It tests the app from the outside, so it only needs an APK file for Android or a web page address for web apps.
Can Kraken test both Android and web apps?
Yes. Each scenario is tagged @mobile or @web, so one test can combine an Android user and a browser user.
What language are Kraken tests written in?
Test scenarios are written in Gherkin, and custom steps are written in JavaScript, since Kraken runs on Node.js.
Is Kraken better than Playwright or Cypress?
They solve different problems. Kraken is built for multi-user and multi-device scenarios, while Playwright and Cypress are better for scripted single-user web tests.
How do I check that Kraken is set up correctly?
Run kraken-node doctor. It checks that the tools Kraken depends on, such as the Android SDK and Appium, are configured.
Final Word
If your app has features where users affect each other in real time, Kraken gives you a way to test them that most tools do not. Start with the sample scenario, get two devices talking, and then replace the placeholder steps with real actions from your own product. To see more of what I build and test, visit my projects page.
Share this post
WhatsAppLinkedInXTelegramKeep reading

How I Used Kraken and Gherkin to Automate 100+ Test Cases at Work
I learned Kraken and Gherkin in a week and used them to write more than 100 automated test cases for a real product at BlackHawk. Here is what I automated, the bug it caught, the beginner mistake I made and what I would tell anyone starting out.

Superintelligence: What It Is, How Close We Are, and Why People Disagree
Superintelligence means an AI far smarter than the best humans at nearly everything. It does not exist yet, but it is now a topic for labs, lawmakers and a US executive order. Here is what the term means and what the real debate is.

Vibe Coding: Can You Really Build a Real Product with AI?
Vibe coding means building software by describing what you want to an AI and steering the result. I used it to build a live exam-prep platform. Here is what worked, what did not, and the rules I follow.