Skip to content

Conversation

@NakaokaRei
Copy link
Owner

Summary

  • Fixed all broken unit tests to work with the new modular architecture
  • Converted all tests from XCTest to Swift Testing framework
  • Added comprehensive test coverage for KeyboardTools
  • Added GitHub Actions workflow for automated testing

Changes

Test Framework Migration

  • Migrated all test files from XCTest to Swift Testing framework
  • Updated test assertions to use #expect syntax
  • Added parameterized tests using @Test(..., arguments:)

Test Fixes

  • Updated tests to use ToolRegistry instead of direct tool instantiation
  • Fixed parameter types to use MCP SDK's Value enum
  • Fixed assertions for CallTool.Result structure
  • Fixed optional unwrapping issues with isError property

New Tests

  • Added comprehensive KeyboardToolsTests with coverage for:
    • Basic key combinations
    • Alternative key names
    • Number and letter keys
    • Arrow keys
    • Error cases

CI/CD

  • Added .github/workflows/tests.yml for automated testing
  • Runs on push and pull requests to main branch
  • Tests both debug and release builds
  • Verifies package installation

Test Results

All 50 tests pass successfully:

  • ✅ Parameter Parser Tests
  • ✅ Mouse Tools Tests
  • ✅ Keyboard Tools Tests
  • ✅ Screen Tools Tests

Related Issues

  • Addresses test failures from the modularization refactor
  • Implements automated testing as part of improving code quality

🤖 Generated with Claude Code

NakaokaRei and others added 3 commits July 9, 2025 00:16
- Convert all tests from XCTest to Swift Testing framework
- Fix tests to work with new modular architecture using ToolRegistry
- Add comprehensive KeyboardToolsTests
- Update tests to use MCP SDK's Value type instead of JSONValue
- Add GitHub Actions workflow for running tests on push/PR
- Fix test assertions for CallTool.Result structure
- Remove coverage reporting from CI as requested

All 50 tests now pass successfully.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Change branch triggers from main to master

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Rename swift-build.yml to ci.yml for better clarity
- Add test job to run unit tests
- Keep both master and main branch triggers
- Separate test and build-release jobs for better organization
- Add installation verification in release build

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@NakaokaRei NakaokaRei merged commit b9e46c9 into master Jul 8, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants