Applications
Reference for applications in Cofactor, the products you test. Covers creating an application, the General, Test Users, Environments, Code and Advanced tabs, environment types, default environments, login paths and environment variables, with the matching cofactor application and cofactor environment commands.
An application is the product you test in Cofactor, such as a web app or an MCP server. It holds the environments you test against, the logins your tests use, the notes Cofactor has about it and the variables your tests read. Issues and runs belong to an application.
Create an application
| Way | How |
|---|---|
| App | Open Applications under Applications & environments, select Add Application (or Add application manually on an empty list) and fill in the two steps. Give it a name and an optional description, then a default environment with a name and a URL. A bare hostname gets https://. |
| CLI | cofactor application create --name "Acme Store" --base-url https://staging.example.com makes a default environment named production with that URL. |
| Sandbox | cofactor sandbox connect or cofactor sandbox push with a new --application name creates the application. Its sandbox environment default becomes its default environment. |
Your organization has a limit on applications. Creating one past the limit is refused.
Application tabs
An application has these tabs. An MCP application does not show Code or Advanced.
| Tab | What it holds |
|---|---|
| General | The name, the Type, the description, the Login Path and Delete Application. |
| Test Users | The application's credentials and personas. See Credentials and login. |
| Environments | The URLs your tests run against, and each environment's variable values. |
| Code | The GitHub repositories linked to the application. |
| Advanced | Session & Storage State and Environment Variables. |
The notes the browser agent reads before it tests the application are the app skill. You manage them with the CLI. See App skill.
Application types
| Type | Notes |
|---|---|
| Web | The default. |
| API | Behaves like a web application. |
| CLI | Behaves like a web application. |
| MCP | An MCP server registered as its own application. You choose it when you create the application, and you cannot switch to or from it later. |
Environments
An environment is a target your tests run against. Manage them in the Environments tab with Add Environment, or with cofactor environment.
| Field | Meaning |
|---|---|
| Name | The environment's name. |
| URL | The base URL. Not used by a sandbox environment. |
| Type | Permanent, ephemeral, local or sandbox. In the app you can pick permanent, ephemeral or sandbox. |
| Stage | A shared deployment stage, such as staging. An application has at most one environment per stage, and an ephemeral environment has none. |
| Expires At | Ephemeral only. The time the environment expires. |
| Login Path Override | A relative path that replaces the application's login path for this environment. |
| Description | Free text. |
| Type | Notes |
|---|---|
| Permanent | A long-lived environment such as staging or production. |
| Ephemeral | A short-lived environment with an expiry. |
| Local | An environment on a developer's machine. You cannot edit it or make it the default in the app. |
| Sandbox | An environment backed by a sandbox. Each environment in your cofactor.sandbox.yaml becomes one when you run cofactor sandbox connect or cofactor sandbox push. See Sandbox guide. |
The default environment is where runs start when nothing else is chosen. Choose Set as default in an environment's menu, or run cofactor environment set-default.
Login path. The login path is a relative path such as /login, added to an environment's URL when a login starts. Set it on the application in General, or with cofactor application update <name> --login-path /login. An empty value clears it. An environment can override it. A full URL is refused. See Test a live environment.
Commands
cofactor application list cofactor application update "Acme Store" --login-path /login cofactor environment list --application "Acme Store" cofactor environment create --application "Acme Store" --name Staging --url https://staging.example.com --stage staging cofactor environment update --application "Acme Store" --environment Staging --url https://staging.example.com cofactor environment set-default --application "Acme Store" --environment Staging
For a sandbox environment, environment list shows the sandbox environment's name after a # in the Template column. That name is what cofactor exploratory-test run --sandbox-env takes.
Environment variables
A variable is a named value that a test reads, such as an API URL. Declare it once on the application. Set its value separately in each environment.
- Declare variables in Advanced, under Environment Variables, with Add Variable. Give each a name and an optional description. Turn on Sensitive to mask the value in the app.
- Set the values in the Environments tab, or from the CLI.
- A test reads a variable as
$var.ENV.<NAME>.
cofactor application update "Acme Store" --env-var API_URL cofactor environment set-var --application "Acme Store" --environment Staging API_URL=https://api.staging.example.com printf %s "$API_TOKEN" | cofactor environment set-var --application "Acme Store" \ --environment Staging --sensitive --stdin API_TOKEN
set-var keeps the values of variables you do not name. --sensitive marks the named variables sensitive on the application first, so it applies to every environment.