Docs/Applications
#

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

WayHow
AppOpen 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://.
CLIcofactor application create --name "Acme Store" --base-url https://staging.example.com makes a default environment named production with that URL.
Sandboxcofactor 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.

TabWhat it holds
GeneralThe name, the Type, the description, the Login Path and Delete Application.
Test UsersThe application's credentials and personas. See Credentials and login.
EnvironmentsThe URLs your tests run against, and each environment's variable values.
CodeThe GitHub repositories linked to the application.
AdvancedSession & 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

TypeNotes
WebThe default.
APIBehaves like a web application.
CLIBehaves like a web application.
MCPAn 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.

FieldMeaning
NameThe environment's name.
URLThe base URL. Not used by a sandbox environment.
TypePermanent, ephemeral, local or sandbox. In the app you can pick permanent, ephemeral or sandbox.
StageA shared deployment stage, such as staging. An application has at most one environment per stage, and an ephemeral environment has none.
Expires AtEphemeral only. The time the environment expires.
Login Path OverrideA relative path that replaces the application's login path for this environment.
DescriptionFree text.
TypeNotes
PermanentA long-lived environment such as staging or production.
EphemeralA short-lived environment with an expiry.
LocalAn environment on a developer's machine. You cannot edit it or make it the default in the app.
SandboxAn 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

bash
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>.
bash
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.