GitHub Jobs
Launching Automation Jobs in GitHub Actions
Automation Launching is a Testmo Enterprise feature.
If you’re not sure which plan your Testmo account is on or want to learn more about Testmo Enterprise, please feel free to contact our team!
Testmo enables you to launch automated test runs using GitHub Actions workflows directly from the Testmo Automation Jobs view in any project. This only requires an existing GitHub integration configuration of one or more GitHub targets. Any test automation tool, framework and platform can be used.
You can launch simple GitHub Actions Workflows (such as running just a single test automation suite) as well as complex pipelines with multiple test suites (e.g. frontend, backend, API etc.) and even parallel testing jobs with multiple threads. See our GitHub Actions test automation article for a complete guide.
Testmo’s existing GitHub app requires enhanced permissions to function correctly with the new automation launching capabilities. The following steps should be completed by Testmo & GitHub admins for a seamless experience:
Approve (or ask your GitHub project administrator to approve) the new settings via the Testmo App:
Navigate to the Testmo GitHub app via https://github.com/apps/testmo-app and click the Configure button to see which GitHub repositories the app is installed for.
Approve the permission change for each repository you want to use the app in.
Re-authorize the existing Testmo-GitHub connection:
Navigate to the Admin > Inegrations view and click the "Edit" button on your existing connection(s)
Click the "Authorize with GitHub" button to re-authorize the app with the new permissions.
If you haven't already installed and connected GitHub with your Testmo instance, no actions are required. Installation of the GitHub app in your repositories will require you to confirm the new permissions during the initial setup stage.
Overview
Regardless of your specific configuration and workflow, the basic concept of launching Automation Jobs from Testmo is always the same.
From the Automation > Jobs view in Testmo, click on the Add Automation Job button.
Select the desired target (the CI/CD pipeline) for the job, and confirm the job.
Testmo will trigger the job and let you know whether it was started successfully.
Configuring the GitHub Actions automation launching integration
To launch automated tests in GitHub Actions, you first need to set up a secured integration with GitHub. If you have already configured the GitHub Issues integration for your Testmo instance and updated the permissions for your GitHub Testmo app, you may be able skip to the next step (as the GitHub Issues integration and GitHub Action automation launching integration can use the same connection). Otherwise, follow the steps below to connect your GitHub account.
Note: You will need Site Admin permissions in Testmo and to be an organization owner of your GitHub account (or have admin permissions in a GitHub repository) to configure the Testmo GitHub Actions integration.
Navigate to the Admin > Integrations view in your Testmo instance
From the list of integrations, select GitHub
Click + GitHub account
In the Add connection dialog, enter the details of your GitHub account:
Name: Enter the name you want to use for the integration. The name will be displayed in Testmo when choosing a connection for the issue tracker integration or automation targets. This could be your organization (company) name, team name, project name or similar.
GitHub account: Enter your GitHub account name that you want to use for the integration. You will be able to create new issues for repositories of this account (you can add multiple integration connections to integrate multiple accounts). This can be a GitHub organization account or personal account.
Install Testmo app in GitHub: Click this button to navigate to GitHub to install the official Testmo GitHub app. If you have access to multiple GitHub accounts, select the correct GitHub account you entered above. You need to be an organization owner or have admin permissions in a repository to install the app.
Authorize with GitHub: Click this button to authorize the new integration connection with GitHub.
Test connection: You can click this button to make sure everything works.
Save connection: Click Add connection to save the new connection.
The new connection has been created.
Setting up GitHub Actions automation targets
Once you have connected to your GitHub account, you can set up an automation target in Testmo. Automation targets give you a way to specify pipelines, branches, or tags that you would like to be able to trigger ahead of time. While setting up automation targets, you can also include unique parameters, inputs, or variables to trigger pipelines for particular environments, datasets, etc.
To set up an automation target in Testmo, you will need to have an existing GitHub Actions workflow in your connected GitHub repository (e.g. the workflow you would like to trigger from Testmo). Additionally, you should double-check that you have enabled workflow dispatch for your workflow by adding on: workflow_dispatch
in your workflow's .yml file.
To create a new target for your automation job, simply follow these steps:
In the Admin > Automation view, under Job Launching, click the + Target button
In the Add target dialogue:
Name: Give your target a suitably descriptive name (you’ll need to be able to easily identify it when adding jobs, later)
Connection: Select the CI/CD connection you would like to use for this target, GitHub in this scenario.
Repository: Add the Repository path from GitHub
Testmo expects your GitHub account owner & name of the repository will be entered here.
When you navigate to a repository in GitHub, it’ll be the following string from the URL: owner/repository (after https://github.com/), e.g. “mike1234/myapp”
Workflow: Add the Workflow ID from GitHub
Use the full name of the workflow file including the .yml suffix, e.g. “test-parallel.yml”.
Note that the workflow must be configured to use workflow dispatching. The workflow_dispatch event enables Testmo to trigger this workflow via GitHub's API.
Reference: Add the repository branch or tag name to be used in the pipeline
This will be specific to your repository, and can be found in various GitHub views.
Inputs: Under the Inputs tab in the target setup dialogue, add any inputs you wish to supply to GitHub as part of the workflow
We expect automation launching may be used alongside parameters such as the browser, environment or platform to be tested, although you may define many other kinds of variables in your workflow's .yml file!
You may also wish to set up more advanced logic/switching scenarios. Please refer to GitHub documentation for how variables may be used in the context of a pipeline.
The Testmo CLI also provides advanced switching mechanisms, for which more information is supplied here: Reference | Testmo Docs
Under the Projects tab, you can select which Testmo projects you would like this target to be available for
By default, automation targets will be available for all Testmo projects.
Click Add target to save the target once you’ve added all the settings & inputs
Your automation target is now ready to trigger with an automation job in the Automation > Jobs view of any enabled project in your Testmo instance.
Using Automation Jobs to launch GitHub Actions workflows
Once you have set up an automation target, you can use Automation jobs to trigger your GitHub Actions workflows right from Testmo.
Navigate to the Automation > Jobs view of one of your projects, then click Add job.
For more on automation jobs, see Automation jobs.
Basic automation launching workflow with Testmo & GitHub Actions
Testmo comes with full support for GitHub Actions workflows. You can read more information about how to set up a test automation pipeline using the Testmo CLI here: GitHub Actions Test Automation CI Pipeline & Reporting
Automation launching is designed to build on your existing pipeline workflow by providing testers with a capability to launch their automation pipelines directly from Testmo’s Automation > Jobs area.
A basic workflow might look like this:
Add an automation job to launch your target GitHub Actions workflow
GitHub Actions executes your automated tests controlled by the workflow
GitHub Actions submits test results back to Testmo using the Testmo CLI
Permissions and Access to Automation Launching
Testmo makes it easy for you to control where your jobs can be launched and by whom.
When setting up GitHub targets, you can select which projects they may be used in via the Target > Projects tab. Simply enable the target for all projects, or select which one(s) you wish to use it in:
If you want to limit which user types are able to launch automation jobs from the Testmo UI, you can control this via the Users & Roles > Roles & Permissions settings in the Admin area. Simply create or edit the user role and apply or deselect the permissions from it:
FAQs
To read more about frequently asked questions around automation launching and GitHub Actions, see our Automation Jobs FAQs page.
Further links, references and guides
Refer to the documentation below for more information about GitHub integration and usage alongside Testmo:
Last updated