Skip to main content

๐Ÿ“ Templated Test Cases (Rules)

Rules let you create many test cases at once using parameterized SQL templates. When the same validation pattern applies to many tables, columns, or schemas, rules remove the repetitive work and keep your tests consistent.

๐ŸŽฏ X-AutoMate Rules were reworked to help testers move fast and create coverage in bulk โ€” without giving up clarity or control.


๐Ÿง  Why Use Rules?โ€‹

Many test cases follow the same pattern โ€” only the target table, column, or schema changes. Instead of creating each test case manually, rules let you:

  • โœ… Define a template once with placeholders
  • ๐Ÿ” Generate multiple test cases by providing different parameter sets
  • โšก Speed up test creation dramatically for large-scale projects
  • ๐Ÿ“ Stay consistent across hundreds of similar checks
๐Ÿ’ก Analogy

A Rule is like a cookie cutter โ€” you define the shape once, then stamp out as many cookies (test cases) as you need, each with its own flavor (parameters).


๐Ÿ”— Rules and Test Approachesโ€‹

Rules are connected to Test Approaches. When you select a test approach during test creation, the rules associated with that approach become available automatically.

Template Assigned to Approach Selected


โœจ Reworked Rules Experienceโ€‹

The rules screen has been reworked to make it easier to find, inspect, and reuse templates. You can browse the available rules, expand them, and see exactly what they do before applying them.

Reworked Rules

Expanding a rule shows the full template details โ€” the SQL body, the parameters it expects, and the approach it's linked to.

Reworked Rules Details


๐Ÿ›  Parameterized Syntaxโ€‹

Rules use a clear parameterized syntax with double curly braces {{ }} as placeholders:

SELECT * FROM {{schema}}.{{table}} WHERE {{column_under_test}} IS NULL

In this example:

  • {{schema}} โ€” the database schema
  • {{table}} โ€” the target table
  • {{column_under_test}} โ€” the column to validate

You can modify rules freely โ€” add or remove parameters, adjust the SQL logic, or save your changes as a new rule for future use.


๐Ÿ“‹ Parameter Setsโ€‹

Once you've picked a rule, you fill in the parameters. Each parameter set becomes its own test case.

Parameters Added

Need to cover many tables or columns? Just add multiple parameter sets โ€” each one will produce a separate test case from the same template.

Many Parameter Sets Defined

โšก Pro Tip

For broad coverage (e.g. "check NULLs in 50 columns across 12 tables"), one rule + many parameter sets beats writing 600 individual test cases every time.


โœ… Creating Tests from Rulesโ€‹

When your rule and parameter sets are configured, press Submit. X-AutoMate generates all the corresponding test cases at once.

Many Test Cases Created At Once

๐Ÿš€ One submission, dozens of ready-to-run test cases.


๐Ÿ“Œ Summaryโ€‹

FeatureDescription
Template syntax{{parameter}} placeholders in SQL
Linked toTest Approaches
Parameter setsMultiple groups per rule โ€” each produces a test case
EditableModify rules or save as new
OutputBatch-created test cases on submit
Reworked UIEasier browsing, inspection, and reuse of templates