Overview
The QA service provides:- Test case tracking across builds and platforms
- Preview organization by QA cycle or sprint
- Test run management with detailed results
- Attachment support for screenshots and logs
- Test failure analysis with error details
Prerequisites
- Authenticate with Tuist Cloud
- Upload a preview
- Configure your project:
Config.swift
Test Case Management
Uploading Test Results
After running tests, upload results to Tuist Cloud:- Parses the XCResult bundle
- Extracts test cases and results
- Uploads to the QA service
- Links tests to the current build
Test Result Data
Uploaded test results include:- Test module and suite names
- Test case pass/fail status
- Duration for each test
- Failure messages and stack traces
- Attachments (screenshots, logs)
Manual Test Upload
Specify a build to associate with test results:Viewing Test Results
List Test Runs
View all test runs for your project:Test Run Details
Get detailed information about a test run:- Total tests passed/failed/skipped
- Test duration
- Associated build information
- Git commit details
- Environment (Xcode version, OS version)
Test Case History
View the history of a specific test case:- Recent pass/fail trend
- Average duration
- Failure patterns
- Related builds
Test Attachments
Test attachments (screenshots, logs, videos) are automatically uploaded with test results:Screenshot Attachments
When tests capture screenshots, they’re uploaded and viewable in the web interface:MyAppTests.swift
Log Attachments
Attach logs for debugging:Test Case Organization
Test Suites
Tests are automatically organized by suite:Test Modules
Multiple test modules are supported:- Unit tests
- UI tests
- Integration tests
CI/CD Integration
Automate test result uploads in your CI pipeline:GitHub Actions Example
.github/workflows/test.yml
GitLab CI Example
.gitlab-ci.yml
QA Workflows
Linking Previews to Test Runs
Associate test runs with specific preview builds:Test Plans
Organize tests by QA cycle or sprint:Test Analytics
The QA service provides analytics on:- Flaky tests: Tests that intermittently fail
- Slow tests: Tests with increasing duration
- Failure trends: Tests that fail frequently
- Coverage: Test coverage over time
Flaky Test Detection
Tuist automatically identifies flaky tests by analyzing:- Multiple runs of the same test
- Inconsistent pass/fail patterns
- Repetition results
Test Duration Trends
Track test performance over time:- Tests with increasing duration
- Slowest tests
- Total test suite duration trends
Web Interface
The Tuist Cloud web interface provides:- Dashboard with test run overview
- Test case browser with filtering and search
- Failure analysis with screenshots and logs
- Trend charts for test metrics
- QA reports for stakeholders
https://cloud.tuist.io/your-org/your-project/qa
Test Notifications
Configure notifications for test failures:Config.swift
Selective Testing
Use test history to run only relevant tests:Learn more about selective testing
Discover how to speed up test runs with selective testing
Advanced Features
Test Repetition Tracking
When using Xcode’s test repetition feature, Tuist tracks each repetition:- Which repetitions passed/failed
- Flakiness indicators
- Per-repetition duration
Custom Test Metadata
Add custom metadata to test runs:Test Case Grouping
Group tests by feature or area:Troubleshooting
Test Upload Fails
If test result upload fails:- Verify the XCResult bundle exists
- Check authentication:
tuist auth whoami - Ensure sufficient storage quota
Missing Test Attachments
If attachments aren’t showing:- Verify attachment lifetime is
.keepAlways - Check attachment size limits (50MB per file)
- Ensure XCResult bundle includes attachments
Test Results Not Linked to Build
If tests aren’t linked to the correct build:Best Practices
Always upload test results, even on failure
Always upload test results, even on failure
Upload test results from CI even when tests fail. Failure data is valuable for tracking issues.
Use test plans for organized QA cycles
Use test plans for organized QA cycles
Create test plans for each sprint or release cycle to organize QA efforts.
Review flaky test reports regularly
Review flaky test reports regularly
Monitor flaky tests and fix them to improve build reliability.
Capture screenshots on test failure
Capture screenshots on test failure
Configure UI tests to automatically capture screenshots when assertions fail.
Next Steps
Test Insights
Analyze test metrics and identify improvement opportunities
Selective Testing
Speed up test runs by testing only what changed