Saltar al contenido principal
ProductosHerramientas de escritorioTASTECADRevisión de planosTASTEFILESGestión de archivosTASTEFTPTransferencia de archivosTASTESSHEspacio de trabajo remotoTASTEZIPCompresión y extracciónTASTEWINMGestión de archivosHerramientas para desarrolladoresTASTECODEEntorno de desarrollo integrado para RustTASTESTUDIOEntorno integrado de desarrollo y pruebasTASTEETLIntegración de datos (ETL)ServidoresTASTEREMOTEServidor de escritorio remotoTASTEGEOServidor geoespacialTASTEMAILEspacio de trabajo de correoInversiónTASTESTOCKAplicación de escritorio de trading automático de accionesEmpezarDescargasDocumentaciónComprarTodos los productos
Marketplace
Noticias
TecnologíaNoticiasNoticias de desarrollo de hoyDocumentaciónLenguajes de programaciónRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFrameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngularFrameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFrameworks de apps y escritorioTauriFlutterReact NativeElectronAlgoritmosFundamentos de algoritmosAlgoritmos esencialesAlgoritmos avanzadosAlgoritmos prácticos
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparateGuía de la comunidad
ColaboraTransferencia técnicaDesarrollo de sitio webDesarrollo de app de escritorioCanal de lanzamiento y pagosSocio de ventasContacto
ServiciosEscritorio remotoPaquetes de instalación a medida
TASTEDEV
Productos

Herramientas de escritorio

TASTECADAbre planos complejos con ligerezaTASTEFILESSolo los archivos que necesitas, lo más rápido posibleTASTEFTPEl camino más limpio para tus archivosTASTESSHEntre tu servidor y tú, una conexión más sólidaTASTEZIPComprime más rápido, descomprime más seguroTASTEWINMUn gestor de archivos de dos paneles pensado para el teclado

Herramientas para desarrolladores

TASTECODEEdita, compila, depura y prueba apps de Rust en una sola ventanaTASTESTUDIODe la edición a las pruebas remotas y las correcciones con IA aprobadasTASTEETLMueve datos viendo sus valores

Servidores

TASTEREMOTEUn escritorio remoto que funciona en tu propio servidorTASTEGEOUn servidor geoespacial compatible con GeoServer, reconstruido en RustTASTEMAILRecupera el control de tu correo

Inversión

TASTESTOCKTrading automático de acciones según las reglas que tú defines: cuándo y qué

Empezar

DescargasÚltimas versiones de cada productoDocsCómo usar cada productoComprarSuscripciones y licencias perpetuasTodos los productosTodos los productos de un vistazo
Todos los productos
MarketplaceNoticias
Tecnología

Noticias

Noticias de desarrollo de hoyAnuncios oficiales de lenguajes, frameworks, GitHub e IADocumentaciónGuías de lenguajes, frameworks y algoritmos

Lenguajes de programación

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Frameworks web frontendNext.jsReactVue.js · NuxtSvelteKitAngular
Frameworks de servidorSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Frameworks de apps y escritorioTauriFlutterReact NativeElectron

Algoritmos

Fundamentos de algoritmosAnálisis de complejidad · Ordenamiento · Búsqueda · Estructuras de datos básicas · Árboles y montículosAlgoritmos esencialesRecorrido de grafos · Camino mínimo y árbol generador mínimo · Programación dinámica · Algoritmos voraces · Divide y vencerás · Backtracking (vuelta atrás)Algoritmos avanzadosAlgoritmos de cadenas · Matemáticas y teoría de números · Manipulación de bits · Árboles de segmentos · Union-FindAlgoritmos prácticosEstrategia para entrevistas de código · Caché LRU · Limitación de tasa · Hashing consistente
Toda la documentación de desarrollo
Comunidad
ProyectosDescubre creadores y su trabajoRegistros de desarrolloDecisiones y aprendizajesPromptsInstrucciones reutilizablesProblemas con herramientas de IAProblemas y alternativas de Claude, Codex, GeminiEscaparateResultados terminadosGuía de la comunidadCómo construimos en abierto
Colabora
Transferencia técnicaApps nativas con Rust y eguiDesarrollo de sitio web10 idiomas, cuentas, documentación y descargasDesarrollo de app de escritorioRust y egui, sin WebViewCanal de lanzamiento y pagosFirma, MSI, deb, rpm, AppImage, hashesSocio de ventasRecomiéndanos y gana el 30 %ContactoDesarrollo, alianzas e inversión
Servicios
Escritorio remotoAccede a tu ordenador desde el navegadorPaquetes de instalación a medidaSolo lo necesario, ajustes precargados
Comprar
ES
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Iniciar sesión
Iniciar sesión
TASTEDEV

De pequeñas herramientas a un mejor desarrollo.

support@tastedev.netApoyar a TASTEDEV
ProductosLínea de productosComprarDocsDescargasMarketplaceSoporte
ComunidadProyectosRegistros de desarrolloPromptsProblemas con herramientas de IAEscaparate
PolíticasQuiénes somosPolítica de privacidadTérminos de servicioCondiciones de suscripciónReembolsosNormas de la comunidad
CuentaIniciar sesiónRegistrarse
Visitantes
Hoy
Ayer
Vistas totales
Empresa
GXSOFT
Representante
CHOI YOUNG GU
Número de registro mercantil
853-44-00368
Dirección
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Teléfono
+82-10-4404-1523
Correo electrónico
whitecalvin@tastedev.net
Responsable de privacidad
CHOI YOUNG GU

