You have owner permission to the GitHub repository
HyperTest CLI is called from your CI tool(GitHub Actions, Jenkins, etc) on pull request events.
Refer CI Integration
Sample file
A sample CI file for github-actions can be found below
.github-actions.yml
# This is a basic workflow to help you get started with Actionsname:CI# Controls when the workflow will runon:# Triggers the workflow on push or pull request events but only for the "main" branch# push:# branches: [ "main" ]pull_request:branches: [ "main" ]# Allows you to run this workflow manually from the Actions tabworkflow_dispatch:env:HT_BASE_URL:'${{ secrets.HT_BASE_URL }}'HT_COMMIT_HASH:'${{ github.event.pull_request.head.sha }}'## required because checkout creates a detached commit with a different sha HT_API_TOKEN: '${{ secrets.HT_API_TOKEN }}'HT_API_TOKEN:'${{ secrets.HT_API_TOKEN }}'## required only for K8s based HT setup, Not for Linux based HT setup## Read below documentation for these Variables, if you are passing variables here you dont need to do Step 3GITHUB_CONFIG_REPO_URL:'${{ secrets.GITHUB_CONFIG_REPO_URL }}'## your github repository URLGITHUB_CONFIG_INSTALLATION_ID:'${{ secrets.HT_BASE_URL }}'# HyperTest's Github App Installation ID# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs:# This workflow contains a single job called "build"build:# The type of runner that the job will run onruns-on:ubuntu-latest# Steps represent a sequence of tasks that will be executed as part of the jobsteps:# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses:actions/checkout@v3# Runs a single command using the runners shell - name:Run a one-line scriptrun:echo Hello, world!# Runs a set of commands using the runners shell - name:Run a multi-line scriptrun:| echo Add other actions to build, echo test, and deploy your project.deploy-to-test-env:runs-on:ubuntu-lateststeps: - uses:actions/checkout@v3with:ref:${{ github.event.pull_request.head.sha }} - name:Run a multi-line scriptrun:| echo Add other actions to build, echo test, and deploy your project. printenv | sorthypertest-start-test:runs-on:ubuntu-lateststeps: - name:download HyperTest clirun:wget -O ht-cli.tar.xz https://hypertest-binaries-1.s3.ap-south-1.amazonaws.com/ht-cli/ht-cli-latest.tar.xz && tar xvf ht-cli.tar.xz - name:check if HypertTest can run testrun:./hypertest can-run-test - name:start new test from HyperTest CLIrun:./hypertest start-new-test
Click install and select the repositories for which you would like to install the HyperTest app.
Alternatively, you may also check if you have already installed the hypertest app, by navigating to the repository settings
Under "Integrations", select "GitHub apps"
Click on the "Configure" button.
Step 2: Copy the GitHub installation ID and repo URL
Copy the GitHub installation ID from the address bar of your browser. Refer to the Image below. Here the installation ID is 24858790
Step 3: Update HyperTest Configuration
To publish reports on your CI, we need to provide above ID's etc to HyperTest. You can either add it is a configuration in HyperTest Dashboard's Service Configuration or pass it as environment variable in your CI, while starting a test.
If you have already passed the Github Repo Url and Installation ID in your CI file, you dont need to do Step 3.
Below is example for both
a. HyperTest's Dashboard Configuration
Add both the installation ID and Repo URL in HyperTest's configuration. This can be done by navigating to the Settings page in HyperTest Dashboard. Click on Service Configuration and paste the ID and repo URL.