create-codeql-query-unit-test-java

Scaffold Java CodeQL query test suites with MCP Server tooling.

30|3|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill create-codeql-query-unit-test-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-codeql-query-unit-test-java
Source: https://github.com/advanced-security/codeql-development-mcp-server/tree/main/.github/skills/create-codeql-query-unit-test-java
Command: npx skills add https://github.com/advanced-security/codeql-development-mcp-server --skill create-codeql-query-unit-test-java

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create comprehensive, reliable unit tests for Java CodeQL queries, reducing manual effort and ensuring broad coverage across codebases and Java features.

Core Features & Use Cases

  • Scaffolds a complete Java CodeQL test suite including test directories, {QueryName}.qlref references, Example*.java files, and corresponding .expected outputs in a standardized layout.
  • Provides templates and patterns for positive, negative, and edge-case test cases, including common Java frameworks and language features.
  • Integrates with the MCP Server tooling to extract test databases, run tests, and validate results in a repeatable, auditable process.

Quick Start

Create a new Java query, place it in your query pack, and run the MCP Server test-scaffolding workflow to generate the test structure and baseline artifacts.

Frequently Asked Questions about create-codeql-query-unit-test-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create unit tests for a Java CodeQL query?

Java CodeQL query unit tests require a standardized structure including test directories, {QueryName}.qlref references, Example*.java files, and .expected outputs to validate query behavior and edge cases.

What is the standard structure for a Java CodeQL query test suite?

A Java CodeQL query test suite structure includes test directories, {QueryName}.qlref reference files, Example*.java test case files, and corresponding .expected output files for deterministic test validation.

How do I run Java CodeQL unit tests using an MCP Server?

You run Java CodeQL unit tests by using the MCP Server tooling to extract test databases, execute the test suite, and validate results to ensure deterministic outcomes across Java features and frameworks.

Can I generate edge-case test cases for Java CodeQL queries automatically?

Yes, Java CodeQL query test generation provides templates and patterns for positive, negative, and edge-case test cases, including coverage for common Java frameworks and language features.

Does Java CodeQL unit test scaffolding work with common Java frameworks?

Java CodeQL unit test scaffolding supports common Java frameworks and language features by providing test templates and patterns that enforce Java compatibility and validate database extraction.

Why are my Java CodeQL unit tests failing during database extraction?

Java CodeQL unit tests may fail during database extraction if test structure correctness or Java compatibility is not enforced, which are required to achieve deterministic test results across codebases.