bukowa / tauri-e2e

This project demonstrates how to perform end-to-end testing with Tauri v2 using Selenium and Webdriver.
https://bukowa.github.io/tauri-e2e/
MIT License
0 stars 0 forks source link
e2e-testing edge edgedriver linux mac selenium tauri tests v2 webdriver webkitgtk webkitwebdriver windows

tauri-e2e v2

Windows Tests Linux Tests macOS Tests

This project demonstrates how to perform end-to-end testing with Tauri v2 using Selenium.

It can also easily be integrated into your existing Tauri project to automate testing and ensure the quality of your application across different platforms.

Each webdriver has its own differences between platforms. This project aims to provide a unified way to run e2e tests. In the webdriver.ts file, you can see how the webdriver is initialized based on the platform. Copying this file into your project should be enough to run e2e tests on your project.

Goals

In order of priority:

State

Note on Headless Execution

In this setup, when we refer to running tests "headlessly," it means executing them without a graphical user interface (GUI) environment. This is achieved by leveraging servers like X11, which provide a virtual display for graphical applications, even in environments where no physical display is available or required.

Note on Windows Environment

On Windows, the testing setup utilizes Bash and tools provided by Git for Windows. This includes Git Bash, which provides a Unix-like command-line environment on Windows, enabling seamless execution of commands and scripts similar to those used in Linux environments.

Prerequisites

Before getting started, ensure you have the following:

Note on just:

The just tool, utilized in this setup for streamlined command execution, is noteworthy for its lightweight nature and cross-platform compatibility. Written in Rust, just is designed to be efficient and versatile across different operating systems. The entire installation typically occupies only about 4MB of disk space, making it an excellent choice for managing tasks and commands within your development environment without significant overhead. If you prefer not to use just, feel free to contribute shell script alternatives via pull requests.

Run

just test-e2e

Goals

  1. one (just 1) cross-platform command to run e2e tests for tauri application on local computer
  2. one (just 1) cross-platform command to run e2e tests for tauri application in github actions
  3. run these tests on scheduled basis in github actions to early catch any regressions in new versions