---
name: xctest-ui-test-generator
description: Generate XCTest UI tests for macOS applications with accessibility identifiers and page object patterns
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
tags: [macos, xctest, uitesting, swift, testing]
graph:
  domains: [domain:software-engineering]
  specializations: [specialization:desktop-development]
  skillAreas: [skill-area:desktop-ui-frameworks, skill-area:component-testing]
  roles: [role:desktop-developer, role:fullstack-engineer]
  workflows: [workflow:feature-development, workflow:release-management]
  topics: [topic:accessibility]
---

# xctest-ui-test-generator

Generate XCTest UI tests for macOS applications. This skill creates UI test classes with accessibility identifiers, page object patterns, and proper test organization.

## Capabilities

- Generate XCUITest test classes
- Create page object pattern implementations
- Set up accessibility identifiers
- Generate test data factories
- Configure UI test schemes
- Create screenshot capture helpers
- Set up performance testing
- Generate test plans

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "projectPath": { "type": "string" },
    "targetViews": { "type": "array" },
    "usePageObjects": { "type": "boolean", "default": true },
    "generateAccessibilityIds": { "type": "boolean", "default": true }
  },
  "required": ["projectPath"]
}
```

## Generated Test Class

```swift
import XCTest

final class MainViewUITests: XCTestCase {
    var app: XCUIApplication!

    override func setUpWithError() throws {
        continueAfterFailure = false
        app = XCUIApplication()
        app.launchArguments = ["--uitesting"]
        app.launch()
    }

    func testMainViewLoads() throws {
        let mainView = app.windows["MainWindow"]
        XCTAssertTrue(mainView.waitForExistence(timeout: 5))

        let titleLabel = mainView.staticTexts["welcomeLabel"]
        XCTAssertTrue(titleLabel.exists)
        XCTAssertEqual(titleLabel.label, "Welcome")
    }

    func testNavigationToSettings() throws {
        app.menuItems["Preferences…"].click()
        let settingsWindow = app.windows["SettingsWindow"]
        XCTAssertTrue(settingsWindow.waitForExistence(timeout: 2))
    }
}
```

## Related Skills

- `swiftui-view-generator`
- `desktop-ui-testing` process


---
Source attribution: a5c-ai
Original project: https://github.com/a5c-ai/babysitter
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: a5c-ai
Original project: https://github.com/a5c-ai/babysitter
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Development & Engineering
Roles: Frontend Developer, Mobile Developer, QA / Test Engineer
Specialties: Cross Platform, Testing
Tools: Xctest
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: a484063e03299c631f7aaa49bce56f9c19f9511711dc96dd6222fd97b083ef7f
