Gameface E2E Released
5/27/2025
Kaloyan Geshev
We are excited to announce the release of our new end-to-end (E2E) testing framework for Gameface. This powerful tool is designed to streamline the testing process for your game UI, ensuring that everything works as expected before you launch.
What is Gameface E2E?
Gameface E2E is a framework designed for creating and running end-to-end tests for your game UI within Gameface. It simplifies the automation of UI testing, ensuring your interface functions correctly in various scenarios.
Built on the DevTools
protocol, Gameface E2E integrates seamlessly with Gameface, allowing you to incorporate it into your development workflow effortlessly and begin testing your UI immediately.
Features of Gameface E2E
Gameface E2E offers a variety of features to help you efficiently test your game UI:
- Automated Testing: Simulate user interactions like clicking, typing, scrolling, and menu navigation to validate your UI’s behavior in different situations.
- Parallel Test Execution: Run multiple tests concurrently to accelerate the testing process, especially beneficial for projects with extensive UI components.
- Intuitive API: The framework provides a straightforward and developer-friendly API, enabling quick test creation without requiring deep technical expertise.
- Customizable Configuration: Easily set up and tailor the framework to meet your specific testing requirements.
- Mock Data Testing: Test your UI with mocked game data to ensure it performs correctly under various input scenarios.
Getting Started with Gameface E2E
The Gameface E2E testing framework is available on npm . You can install it using the following command:
1npm install gameface-e2e --save-dev
Alternatively, you can install it globally:
1npm install gameface-e2e -g
Once installed, you can begin creating tests using the framework’s API. Detailed documentation and API references are available here .
To help you get started, the package includes a collection of example tests located in the examples
folder.
Writing Tests
Tests are written in .spec
files using the framework’s API and the Mocha syntax.
Here is an example of a test file:
1describe("Test my UI", () => {2 it("Should display the correct text", async () => {3 const element = await gf.get('.my-element');4 const text = await element.text();5 assert.equal(text, 'Hello, World!');6 });7
8 it("Should update the text when clicked", async () => {9 const btn = await gf.get('.my-button');10 await btn.click();11 const element = await gf.get('.my-element');12 const text = await element.text();13 assert.equal(text, 'Hello, Gameface!');14 });15});
Running the tests
To run your tests, you can use the following command:
1npx gameface-e2e --gamefacePath=${PATH_TO_PLAYER_EXE} --tests=${PATH_TO_SPEC_FILES}
or if you have installed the framework globally:
1gameface-e2e --gamefacePath=${PATH_TO_PLAYER_EXE} --tests=${PATH_TO_SPEC_FILES}
Where ${PATH_TO_PLAYER_EXE}
is the path to the Gameface player executable and ${PATH_TO_SPEC_FILES}
is the path to your test files.
To simplify the command, you can create a configuration file in the root directory of your project. Name the file gameface-e2e.config.js
and include the following content:
1module.exports = {2 tests: "examples/**/*.spec.js",3 gamefacePath: "C:/Gameface/Player/Player.exe"4}
After setting up the configuration file, you can simply execute the following command to run your tests:
1npx gameface-e2e
Conclusion
The Gameface E2E testing framework is a powerful tool that can help you ensure the quality and reliability of your game UI. With its simple API, automated testing capabilities, and seamless integration with Gameface, you can easily write and run tests to verify that your UI behaves as expected.
You can find the full documentation of the framework and its API here .