gpui-testing

Create and execute GPUI unit, integration, and visual tests.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/onehr/gpui-skills --skill gpui-testing-onehr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpui-testing
Source: https://github.com/onehr/gpui-skills/tree/main/skills/gpui-testing
Command: npx skills add https://github.com/onehr/gpui-skills --skill gpui-testing-onehr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the process of writing and running tests for GPUI applications, ensuring the reliability and correctness of your UI components and application logic.

Core Features & Use Cases

  • Unit Testing: Write tests for individual components and logic using #[gpui::test].
  • Integration Testing: Simulate user interactions like keyboard input, mouse clicks, and action dispatching.
  • Visual Testing: Use VisualTestContext for tests that require visual output verification.
  • Debugging: Easily debug test failures by understanding the execution flow and state.

Quick Start

Write a basic GPUI test using the #[gpui::test] attribute and TestAppContext.

Frequently Asked Questions about gpui-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write tests for GPUI applications?

To write tests for GPUI applications, use the #[gpui::test] attribute with TestAppContext to execute unit tests and verify individual component logic and state.

Can I simulate user interactions like mouse clicks in GPUI testing?

Yes, GPUI testing supports integration testing by simulating user interactions like keyboard input, mouse clicks, and action dispatching to ensure application stability and correctness.

What is VisualTestContext used for in GPUI tests?

VisualTestContext is used in GPUI tests for visual testing scenarios that require visual output verification, ensuring the rendered UI components match the expected visual state.

Does GPUI testing support debugging test execution flow?

Yes, GPUI testing supports debugging by allowing you to easily debug test failures through understanding the execution flow and verifying the component states within the test context.

What is the best way to verify component states in a GPUI application?

The best way to verify component states in a GPUI application is by using TestAppContext to simulate interactions and assertions, ensuring the reliability and correctness of your UI components.

Why do I need a test context for GPUI visual testing?

You need a test context like VisualTestContext for GPUI visual testing to properly manage the visual output verification process and ensure the application renders correctly during simulated interactions.