Continuous Test Stage (CTS) – Lab ID Management
TL;DR
CTS (Continuous Test Stage) enables automatic coverage capture during a defined window without integrating with a test framework. Manage CTS Lab IDs for component builds using SeaLights APIs.
Introduction
What is CTS? CTS stands for Continuous Test Stage. It captures code coverage automatically during a test stage window without requiring integration with a testing framework.
Why use CTS?
Simplifies coverage collection for E2E/system tests.
Works without test framework hooks.
Captures all activity during the CTS window (including background jobs).
Sample Use Cases
Single Lab ID for All Tests
Lab ID: cts-all-tests
Test Stage: FullSuite
Coverage aggregated for all tests under one stage
Separate Lab IDs for Different Test Types
Lab ID Pattern: cts_e2e_tests
and Stage: E2E Tests
Lab ID Pattern: cts_api_tests
and Stage: API Tests
Coverage metric split by stage: one for E2E, another for API tests
Managing Entries via API (CRUD)
Prerequisites
SeaLights tenant URL:
https://<Customer ID>.sealights.co
and a valid API Token.Application builds are reported to the SeaLights dashboard, and runtime instrumentation is active (visible in Cockpit Live Agent Monitor).
Ability to configure Lab IDs in your test environments.
Component Builds (API Token)
Create
POST /sl-api/v1/component-cts/config
Update
PUT /sl-api/v1/component-cts/config
Delete
DELETE /sl-api/v1/component-cts/config
Get stage by Lab ID
GET /sl-api/v1/component-cts/config/<Lab ID>
List All CTS
GET /sl-api/v1/component-cts/config
Payload for Create/Update:
{
"labIdPattern": "<lab ID>",
"defaultTestStageName": "<Test stage name>"
}
Best Practices
Keep CTS windows short and focused.
Pause background jobs during CTS runs.
Use clear naming conventions (e.g.,
cts-e2e
,cts-api
).Assign ownership for each Lab ID.
Q&A
Q: Do I need a test framework? A: No, CTS works without test framework integration.
Q: Can CTS exclude background jobs? A: No, all activity during CTS is captured.
Q: Can I use patterns for Lab IDs?
A: Yes, patterns like cts-e2e
or cts-api
help organize coverage by test type.
Last updated
Was this helpful?