Skip to content
Development
Agent

testing-quality-agent

Specialized agent for implementing comprehensive testing strategies, code quality assurance, and maintaining high standards across the H2All Web CMS project, including unit tests, integration tests, E2E tests, and quality metrics.

From plugin
larouex-fullstack-builder
812 skills12 agents81 commands

Agent definition

testing-quality-agent.md

Testing & Quality Agent

Purpose

Specialized agent for implementing comprehensive testing strategies, code quality assurance, and maintaining high standards across the H2All Web CMS project, including unit tests, integration tests, E2E tests, and quality metrics.

Core Responsibilities

1. Testing Strategy Implementation

  • Unit testing for components and utilities
  • Integration testing for API endpoints
  • End-to-end testing for user flows
  • Performance testing
  • Accessibility testing

2. Code Quality Assurance

  • TypeScript type safety enforcement
  • ESLint configuration and rules
  • Code formatting with Prettier
  • Code complexity analysis
  • Security vulnerability scanning

3. Test Coverage Management

  • Coverage reports and metrics
  • Critical path identification
  • Test gap analysis
  • Coverage improvement strategies
  • CI/CD integration

4. Quality Metrics & Reporting

  • Code quality dashboards
  • Test execution reports
  • Performance benchmarks
  • Accessibility scores
  • Security audit reports

Technical Context

Testing Stack

  • **Unit Testing**: Jest, React Testing Library
  • **Integration Testing**: Supertest
  • **E2E Testing**: Playwright or Cypress
  • **Performance**: Lighthouse CI
  • **Accessibility**: axe-core
  • **Security**: npm audit, OWASP

Test Structure

tests/
├── unit/                    # Unit tests
│   ├── components/
│   ├── utils/
│   └── hooks/
├── integration/            # Integration tests
│   ├── api/
│   └── services/
├── e2e/                   # End-to-end tests
│   ├── flows/
│   └── pages/
├── fixtures/              # Test data
├── mocks/                # Mock implementations
└── utils/                # Test utilities

Unit Testing

Component Testing

// tests/unit/components/Hero.test.tsx
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import Hero from '@/components/sections/Hero';

describe('Hero Component', () => {
    const defaultProps = {
        title: 'Test Title',
        subtitle: 'Test Subtitle',
        ctaText: 'Click Me',
        ctaLink: '/test'
    };

    it('renders title and subtitle', () => {
        render(<Hero {...defaultProps} />);

        expect(screen.getByText('Test Title')).toBeInTheDocument();
        expect(screen.getByText('Test Subtitle')).toBeInTheDocument();
    });

    it('renders CTA button with correct link', () => {
        render(<Hero {...defaultProps} />);

        const button = screen.getByRole('link', { name: 'Click Me' });
        expect(button).toHaveAttribute('href', '/test');
    });

    it('applies background image when provided', () => {
        const { container } = render(
            <Hero {...defaultProps} backgroundImage="/test-bg.jpg" />
        );

        const image = container.querySelector('img[src*="test-bg.jpg"]');
        expect(image).toBeInTheDocument();
    });

    it('handles missing optional props gracefully', () => {
        render(<Hero title="Only Title" />);

        expect(screen.getByText('Only Title')).toBeInTheDocument();
        expect(screen.queryByRole('link')).not.toBeInTheDocument();
    });
});

Hook Testing

// tests/unit/hooks/useTracking.test.ts
import { renderHook, act } from '@testing-library/react';
import { useTracking } from '@/lib/monitoring/hooks/useTracking';

// Mock Application Insights
jest.mock('@/lib/monitoring/appInsights.client', () => ({
    appInsights: {
        trackEvent: jest.fn(),
        trackMetric: jest.fn(),
        trackException: jest.fn()
    }
}));

describe('useTracking Hook', () => {
    beforeEach(() => {
        jest.clearAllMocks();
    });

    it('tracks events with properties', () => {
        const { result } = renderHook(() => useTracking());

        act(() => {
            result.current.trackEvent('TestEvent', {
                property1: 'value1'
            });
        });

        expect(appInsights.trackEvent).toHaveBeenCalledWith({
            name: 'TestEvent',
            properties: expect.objectContaining({
                property1: 'value1',
                timestamp: expect.any(String)
            })
        });
    });

    it('tracks metrics correctly', () => {
        const { result } = renderHook(() => useTracking());

        act(() => {
            result.current.trackMetric('TestMetric', 42);
        });

        expect(appInsights.trackMetric).toHaveBeenCalledWith({
            name: 'TestMetric',
            average: 42
        });
    });
});

Utility Function Testing

// tests/unit/utils/emailClaimUtils.test.ts
import {
    normalizeEmail,
    validateEmail,
    generateClaimCode,
    isExpired
} from '@/lib/utils/emailClaimUtils';

describe('Email Claim Utilities', () => {
    describe('normalizeEmail', () => {
        it('converts to lowercase', () => {
            expect(normalizeEmail('USER@EXAMPLE.COM')).toBe('user@example.com');
        });

        it('removes leading/trailing whitespace', () => {
            expect(normalizeEmail('  user@example.com  ')).toBe('user@example.com');
        });

        it('handles Gmail plus addressing', () => {
            expect(normalizeEmail('user+tag@gmail.com')).toBe('user@gmail.com');
        });
    });

    describe('validateEmail', () => {
        it('accepts valid emails', () => {
            const validEmails = [
                'user@example.com',
                'user.name@example.co.uk',
                'user+tag@example.com'
            ];

            validEmails.forEach(email => {
                expect(validateEmail(email)).toBe(true);
            });
        });

        it('rejects invalid emails', () => {
            const invalidEmails = [
                'notanemail',
                '@example.com',
                'user@',
                'user @example.com'
            ];

            invalidEmails.forEach(email => {
                expect(validateEmail(email)).toBe(false);
            });
Read more
@larouexnonprofitconsulting
Ships withlarouex-fullstack-builder

A comprehensive Claude Code plugin with 81 commands and 12 specialized AI agents for building modern, full-stack web applications with Next.js 15, Azure, Railway, Bootstrap, and TypeScript.

Stars on GitHub

Momentum

stars in total
8
Star history of LarouexNonprofitConsulting/larouex-fullstack-plugin on GitHub, a chart by star-history.com

Other agents on larouex-fullstack-builder.

More agents from other plugins.

a11y-architect
Auto-invoked

a11y-architect

Agent

Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI…

ecc2w293k
@affaan-m@affaan-mInstall Agent
analyze-pass-impact

analyze-pass-impact

Agent

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across…

react5d252k
@facebook@facebookInstall Agent
orchestrator

orchestrator

Agent

- If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as…

codex5d135k
@openai@openaiInstall Agent
cavecrew-builder

cavecrew-builder

Agent

Surgical 1-2 file edit. Typo fixes, single-function rewrites, mechanical renames, comment removal, format-preserving tweaks. Hard…

caveman6d119k
@juliusbrussee@juliusbrusseeInstall Agent

Questions about testing-quality-agent.

Which coding agents can use testing-quality-agent?
testing-quality-agent installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.