testing-tauri-apps

Listed

Guides developers through testing Tauri applications including unit testing with mock runtime, mocking Tauri APIs, WebDriver end-to-end testing with Selenium and WebdriverIO, and CI integration with GitHub Actions.

Testing & QA 13 stars 1 forks Updated 2 months ago

Install

View on GitHub

Quality Score: 64/100

Stars 20%
38
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
0
Description 5%
100

Skill Content

# Testing Tauri Applications This skill covers testing strategies for Tauri v2 applications: unit testing with mocks, end-to-end testing with WebDriver, and CI integration. ## Testing Approaches Overview Tauri supports two primary testing methodologies: 1. **Unit/Integration Testing** - Uses a mock runtime without executing native webview libraries 2. **End-to-End Testing** - Uses WebDriver protocol for browser automation ## Mocking Tauri APIs The `@tauri-apps/api/mocks` module simulates a Tauri environment during frontend testing. ### Install Mock Dependencies ```bash npm install -D vitest @tauri-apps/api ``` ### Mock IPC Commands ```javascript import { mockIPC, clearMocks } from '@tauri-apps/api/mocks'; import { invoke } from '@tauri-apps/api/core'; import { vi, describe, it, expect, afterEach } from 'vitest'; afterEach(() => { clearMocks(); }); describe('Tauri Commands', () => { it('should mock the add command', async () => { mockIPC((cmd, args) => { if (cmd === 'add') { return (args.a as number) + (args.b as number); } }); const result = await invoke('add', { a: 12, b: 15 }); expect(result).toBe(27); }); it('should verify invoke was called', async () => { mockIPC((cmd) => { if (cmd === 'greet') return 'Hello!'; }); const spy = vi.spyOn(window.__TAURI_INTERNALS__, 'invoke'); await invoke('greet', { name: 'World' }); expect(spy).toHaveBeenCalled(); }); }); ``` ### Mock Sidecar and Shell ...

Details

Author
dchuk
Repository
dchuk/claude-code-tauri-skills
Created
2 months ago
Last Updated
2 months ago
Language
N/A
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

terminal-emulator

Test interactive CLI/TUI applications using @microsoft/tui-test. Use when you need to test CLI tools with interactive prompts, TUI rendering, arrow key navigation, or any command that requires a TTY. Triggers include "test CLI", "test TUI", "run interactively", "automate terminal input", "simulate user input in terminal".

17,598 Updated 5 days ago
slopus
Testing & QA Listed

unit-testing

Unit testing patterns: Vitest config with v8 coverage, Testing Library behavior testing, MSW for HTTP mocking (vs jest.mock), it.each parametrized tests, spies vs mocks vs stubs, testing async code, snapshot testing guidelines. Use when writing unit and component tests.

11 Updated 1 months ago
rnavarych
Testing & QA Solid

e2e-testing

AI-powered E2E testing for any app — Flutter, React Native, iOS, Android, Electron, Tauri, KMP, .NET MAUI. Test 8 platforms with natural language through MCP. No test code needed. Just describe what to test and the agent sees screenshots, taps elements, enters text, scrolls, and verifies UI state automatically.

179 Updated 3 weeks ago
ai-dashboad
Testing & QA Featured

swift-testing-expert

Expert guidance for Swift Testing: test structure, #expect/#require macros, traits and tags, parameterized tests, test plans, parallel execution, async waiting patterns, and XCTest migration. Use when writing new Swift tests, modernizing XCTest suites, debugging flaky tests, or improving test quality and maintainability in Apple-platform or Swift server projects.

334 Updated 6 days ago
AvdLee
Testing & QA Solid

playwright-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from Cypress/Selenium. TypeScript and JavaScript.

185 Updated 1 weeks ago
testdino-hq