Skip to main content

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"
}
KeyTypeUsage
Lambdatest.SecretKeystringSecret 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.

KeyTypeUsage
Git.TokenstringPersonal Access token
Git.TokenTypestringToken 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"
}
KeyTypeUsage
ContainerRegistry.PullPolicystringDefines when to pull images: always, never (keep never if image is present in local system)
ContainerRegistry.ModestringImage is private or public: public, private
ContainerRegistry.UsernamestringRegistry username if the image is private
ContainerRegistry.PasswordstringRegistry 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.

KeyTypeUsage
RepoSecretsmap of repository name containing secretsRepository 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"
}
KeyTypeUsage
LogConfig.EnableConsoleboolEnable/Disable console(stdout) logs on the self hosted agent container.
LogConfig.ConsoleJSONFormatboolDisplay self hosted agent container logs in JSON format.
LogConfig.ConsolelevelstringSet 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.

KeyTypeUsage
Namestringname 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.

.synapse.json
{
"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"
}
}
}

Setup TAS on Self Hosted Environments

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles