Configuration File
In this section we will learn about all the configuration parameters that are required in order to configure the test-at-scale self hosted mode. This file will contain the parameters such as:
- LambdaTest Secret Key : required to link your self hosted environment with the TAS server.
- Git Token : required to clone your repositories to your self hosted environments while running the test execution jobs.
- Some other optional parameters such as Repository Secrets etc.
- Do not change the predefined ContainerRegistry settings inside this file
All the configuration parameters are explained in detail below.
Parameters
LambdaTest Secret Key
This specify secret key will be provided to you after login in and selecting the TAS Self-Hosted mode. It is required to link your self hosted environment with the TAS server.
Example
"Lambdatest": {
"SecretKey": "add-your-secret-key-here"
}
Key | Type | Usage |
---|---|---|
Lambdatest.SecretKey | string | Secret key provided by Lambdatest |
Git
This token is required to clone your repositories to your self hosted environments while running the test execution jobs.
To create a new token you can use the following steps.
Key | Type | Usage |
---|---|---|
Git.Token | string | Personal Access token |
Git.TokenType | string | Token type is Bearer or Basic: Bearer , Basic |
NOTE: Set TokenType to
Basic
in case of bitbucket.
Example
"Git": {
"Token": "add-your-git-token-here",
"TokenType": "bearer"
}
ContainerRegistry
This parameter would already contain the correct values inside your downloaded .synapse.json. You can continue with those values if you want to use the image provided by test-at-scale, containing the smart features. In case you want to use a custom image to run your tests, you need to first build that image and publish on dockerhub, then specify the container image in .tas.yml
and container registry options given here in .synapse.json
.
NOTE: As of now, we are only supporting dockerhub. This is in beta currently.
Example
"ContainerRegistry": {
"PullPolicy": "always",
"Mode": "public",
"Username": "registryUsername",
"Password": "registryPassword"
}
Key | Type | Usage |
---|---|---|
ContainerRegistry.PullPolicy | string | Defines when to pull images: always , never (keep never if image is present in local system) |
ContainerRegistry.Mode | string | Image is private or public: public , private |
ContainerRegistry.Username | string | Registry username if the image is private |
ContainerRegistry.Password | string | Registry password if the image is private |
RepoSecrets
Your repositories might need some secrets while compiling or during test execution. You can specify those secrets here and these would be used in the .tas.yml configuration file later. A .tas.yml file contains all the necessary steps for dependency installation, env variable setup and test execution.
Key | Type | Usage |
---|---|---|
RepoSecrets | map of repository name containing secrets | Repository secrets being used by .tas.yml |
Example
"RepoSecrets": {
"synapse":{
"SAMPLE_SECRET_KEY": "sample_secret_value"
}
}
LogConfig
You can specify logging configuration options here to customize the logs deployed on your self hosted agent container for debugging purpose.
Example
"LogConfig": {
"EnableConsole": true,
"ConsoleJSONFormat": true,
"Consolelevel": "error"
}
Key | Type | Usage |
---|---|---|
LogConfig.EnableConsole | bool | Enable/Disable console(stdout) logs on the self hosted agent container. |
LogConfig.ConsoleJSONFormat | bool | Display self hosted agent container logs in JSON format. |
LogConfig.Consolelevel | string | Set self hosted agent container logging levels to display specific logslevel of logs: error , info , debug . |
Name
You can name your synapse instance which will be shown in the TAS portal.
Key | Type | Usage |
---|---|---|
Name | string | name of your synapse instance |
Example
"Name": "my-synapse-1"
Sample configuration file
Here is a sample configuration file for TAS setup on self hosted environment.
{
"Name": "my-synapse-1",
"LogConfig": {
"EnableConsole": true,
"ConsoleJSONFormat": true,
"Consolelevel": "error"
},
"Lambdatest": {
"SecretKey": "add-your-secret-key-here"
},
"Git": {
"Token": "add-your-git-token-here",
"TokenType": "bearer"
},
"ContainerRegistry": {
"PullPolicy": "always",
"Mode": "public"
},
"RepoSecrets": {
"synapse":{
"SAMPLE_SECRET_KEY": "sample_secret_value"
}
}
}