© 2026 TASTEDEVLa información de los productos se basa en fuentes de desarrollo verificadas.Publicado · en mejora

Documentación de Tauri
Tauri
Getting Started with TauriProject StructureCore ConceptsData and StateTestingDeployment
Debates

Guía de Tauri · 5/6

Testing

Por ahora, este capítulo solo está disponible en inglés.

A Tauri app is a Rust core and a web frontend working together, so it pays to test in layers. This chapter covers Rust unit tests, frontend tests with a mocked IPC layer, and WebDriver-based end-to-end tests that drive the real app window.

LayerToolsWhat it checks
Rust unit testscargo testCommands and business logic
Frontend testsVitest + @tauri-apps/api/mocksUI logic and invoke calls
End-to-end testsWebdriverIO or Selenium + WebDriverThe whole built app

Rust unit tests

A function marked #[tauri::command] is still a plain Rust function, so tests can call it directly. Even better, keep logic in pure functions and make commands a thin layer that calls them; that makes testing much easier.

// src-tauri/src/lib.rs
fn normalize_title(title: &str) -> String {
    title.trim().to_string()
}

#[tauri::command]
fn divide(a: f64, b: f64) -> Result<f64, String> {
    if b == 0.0 {
        return Err("cannot divide by zero".into());
    }
    Ok(a / b)
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn trims_title() {
        assert_eq!(normalize_title("  groceries "), "groceries");
    }

    #[test]
    fn divide_by_zero_is_error() {
        assert!(divide(1.0, 0.0).is_err());
        assert_eq!(divide(9.0, 3.0), Ok(3.0));
    }
}

Run the tests from src-tauri, or pass the manifest path from the repository root.

cd src-tauri && cargo test

# or, from the repository root
cargo test --manifest-path src-tauri/Cargo.toml

To exercise commands that take State or AppHandle through the real IPC path, enable the test feature of the tauri crate and use the mock runtime in tauri::test (mock_builder, mock_context, noop_assets) to build an app without opening a window.

Frontend tests with a mocked IPC

A plain browser or jsdom has no Tauri core behind it, so invoke cannot work as is. mockIPC from @tauri-apps/api/mocks fakes command responses, letting you test UI code with Vitest or Jest. Set environment to "jsdom" in your Vitest config.

// src/greet.test.ts
import { afterEach, beforeAll, expect, test } from "vitest";
import { randomFillSync } from "node:crypto";
import { clearMocks, mockIPC } from "@tauri-apps/api/mocks";
import { invoke } from "@tauri-apps/api/core";

beforeAll(() => {
  // jsdom has no WebCrypto implementation, so provide one
  Object.defineProperty(window, "crypto", {
    value: { getRandomValues: (buffer: any) => randomFillSync(buffer) },
  });
});

// Reset mocked state between tests
afterEach(() => clearMocks());

test("mocks the greet command", async () => {
  mockIPC((cmd, args) => {
    if (cmd === "greet") return `Hello, ${(args as { name: string }).name}!`;
  });
  await expect(invoke("greet", { name: "Tauri" })).resolves.toBe("Hello, Tauri!");
});
¿Tienes preguntas sobre este capítulo?
Capítulo anteriorData and StateCapítulo siguienteDeployment

mockWindows from the same module fakes window labels. To assert which arguments the UI sends, record the args received inside mockIPC and check them afterwards.

End-to-end tests with WebDriver

To launch the built app, click buttons and verify results, use WebDriver, the W3C automation standard. The approach recommended by the official docs is the WebdriverIO Tauri service (@wdio/tauri-service); running npm create wdio@latest ./ and choosing Desktop Testing, then Tauri, generates the setup. The default embedded provider relies on the tauri-plugin-wdio-webdriver plugin, which runs a WebDriver server inside your app, and works on Windows, Linux and macOS. It is wise to include that plugin only in test builds.

// wdio.conf.ts
export const config: WebdriverIO.Config = {
  specs: ["./e2e/**/*.e2e.ts"],
  framework: "mocha",
  services: [
    ["tauri", {
      appBinaryPath: "./src-tauri/target/release/tauri-app",
      driverProvider: "embedded",
    }],
  ],
};
// e2e/greet.e2e.ts
describe("greeting screen", () => {
  it("shows a greeting after entering a name", async () => {
    await $("#greet-input").setValue("Tauri");
    await $("button[type='submit']").click();
    await expect($("#greet-msg")).toHaveText(/Tauri/);
  });
});

The traditional route is tauri-driver, installed with cargo install tauri-driver --locked, which wraps the platform's native WebDriver. On Windows it needs an msedgedriver.exe matching the installed Edge version on your PATH (a mismatch can make the suite hang while connecting); on Linux it needs WebKitWebDriver, packaged as webkit2gtk-driver on Debian-based systems. macOS has no WebDriver tool for WKWebView, so this route does not work there. If you do not use Node.js, pair it with another WebDriver client such as Selenium.

Linux CI runners have no display, so run end-to-end tests under a virtual display such as xvfb-run.

Summary

  • Move logic into pure functions, test it with cargo test and keep commands thin.
  • Fake Rust responses with mockIPC in Vitest or similar, and call clearMocks between tests.
  • End-to-end tests drive the built app through WebDriver; the WebdriverIO Tauri service is recommended, while tauri-driver supports only Windows and Linux.

0 comentarios

Comentarios destacadosMás recientes primero

Iniciar sesión · Inicia sesión para dejar un comentario.