Environments AI-generated
An Environment is the top-level container in MockMotor: its own ports, its own accounts, variables, services and log, fully isolated from every other environment. Most teams create one per project or release (e.g. "R74" or "V7 Launch"), or per test stage/consuming team. Its settings form (Environments → Add, or the pencil icon on an existing one) is grouped into General Information, Log & Advanced, and Access Control, covered below. Name is a unique, human-readable identifier; Description is a free-text field for notes on why it was created and who it's for.
Traffic Type: HTTP or LDAP
Every environment picks exactly one traffic type. HTTP is the default and covers REST, SOAP, GraphQL and WebSocket traffic on the same ports. LDAP switches the environment into an LDAP directory stub - Bind and Search only, see LDAP Mode - and HTTP connections to an LDAP-mode environment simply don't work. You can't mix the two in one environment; run a second environment if you need both.
Ports
Each environment gets two independent ports, toggled on/off:
- Plain port - plain HTTP in HTTP mode, plain LDAP in LDAP mode.
- Secure port - HTTPS in HTTP mode, LDAP-over-TLS (LDAPS) in LDAP mode.
Flipping the traffic type on an existing environment re-labels and re-purposes the same two port fields rather than adding separate ones - whichever protocol currently owns a port releases it, and the other claims it, in one save.
Status: Enabled or Disabled
A Disabled environment rejects all its traffic - MockMotor throws an error stating the environment doesn't handle any traffic (internally still called "archived" in places, a naming holdover), and deliberately adds a short delay first, specifically to slow down runaway load-testing scripts that keep hammering it. Disabling instead of deleting keeps the configuration and accounts intact for later re-enabling; it's also lighter on server resources than an active environment.
Logging
Log status is Enabled (every request recorded - the default, good for initial setup and troubleshooting), Only Errors (skip successful matches, keep failures/mismatches - useful during load testing when full logging would be too much overhead or rotate out too fast to be useful), or Disabled (best raw performance for heavy load tests). Max Log Records caps how many entries are retained before the oldest roll off - useful to bound disk usage on a high-traffic or long-running environment. See Debug & Troubleshooting for what the log actually shows.
Advanced
- HTTP Compliance - Modern enforces strict HTTP semantics; Allow Legacy relaxes some checks for older/misbehaving clients that a strict server would otherwise reject.
- Load Balanced - when on, the admin instance doesn't process this environment's mock traffic itself: it picks a random connected clone (see Clustering & Clones) and forwards the request to it for actual processing. Use it to spread this environment's load across clones instead of handling it all on the admin. Has no effect on LDAP-mode environments.
Access Control
Whoever creates an environment automatically becomes its owner, with full rights to modify or delete it; nobody else has any rights to it by default unless an owner or admin grants them. An admin has unrestricted power over every environment on the instance. A non-owner can still clone an environment they can't edit - cloning copies every service, reaction and account, leaves the source untouched, assigns the clone fresh ports, appends "(Clone)" to its name, and makes the cloner the new clone's owner. On top of the owner/admin model, Editors and Account Editors grant finer-grained access to specific users without making them full owners - useful when a QA team should be able to add/edit test accounts without touching service/reaction definitions. See Administration for how users and roles work overall.