Testing Farm
In this guide, you’ll learn how to add a custom integration test in Konflux that uses Testing Farm as a third-party backend for test execution.
-
You have created an application in Konflux
-
You have a Testing Farm API key, which can be acquired by following the Testing Farm onboarding guide.
-
You have or are ready to create a git repository with fmf files suitable for use with the tmt testing tool. This is the testing technology used by Testing Farm. If you don’t have fmf tests already prepared, you can use our tmt hello world repository.
You need to perform two major steps. Upload your Testing Farm API key, and register an Integration test to send requests to the Testing Farm API. Complete the following steps in the Konflux console:
Follow the instructions in the creating secrets guide, with the following details:
-
For Secret name, enter
testing-farm-secret
. -
Under Key/value secret, expand Key/value 1, then enter the key name
testing-farm-token
.
Be sure that the secret name is testing-farm-secret and the key name is testing-farm-token . The tekton task expects the secret and key name to be named these strings exactly.
|
-
For Upload the file with value for your key or paste its contents, paste the value of your token into the space under Upload.
Follow the instructions in the adding an integration test guide, with the following details:
-
In the GitHub URL field, enter
https://github.com/ralphbean/testing-farm-tekton
, which is a git repository containing a tekton pipeline and task that can send requests to the Testing Farm API. -
In the Path in repository field, enter
pipelines/testing-farm.yaml
, which refers to this path in the repo. -
Expand the Parameters field.
-
Select Add parameter. For the Name field, enter
GIT_URL
. For the Value field, enter the url to the git repository that contains your fmf files. If you do not have any, try using our tmt hello world repository to try it out. -
Optional: Select Add parameter. For the Name field, enter
COMPOSE
. For the Value field, enter a valid Testing Farm compose identifier. TryFedora-40
.
To start building a new component, either open a new pull request (PR) that targets the tracked branch of the component in the GitHub repository, or comment '/retest' on an existing PR.
When the new build is finished:
-
Go to the Integration tests tab and select the highlighted name of your test.
-
Go to the Pipeline runs tab of that test and select the most recent run.
-
You should be able to find the testing-farm URLs in the logs.
-
Edit the integration test if it is not properly configured.