How qawolf/fastlane-plugin-qawolf works
Project type and purpose
• This is a Fastlane plugin written in Ruby, named fastlane-plugin-qawolf.
• Its purpose is to extend Fastlane with QA Wolf–specific actions:
• inject instrumentation into an iOS IPA
• upload APK/IPA/AAB artifacts to QA Wolf storage via API
• optionally trigger a QA Wolf test run via API
File structure
• Top‐level:
• fastlane-plugin-qawolf.gemspec, Gemfile – defines the Ruby gem
• fastlane/ – example Fastfile demonstrating plugin usage
• lib/fastlane/plugin/qawolf/ – plugin code:
– actions/ – each Ruby file implements a Fastlane action (inject, upload, notify)
– helper/ – shared utility code
– assets/ – native instrumentation library (instrumentation.dylib)
• scripts/ – standalone shell helper to inject instrumentation
• spec/ – RSpec tests for each action
README for insights
• Confirms three primary actions: inject_qawolf_instrumentation, upload_to_qawolf, notify_deploy_qawolf.
• Describes external dependencies:
• Fastlane core
• QA Wolf HTTP API (requires QAWOLF_API_KEY, QAWOLF_BASE_URL)
• iOS code signing (for re–signing instrumented IPA)
Main components
• Developer’s CI/CD environment
• Fastlane core process (reads Fastfile, loads plugin)
• Ruby runtime + Gem (fastlane-plugin-qawolf)
• Plugin internals
• Action layer (three actions)
• Helper layer
• Asset layer (instrumentation binary)
• Shell script fallback (inject_qawolf_instrumentation.sh)
• External systems
• Mobile build tools (Xcode / Gradle) → produce IPA / APK / AAB
• Code signing service (re‐sign instrumented IPA)
• QA Wolf REST API →
– Artifact storage endpoint
– Test trigger endpoint
• Artifact flow
1. Fastlane lane invokes a build action → IPA/APK
2. inject_qawolf_instrumentation action → modifies IPA via asset or script
3. upload_to_qawolf action → multipart HTTP POST to QA Wolf storage
4. notify_deploy_qawolf action → HTTP POST to QA Wolf test‐run endpoint
Architectural patterns and design principles
• Plugin pattern: code is structured into discrete Fastlane actions under actions/.
• Separation of concerns:
• Actions handle parameter parsing & API calls
• Helper modules supply shared logic (e.g., HTTP client)
• Assets and scripts handle native instrumentation injection
• Testable units: Each action is accompanied by an RSpec test in spec/.
Essential elements to capture
• Fastlane startup: Gemfile → Pluginfile → plugin code
• Action sequence in the user’s Fastfile lane
• Native instrumentation asset or shell script
• HTTP interactions with QA Wolf (upload, notify)
• Test suite folder (spec/) as validation layer