Naming tests for Qably
Guidelines for naming suites and tests, how Qably formats technical identifiers, and a before and after example.
Qably derives test and suite names directly from your test runner output and file paths. The labels defined in your test code appear across the platform, turning test names into clear technical documentation for the entire team.
Naming conventions
These four conventions help produce clean, readable test suites:
- Group tests by business feature rather than technical classes or file paths. Describe what the user does (such as "Shopping cart" instead of "CartServiceImpl").
- Write test titles as an active verb combined with the expected condition: "rejects an empty token", "accepts a token up to 500 characters".
- Isolate one behavior per test. A test title containing the word "and" usually indicates two separate assertions that should be split.
- Name the test file after the feature under test, since this value determines the suite title in Qably.
Automatic name formatting
During ingestion, Qably converts technical identifiers into readable text by splitting camelCase or snake_case strings and stripping scaffolding prefixes like "test", "spec", or "case". A function name such as testTokenNull appears in the UI as "Token null".
When a test name is already written as a full phrase (for example, "should reject an empty token"), Qably preserves the phrasing and capitalizes only the first letter without modifying verbs or dropping words.
Note: Qably does not translate test names. The technical identifier serves as the join key between the repository and execution history. When teams write code in English and use Qably in Spanish, localization belongs in case documentation rather than technical identifiers.
A before and after
| Instead of | Write |
|---|---|
test_login_1 | signs in with valid credentials |
testTokenNull | rejects an empty token |
should return 400 when body is invalid and user is anonymous | rejects a request with an invalid body |
UserServiceTest.java | user-registration |
Existing test suites do not require renaming before onboarding. Qably imports current titles as-is and preserves manual edits made in the UI across subsequent ingestion runs.