Integrate Testsigma with Bitrise CI


Bitrise is a CI tool specifically designed for mobile continuous integration and delivery system for iOS and Android native apps. Bitrise is an enterprise product and hence provides support for build executions on Linux and Mac Os as well.


Pre-requisite:

User needs a repository where the steps mentioned in a shell script file can be uploaded and updated.


Steps to follow:

Below we will cover the steps in 3 parts:

  • Create Workspace
  • Add an app by selecting the Account / Workspace.
  • Configure the shell script as Step

Let’s begin.

Part1: Create Workspace

  1. Once a user logs in, user has to create a workspace. A workspace can be created either byusing the plus icon on the screen or under the profile picture of the user.

    Create Work space Step 1

    Create Work space Step 2

  2. Mention the name of the workspace you would like to create: Fill workspace name

Part2: Add an app by selecting the Account / Workspace.

  1. Once the workspace is created, proceed to add the app: Add new app
  2. Proceed with the steps to add an app by selecting the Account / Workspace.
  3. Set the privacy for the app as per your requirement: Choose account
  4. Once the privacy option is selected, Next button will be activated. Click on Next button.
  5. You would be prompted to choose a repository for the workspace from a list of options. You can even setup a path manually by selecting the manual setup option: Choose repo Connect repo
  6. In case the repository is not a public repository, please update the link for repository accordingly: Connect repo
  7. Choose a branch for the build Select Branch
  8. Bitwise will try to connect and verify the repository. This is when Bitwise tries to configure the app. This might take a few seconds.
  9. If the system is unable to verify the repository, you can update the URL or even proceed to configure the same manually Manual Configure
  10. Click on Proceed to move to the next step.
  11. Select an appropriate option from the project build configuration list Select App Type
  12. Click ‘I m ready’ and then click on Finish and will see bellow screen if everything is proper Successfully added App

Part3: Configure the shell script as Step

  1. Select the App and move to the Workflow Editor. Workflow builder
  2. In the workflow editor, you can define your own workflow and add steps accordingly.
  3. You can also remove the steps that got added to the build flow automatically, incase the steps are not needed.
  4. Inorder to delete any steps, select the step by clicking on it and scroll down until the Delete Step button is visible. Workflow builder - delete step
  5. Click ‘Delete Step’ button to delete the steps.
  6. Click on the + icon to add a new step Workflow add shell
  7. Search for the task that you want to add as part of the step. Workflow step runner
  8. Select the task and then modify / update the field values for the respective task.
  9. In this case to execute the Test Plan developed in Testsigma, you have to update the filename / filepath of the shell script file
    Ex: bitrise.sh file should be available in the repository specified for this app. You need to place the shell script from page into bitrise.sh file and update below properties

    • TESTSIGMAAPIKEY
    • TESTSIGMATESTPLAN_ID
    • MAXWAITTIMEFORSCRIPTTOEXIT
      Workflow step inputs
  10. This shell file has the details of the steps and the Test plan ID so that the execution can be polled and mapped accordingly.
  11. Once all steps are updated, click on the save button to save the build pipeline. Workflow Save
  12. Once the build pipeline is saved successfully, you can trigger the build run or even schedule the run. Schedule Build
  13. Select appropriate details and click ‘Start Build’ button. Workflow form
  14. Logs can be viewed in the build run section.
  15. Upon execution of all steps, the build status is marked as passed or failed accordingly.

That's it.