XCUITest Goblin
Find orphaned tests, inconsistent naming, overused identifiers, bloated test files, and more — in under 1 second.
A zero-dependency CLI tool that analyzes your iOS XCUITest suite and surfaces actionable recommendations to keep your tests healthy.
📊 View Sample Report — See what XCUITest Goblin finds in a real project
Why Use This?
Your test suite grows organically. Tests get added, renamed, skipped, forgotten. Before you know it:
- 431 tests aren't in any test plan (they never run in CI)
- 16 files don't follow your naming convention
- 3 files have 30+ tests and are impossible to maintain
- 61 accessibility IDs are defined but never used in tests
- 5 test methods don't follow your naming convention
This tool finds these issues instantly and tells you exactly what to fix.
Quick Start
pip install xcuitest-goblin
xcuitest-goblin analyze /path/to/your/ios-project
That's it. In under a second, you get a full analysis report.
Example Output
✓ Analysis complete!
Results:
- 58 test files
- 505 test methods
- 84 accessibility IDs
- 15 test plans
Output: ./analysis/
Time: 0.15s
Sample Recommendations
## Recommendations
- **Split Large Test Files:** 3 file(s) contain more than 30 tests
- **Standardize File Naming:** 71.9% consistent, 16 non-compliant files
- **Standardize Method Naming:** 99.0% consistent (camelCase expected)
- **Refine Generic Accessibility IDs:** Done (150 uses), Cancel (58 uses)
- **Remove Unused Accessibility IDs:** 61 IDs defined but never used
- **Add Orphaned Tests to Plans:** 431 tests never run in CI
Use in Your PR Workflow
Add to your CI pipeline to catch test hygiene issues before they merge:
- name: Analyze Test Suite
run: |
xcuitest-goblin analyze . --quiet
# Fails if critical issues found (coming soon)
Keep your test suite healthy with every PR.
Configurable Thresholds
Customize what triggers recommendations via thresholds.json:
| Section | Threshold | Default | Triggers When... |
|---|---|---|---|
test_inventory |
large_file_threshold |
30 | File has more than 30 tests |
test_file_naming |
pattern |
[Feature]Tests.swift |
Expected naming pattern (null to skip) |
test_file_naming |
consistency_threshold |
90% | File naming consistency below 90% |
test_method_naming |
pattern |
camelCase |
Expected style (camelCase/snake_case/BDD) |
test_method_naming |
consistency_threshold |
85% | Method naming consistency below 85% |
accessibility_ids |
generic_id_usage_threshold |
50 | ID used 50+ times |
accessibility_ids |
unused_ids_threshold |
0 | Any ID defined but unused |
test_plans |
orphaned_tests_threshold |
0 | Any test not in a plan |
xcuitest-goblin analyze /path/to/project --config ./my-thresholds.json
See Configuration Guide for all options.
Output Files
| File | Contents |
|---|---|
ANALYSIS_REPORT.html |
Interactive HTML report with recommendations |
test_inventory.json |
All test files, classes, methods |
accessibility_ids.json |
ID usage patterns and definitions |
test_plans.json |
Plan analysis, orphaned tests, overlaps |
screen_graph.json |
Navigation patterns (if detected) |
Installation
From PyPI (recommended)
pip install xcuitest-goblin
From Source
git clone https://github.com/jmcy9999/xcuitest-goblin.git
cd xcuitest-goblin
pip install -e .
Requires Python 3.10+. No external dependencies.
Documentation
- Usage Guide — CLI options, examples, configuration
- HTML Report Spec — Complete HTML report acceptance criteria
Try It Out
Give XCUITest Goblin a spin on your project and let us know what you think! We'd love your feedback — open an issue with suggestions, bug reports, or feature requests.
More features coming soon: CI integration with exit codes, test coverage analysis, flaky test detection, and more.
License
MIT
Metadata
Release files for xcuitest-goblin 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xcuitest_goblin-2.2.1.tar.gz | 58.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xcuitest_goblin-2.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 107.2 kB
Release files / xcuitest_goblin-2.2.1.tar.gz
| Download URL | xcuitest_goblin-2.2.1.tar.gz |
|---|---|
| Size | 58.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
425af41ef42397a92968411fab52e350cb80f16222bbeef86b199682aa15189b
|
|
BLAKE2b-256 checksum How to use checksums |
2aa13c9ec36adf9a140d74ae8955e0e35876fe05abee880b3d2ba45b7104163d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / xcuitest_goblin-2.2.1-py3-none-any.whl
| Download URL | xcuitest_goblin-2.2.1-py3-none-any.whl |
|---|---|
| Size | 48.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb3bed197e107b5b6c9ea388da05c0cfa89434fa066434423b26cb4b746ec9eb
|
|
BLAKE2b-256 checksum How to use checksums |
1d5560101c92b5a7276c7abe64db21c350604a093dda87f2612830ca66702092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|