Skip to main content
Glama

generate_java_junit5

Generates a Java JUnit 5 test class from your recorded browser session, choosing TestFly or standalone Selenium with ChromeDriver setup/teardown.

Instructions

Generate a Java JUnit 5 test class from the current browser session. framework='testfly' (default) emits a TestFly test (extends BaseJUnit5Test, framework-managed driver, open(), accessibility-first locators and web-first assertThat assertions). framework='junit5' emits standalone raw Selenium with a ChromeDriver setUp/tearDown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameworkNoOutput flavor. Use 'testfly' (default) inside a TestFly project.testfly
test_nameNoRecordedFlowTest
package_nameNocom.tests.selenium

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It reveals meaningful output structure for both named modes: TestFly specifics (extends BaseJUnit5Test, framework-managed driver, open(), accessibility-first locators, assertThat assertions) and JUnit5 standalone specifics (raw Selenium, ChromeDriver setUp/tearDown). It stops short of stating whether the code is returned or written to a file, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense, front-loaded sentences with no filler. The first states the tool's purpose, and the second efficiently contrasts the two output modes with concrete structural details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for the testfly and junit5 modes, but it omits the valid selenium_boot framework option and does not clarify output delivery (returned code vs. file creation). With no annotations and no output schema, these gaps leave the definition not fully complete for all valid invocations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds real meaning to the framework parameter by defining what testfly and junit5 outputs look like. However, schema description coverage is only 33%, and the description leaves the selenium_boot enum option unexplained and offers no semantic help for test_name or package_name beyond their names and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Generate'), a concrete resource ('Java JUnit 5 test class'), and the source ('current browser session'). This clearly distinguishes it from sibling tools like generate_python_test, generate_java_testng, and generate_csharp_nunit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for choosing between the testfly and junit5 framework modes, explaining what each emits. It does not explicitly compare against sibling generators like generate_java_testng, nor explain when the selenium_boot enum option should be used, but the main usage guidance is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hakanngul/testfly-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server