Online Troubleshooting and Retrospective for Unit and Component Testing: Conversation Logs and Auditing

Data for this category primarily originates from code repositories, test framework reports, requirement specifications, and interface definitions.

What this category of data looks like

Data for this category primarily originates from code repositories, test framework reports, requirement specifications, and interface definitions. Update frequency is daily or after each code commit. Daily associated documents include test cases, coverage reports, Mock configuration instructions, and defect tracking tickets. Test case fields include case identifiers, execution status, and boundary condition parameters. Test framework reports include failed case stack traces, Mock call logs, and coverage statistics. Conversation logs must be linked to test execution IDs, code commit hashes, and corresponding case numbers. Logs are updated only using actual generated execution records, with no additional aggregated statistical content. This document applies to FastGPT v4.17.0.

What constraints these characteristics impose on conversation logs and auditing

Since this category of data relies on precise association between code commits and single test executions, conversation logs must be bound to test execution IDs, code commit hashes, and corresponding test case numbers. Without these bindings, specific code logic and test scenarios corresponding to faults cannot be located. As update frequency is daily or after a single commit, audit archiving must be organized by commit batch or daily dimension to avoid log redundancy. Daily associated documents such as test cases and Mock configurations must align with log fields. This ensures troubleshooting can directly match corresponding test resources via log fields. Test faults increase regression costs, so conversation logs must retain complete request parameters, response results, and execution stack information. Logs must not be deleted with test sessions, to enable complete fault scenario reproduction during retrospectives.

How to configure settings

Configuration ItemRecommended SettingRationale
chatIdBound to test execution ID, passed consistentlyThis category of test execution requires precise session association. Binding ensures corresponding test cases and code commits can be matched in logs, resolving log identifier mismatch issues
responseChatItemIdGenerated per test case batch, unique per batchUnit and component test conversations are grouped by case. Unique IDs distinguish logs for different cases, simplifying case-based archiving and troubleshooting
detailEnable full mode, retain stack traces and request bodiesFault troubleshooting requires complete execution information. Full logs cover boundary condition parameters and failure stacks, meeting positioning requirements
Log retention period7–30 daysThis category of data updates daily or per commit. Retention periods cover full regression test cycles, preventing loss of critical logs
Log archive batchNo more than 50 records per batchAvoids excessive single batch log size, improving log retrieval and retrospective efficiency
Unauthenticated session logsDisable automatic deletionMatches scenarios where logs are lost after unauthenticated users delete conversations, ensuring audit data integrity

Three common configuration errors

  • Symptom: After passing the chatId parameter via an API call, the parameter value does not appear in backend conversation logs. Test execution sessions cannot be associated. Cause: chatId is not bound to the test execution ID, or the log writing switch for chatId is not enabled in configuration. This causes the parameter to not be recorded.
  • Symptom: After an unauthenticated test session is deleted, backend audit logs are also cleared synchronously. Corresponding test faults cannot be retrospectively analyzed. Cause: The configuration enables rules that clear logs synchronously when sessions are deleted. Independent archiving permissions for audit logs are not retained.
  • Symptom: After deploying via Docker Compose and executing a container destruction command, conversation logs are lost. Historical test executions cannot be traced. Cause: Log storage is not mounted to a local persistent directory. Logs are deleted with the container when the container is destroyed.

How to verify correct configuration

  • Initiate a test case execution. Confirm that conversation logs include the chatId field, and that the field value matches the test execution ID.
  • Simulate an unauthenticated session operation. Delete the session, then verify that backend logs retain complete records for that session.
  • Review log storage directory mount configurations. Confirm that log files are not deleted when a container is destroyed.
  • Call an interface with the detail parameter enabled. Validate that returned results include test case stack traces and request parameters.
  • Inspect log archive records. Confirm that the number of records per archive batch does not exceed the set upper limit.

The values provided are common starting points and should be measured against the reader's own samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.