Core Review Agent

Test Analyst

Ensures your tests actually protect you

Tests that pass don't mean your code works. Test Analyst finds the gaps — missing edge cases, flaky tests, and isolation issues that let bugs slip through.

What Test Analyst Catches

The gaps in your test suite that let bugs escape

Missing Edge Case Coverage

The happy path is tested, but what about nulls, empty arrays, and boundary conditions?

Null inputsEmpty collectionsBoundary valuesError paths

Flaky Tests

Tests that pass sometimes and fail others — the silent killers of CI/CD confidence

Timing dependenciesOrder dependenciesShared stateNetwork calls

Poor Test Isolation

Tests that depend on each other or share mutable state — debugging nightmares

Shared fixturesDatabase pollutionGlobal stateTest order bugs

All Test Types Covered

From unit tests to E2E, Test Analyst reviews them all

Unit Tests

Function and class level testing

Integration Tests

Component interaction testing

E2E Tests

End-to-end user flow testing

API Tests

Endpoint and contract testing

Snapshot Tests

UI regression detection

Performance Tests

Load and benchmark testing

Improving Test Quality

Real examples of test improvements

Missing Edge Case

Weak Test
describe('calculateDiscount', () => {
  it('applies 10% for orders over $100', () => {
    expect(calculateDiscount(150)).toBe(15)
  })

  it('applies 5% for orders over $50', () => {
    expect(calculateDiscount(75)).toBe(3.75)
  })

  // What about $0? Negative? Exactly $50? $100?
})

Missing boundary tests: $0, $50, $100, negative

Strong Test
describe('calculateDiscount', () => {
  it('applies 10% for orders over $100', () => {
    expect(calculateDiscount(150)).toBe(15)
  })

  it('applies 5% for orders over $50', () => {
    expect(calculateDiscount(75)).toBe(3.75)
  })

  it('returns 0 for orders at boundary', () => {
    expect(calculateDiscount(50)).toBe(0)
    expect(calculateDiscount(100)).toBe(5) // 5% tier
  })

  it('handles zero and negative gracefully', () => {
    expect(calculateDiscount(0)).toBe(0)
    expect(calculateDiscount(-10)).toBe(0)
  })
})

Add edge cases for boundaries and invalid inputs

Flaky Test Detection

Weak Test
it('shows notification after save', async () => {
  await user.click(saveButton)

  // Flaky! Depends on timing
  await waitFor(() => {
    expect(screen.getByText('Saved!')).toBeVisible()
  })

  // Even worse: arbitrary timeout
  await new Promise(r => setTimeout(r, 100))
  expect(notificationCount).toBe(1)
})

Arbitrary timeouts and timing assumptions

Strong Test
it('shows notification after save', async () => {
  await user.click(saveButton)

  // Wait for specific state change
  await waitFor(() => {
    expect(screen.getByRole('alert')).toHaveTextContent('Saved!')
  })

  // Assert on observable behavior, not timing
  expect(
    await screen.findByRole('alert', { name: /saved/i })
  ).toBeVisible()
})

Wait for observable state changes, not time

Test Isolation Issue

Weak Test
let testUser: User

beforeAll(async () => {
  // Shared across ALL tests — mutations leak!
  testUser = await createUser({ name: 'Test' })
})

it('updates user name', async () => {
  await updateUser(testUser.id, { name: 'Updated' })
  // Now testUser.name is 'Updated' for all following tests
})

it('checks original name', () => {
  // FAILS! Previous test mutated shared state
  expect(testUser.name).toBe('Test')
})

Shared state in beforeAll leaks between tests

Strong Test
describe('user updates', () => {
  let testUser: User

  beforeEach(async () => {
    // Fresh user for EACH test
    testUser = await createUser({ name: 'Test' })
  })

  afterEach(async () => {
    await deleteUser(testUser.id)
  })

  it('updates user name', async () => {
    await updateUser(testUser.id, { name: 'Updated' })
    expect(testUser.name).toBe('Updated')
  })

  it('checks original name', () => {
    // Works! Fresh testUser with original name
    expect(testUser.name).toBe('Test')
  })
})

Use beforeEach for test isolation

Test Analysis

How Test Analyst Works

Test Analyst doesn't just count tests — it analyzes what they actually test. It finds the gaps between what your tests cover and what your code needs.

Path Analysis

Maps code paths to find untested branches

Flakiness Detection

Identifies timing and order dependencies

Edge Case Suggestions

Recommends specific test cases to add

Analysis Pipeline

1

Analyze Test Coverage

Maps which code paths are tested and which aren't

2

Identify Weak Spots

Finds edge cases and error conditions without tests

3

Detect Anti-patterns

Spots flaky patterns and isolation issues

4

Suggest Improvements

Recommends specific test cases to add

Why Test Quality Matters

Bad tests are worse than no tests — they give false confidence

Catch Real Bugs

Tests that cover edge cases catch bugs before users do

Reliable CI/CD

No more "retry until green" — tests pass or fail for real reasons

Refactor Safely

Good tests let you change code with confidence

100% coverage means nothing if tests don't catch bugs.
Test Analyst ensures your tests actually work.

Tests That Actually
Protect You

Let Test Analyst find the gaps in your test suite. Free for 14 days, no credit card required.

Edge case detection
Flaky test prevention
Isolation analysis