feat: implement comprehensive testing framework and regression suite

- Established a centralized test specification in docs/tests.md that defines test categories, cases, and a coverage checklist to ensure consistent quality and maintainability across the project.

- Implemented RegressionTestExecutor for managing automated regression tests on a live Zabbix system.

- Updated GraphQL schema and resolvers with a generic runAllRegressionTests mutation.

- Enhanced MCP integration with new operation files and detailed documentation for AI-driven automation.

- Updated README.md and How-To guides (Cookbook, Maintenance, MCP) to reflect the new testing framework and MCP capabilities.

- Verified all changes with a full Jest suite (74 tests) and live end-to-end smoketests.
This commit is contained in:
Andreas Hilbig 2026-02-01 05:05:55 +01:00
parent ef7afe65ab
commit b84e4c0734
11 changed files with 338 additions and 1 deletions

View file

@ -544,6 +544,8 @@ export interface Mutation {
* Authentication: Requires `zbx_session` cookie or `zabbix-auth-token` header.
*/
importUserRights?: Maybe<ImportUserRightsResult>;
/** Runs all regression tests. */
runAllRegressionTests: SmoketestResponse;
/** Runs a smoketest: creates a template, links a host, verifies it, and cleans up. */
runSmoketest: SmoketestResponse;
}
@ -608,6 +610,12 @@ export interface MutationImportUserRightsArgs {
}
export interface MutationRunAllRegressionTestsArgs {
groupName: Scalars['String']['input'];
hostName: Scalars['String']['input'];
}
export interface MutationRunSmoketestArgs {
groupName: Scalars['String']['input'];
hostName: Scalars['String']['input'];
@ -1547,6 +1555,7 @@ export type MutationResolvers<ContextType = any, ParentType extends ResolversPar
importTemplateGroups?: Resolver<Maybe<Array<ResolversTypes['CreateTemplateGroupResponse']>>, ParentType, ContextType, RequireFields<MutationImportTemplateGroupsArgs, 'templateGroups'>>;
importTemplates?: Resolver<Maybe<Array<ResolversTypes['ImportTemplateResponse']>>, ParentType, ContextType, RequireFields<MutationImportTemplatesArgs, 'templates'>>;
importUserRights?: Resolver<Maybe<ResolversTypes['ImportUserRightsResult']>, ParentType, ContextType, RequireFields<MutationImportUserRightsArgs, 'dryRun' | 'input'>>;
runAllRegressionTests?: Resolver<ResolversTypes['SmoketestResponse'], ParentType, ContextType, RequireFields<MutationRunAllRegressionTestsArgs, 'groupName' | 'hostName'>>;
runSmoketest?: Resolver<ResolversTypes['SmoketestResponse'], ParentType, ContextType, RequireFields<MutationRunSmoketestArgs, 'groupName' | 'hostName' | 'templateName'>>;
};