Deploying iOS(.iPA file) through Jenkins to TestFairy

Jenkins:

Jenkins is one of the most popular Continuous Integration Tool(CI), which helps the Mobile apps(iOS / Android) to be distributed on “one-click”.

Jenkins will ease the way we distribute our builds.

TestFairy:

TestFairy is a third party tool used for Deploying .iPA, .APK for testers. TestFairy has the following to keep track of your application:

  • Crash Reports
  • User Session Recordings
  • Device Metrics(CPU,Memory,Application Logs,Network Requests)
  • User Feedback

Manual Approach to Deploy iOS Builds to TestFairy:

  1. Clean and build the project.
  2. Archive the project
  3. Export the .archive as an .iPA file
  4. Login to TestFairy and choose upload an iOS app
  5. Upload the .iPA and distribute to all the Testers by selecting the tester email added.

Automated Approach using Jenkins:

  1. Push your latest code to GIT.
  2. Trigger the Jenkins Build, Jenkins will take care of the rest.

The first step to automate your builds is to configure Jenkins.

Jenkins Configuration:

  • Download Jenkins from the following URLhttps://jenkins.io/
  • Start Jenkins using the following command: 
    $ nohup java -jar ~/Downloads/jenkins.war –httpPort=8081 –ajp13Port=8010 > /tmp/jenkins.log 2>&1 &
  • Now you can see Jenkins running at the following host:
    http://localhost:8081/
  • Navigate to Manage Jenkins > Manage Plugins.
  • Filter by Xcode integration and select it to install. Repeat this step using TestFairy.
  • Click on button Install without restart after having the plugins selected.
  • Click on button Restart Jenkins when the installation is complete.
  • Select New Item on Jenkins home page and add the Name of the project
  • Your project will be displayed on the home screen, click on your project and then on Configure.
  • Configure GIT(so that Jenkins knows about your project repository and current branch)
  • Configure Xcode plugin:
  • Xcode plugin advanced settings: Note: While configuring Xcode advanced settings please check for .workspace and .xcodeproject settings
  • TestFairy Plugin Settings: We will be getting TestFairy API key from TestFairy account settings.
  • Configure all the settings and save.
  • To trigger the build, click Build Now under your project settings.

To stop Jenkins use:

Reference Links:

Leave a Reply

Your email address will not be published. Required fields are marked *