CI CD Integration

You are here:
< All Topics

CI CD Integration

CI CD Integration is one of the crucial processes for DevOps. Continuous integration (CI) is an efficient automation process for developers. When the CI is successful, it refers to the fact that any new code updates or additions to your app are regularly created, tested as well as integrated to a shared hub. This method is especially helpful when you need to deliver apps regularly to clients where you can automate the various stages of app development. So, with Continuous Integration, continuous delivery (CD) helps software development professionals deliver apps fast through the pipeline.

TestGrid platform helps you with smoother integration and delivery through an automated scriptless method.

To integrate TestGrid test case execution with any CI tool, we have to follow the 3 step process:

    1.  Get the parameter values for the CI API call.
    2.  Build your CI CD API URL
    3.  Call the TestGrid CI API from CI CD tools i.e. Jenkins.

1. Getting the parameter values for TestGrid CI API

    • Login to the TestGrid website.

Getting the parameter values for TestGrid CI API

    • Click on TestGrid TestCase Writer and select the Application you want to integrate with Jenkins.

select Application to integrate with Jenkins in TestGrid Automation Testing tool

    • Click on the version name of the test cases you want to automate. (i.e. 1.0)

version name of the test cases in TestGrid Automation Testing tool

    • Click on the “i” button, a new tab will open with all the parameter values for TestGrid CI API for that version.

continuous integration document in TestGrid Automation Testing tool

2. Build your CI-CD API URL

    • Download the TestGrid CI-CD Postman collection from here and import it into the postman.
    • Once you import the postman collection you can see 3 APIs under “TG CI CD API” collection

CI CD request urls in TestGrid Automation Testing tool

    • Select the API based on the device Operating system and Automation framework.

API based on the device Operating system and Automation framework in TestGrid Automation Testing tool

    • Fill all the values for the API parameters with the values we got from the previous step. Click on the Send button to test the API.

 API parameters in TestGrid Automation Testing tool

    • Verify the response status and message for successful build execution on the TestGrid server.

3. Call the TestGrid CI API from CI CD tools

We can take Jenkins as an example of the CI CD tool.

    • Login into the Jenkins web console

    • Click on your application

Jenkins dashboard

    • Click on the Configure button to go to the Jenkins application configurations.

Jenkins application configurations

    • Scroll to the Build section. In the build step add the TestGrid CI integration API call. Based on your test case automation platform type, device operating system type, and launching the application with bundle identifier or IPA/APK file there are following different API calls.

Selenium Web With Website URL.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F process_type=ow \
-F s_device=Device_Token \
-F test_website_url=URL \
-F verion_module_id=module_id

Appium iOS With Bundle Identifier.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oia \
-F s_device=Device_Token \
-F bundle_identifier=Bundle_Identifier_Of_Application

Appium iOS With IPA file.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oia \
-F s_device=Device_Token \
-F zip_file=IPA_File

 XCTest iOS With Bundle Identifier.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oix \
-F s_device=Device_Token \
-F bundle_identifier=Bundle_Identifier_Of_Application

 XCTest iOS With IPA file.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oix \
-F s_device=Device_Token \
-F zip_file=IPA_File

 Appium Android With Bundle Identifier.

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oaa \
-F s_device=Device_Token \
-F bundle_identifier=Bundle_Identifier_Of_Application

 Appium Android With APK file

      • Syntax:
curl -X POST \
https://www.testgrid.io/ci/ \
-F user_token=Token_For_Registered_User_Account \
-F application_token=Token_For_Registered_Application \
-F version_token=Token_For_Version_Of_TestCases \
-F version_module_id=Id_For_Module_Of_TestCases \
-F process_type=oaa \
-F s_device=Device_Token \
-F zip_file=APK_File

 

 

Table of Contents