Integrate AgileTest into GitHub CI/CD pipeline

Integrate AgileTest into GitHub CI/CD pipeline

Do you know that now you can import automated tests via pipeline trigger onto AgileTest?

But first, let’s start by learning what GitHub is:

GitHub provides a comprehensive CI/CD tool that enables automated testing and deployment processes for software development projects. With GitHub Actions, developers can create workflows to build, test, and deploy code directly within their repositories.

You can follow the video below for guidance on how to integrate GitHub with AgileTest

These are the detailed steps to follow:

Step 1: Generate Client ID & Client Secret

In AgileTest, first, access Jira's admin settings to generate a token for API access, then securely copy the provided Client ID and Secret. These credentials are essential for authenticating your pipeline with AgileTest.

  • Log in to Jira as an admin, then head to Admin settingsAgileTestAPI Integration.

  • Click Generate New Token, select a user, and generate it.

  • Copy the Client ID and Client Secret - keep them secure, as you’ll need them later.

Step 2: Create GitHub Token

Generate a personal access token in GitHub with write:packages permission to allow pipeline actions. This token enables your workflow to interact with GitHub's features securely.

  • On GitHub, go to SettingsDeveloper settingsPersonal access tokens → Token (Classic).

  • Click Generate new token, name it (e.g., "AgileTest Integration"), and enable write:packages

  • Generate it, copy the token, and store it safely.

Step 3: Create Pipeline Configuration YAML file

Create a workflow file in your repository to automate testing, authentication, and result uploads using the provided template. Customize it with your test commands and add your secrets (like the Client ID and Secret) in the repository settings.

  • In your GitHub repository, create a .github/workflows folder if it doesn’t exist.

  • Add a file named sample.yml. You’ll need to customize it with your test commands and secrets. This includes:

  1. API to Authenticate and get the token

  2. API to Upload the test results

  3. Parameters of AgileTest: PROJECT_KEY, TEST_EXECUTION_KEY, milestoneId, testEnvironments, testPlanKeys, revision, fixVersions

Example: Authenticate and Upload Test Results

Here’s a snippet that demonstrates how to authenticate with AgileTest and upload results using a JUnit report:

  • After pasting, go to your repository’s SettingsSecrets and Actions, and add your Client ID, Client Secret, and other details as secrets. Save and commit the file.

Step 4: Create Pipeline Trigger in AgileTest

To enable AgileTest to initiate your GitHub pipeline remotely, you’ll need to configure an automation trigger. This allows you to run automated tests from AgileTest without switching tools.

Steps to set it up:

  1. In AgileTest, go to Settings → Automated Test → GitHub

  2. Click “New Configuration”.

  3. Fill in the following:

  • Repository name: (e.g., your-username/your-repo)

  • Workflow file name: (e.g., sample.yml)

  • GitHub token: Use the token generated in Step 2

4. Click Save, and then toggle the Active switch to enable the configuration.

This setup allows AgileTest to trigger your GitHub Actions workflow directly from the Test Execution ticket.

For a detailed step-by-step guide, visit the official documentation: Trigger build remotely with AgileTest – GitHub

Step 5: Trigger Results from Execution Issue

Trigger the pipeline from AgileTest and monitor its progress in GitHub Actions to ensure successful execution. Once complete, check AgileTest for the imported test results.

  • In the test execution ticket, find AgileTest field, choose your GitHub configuration, and click Trigger pipeline.

  • Monitor progress in your GitHub repository by clicking on each pipeline.

  • Once complete, check AgileTest for the results.

Conclusion

With these steps, you’ve connected AgileTest to your GitHub CI/CD pipeline, making your testing process faster and easier. Give it a try today and see how it improves your workflow. Check the official documentation for more details: https://docs.devsamurai.com/agiletest/github!

To view or add a comment, sign in

Others also viewed

Explore topics