Using AI Coding Agents with testRigor

Using AI Coding Agents with testRigor

This section of the certification course introduces how AI coding agents can work with testRigor to help users create, run, review, and improve automated tests using instructions written in plain English.

Examples of these tools include Claude Code, OpenAI Codex, supported ChatGPT environments, Cursor, and other agentic tools that can connect to external systems through MCP. The exact setup and available features may differ between tools, but the basic test automation workflow remains the same.

AI coding agents do not replace test design, business knowledge, or human review. Users are still responsible for explaining the expected behavior, reviewing proposed changes, and confirming that the final test accurately validates the application.

Learning Objectives

By the end of this lesson, learners will be able to:
  • Understand how an AI coding agent can work with testRigor
  • Understand the roles of MCP and the testRigor CLI
  • Recognize how optional Skills or instruction files can guide an AI agent
  • Understand the basic connection process
  • Give an AI agent clear instructions for test automation work
  • Follow an iterative workflow for creating and improving tests
  • Recognize important security and review responsibilities

What Is an AI Coding Agent?

An AI coding agent is a tool that can do more than provide written suggestions. Depending on its capabilities and permissions, it may be able to inspect files, use command-line tools, connect to external systems, propose changes, and continue working toward a defined result.

For example, a user might ask an AI agent to:
  • Create a test for a new feature
  • Improve an existing test
  • Run a test suite
  • Investigate a failed test
  • Update a test based on new requirements

Different agents may use different interfaces. Some run in a command-line window, while others run in a desktop application, browser, or development environment.

The important requirement for this workflow is that the selected agent can connect to testRigor through MCP or use other testRigor tools required for the task.

Understanding the Main Components

The workflow contains several components with different responsibilities.

AI Coding Agent

The AI coding agent interprets the user’s request and assists with the work.

Depending on the tool, it may be able to:

  • Review requirements and local test files
  • Use MCP tools
  • Run command-line operations
  • Create or edit tests
  • Inspect test results
  • Continue refining a test after a failure

The agent may ask for permission before performing certain actions. Permission controls should remain enabled during normal use.

testRigor MCP

MCP stands for Model Context Protocol.

MCP is a standard that allows compatible AI tools to connect to external tools and data sources. The testRigor MCP server creates a connection between an AI agent and testRigor.

Through this connection, the agent can use the testRigor capabilities made available by the MCP server.

For example, the agent may be able to retrieve the test suites that the connected testRigor user can access or perform supported testRigor operations.

Important note: MCP does not bypass testRigor permissions. If the connected user cannot access a test suite in the testRigor application, the AI agent will not gain additional access through MCP.

testRigor CLI

CLI stands for Command-Line Interface.

The testRigor CLI allows users and automated tools to perform testRigor operations from a command-line environment.

Depending on the task, the CLI can be used to:

  • Authenticate with testRigor
  • Work with test suites
  • Run tests
  • Support local test development workflows

An AI agent that can use command-line tools may use the testRigor CLI as part of its workflow.

Users do not need to become command-line experts to understand the basic process. However, they should review the commands and actions proposed by the agent before approving them.

Optional Skills and Instruction Files

Some AI agents support Skills, rules, instruction files, or similar forms of reusable guidance.

These files can help an agent understand:

  • How to write and edit testRigor tests
  • How to use the testRigor CLI
  • How to follow an iterative build, run, inspect, correct, and rerun workflow

The name, format, and installation process for this guidance may differ between AI tools.

Skills and instruction files are not the same as MCP. MCP provides the connection to testRigor, while instructions help guide how the agent approaches the work.

How the Components Work Together

Each component has a different role.

Component Role
AI coding agent Interprets the request and assists with the work
testRigor MCP Connects a compatible AI agent to testRigor
testRigor CLI Provides command-line testRigor operations
Skills or instruction files Provide additional guidance for testRigor-specific workflows

These components support one connected process, but they are not interchangeable.

For example, a successful MCP connection confirms that the agent can communicate with testRigor. Adding testRigor-specific instructions separately may help the agent approach test creation and troubleshooting more effectively.

Choosing an AI Agent

The workflow was originally demonstrated using Claude Code, but the same general approach can be used with other compatible AI agents.

When selecting an agent, confirm that it can:
  • Connect to remote MCP servers
  • Provide the authentication information required by the testRigor MCP server
  • Display the available MCP tools
  • Request approval before performing sensitive actions
  • Use local files or command-line tools if those capabilities are required for your workflow

Do not assume that instructions written for one agent will work without changes in another. MCP configuration, permission controls, command syntax, and Skill installation can differ between products.

The detailed setup guide for the selected agent should be used when establishing the connection.

Basic Setup Overview

Before an AI agent can work effectively with testRigor, the required components must be installed or configured.

At a high level, the process includes:
  1. Select an AI agent that supports the required MCP connection.
  2. Install or open the agent according to its official instructions.
  3. Install the testRigor CLI if the planned workflow requires it.
  4. Create a testRigor Personal Authentication Token.
  5. Authenticate the testRigor CLI when it will be used.
  6. Connect the AI agent to the testRigor MCP server.
  7. Add testRigor Skills or instruction files if the agent supports them.
  8. Restart or refresh the agent if required.
  9. Verify that the agent can communicate with testRigor.

The exact menus, commands, configuration files, and installation requirements depend on the selected AI agent and operating system.

Personal Authentication Tokens

A Personal Authentication Token, or PAT, allows an approved tool to authenticate using a testRigor user account.

The token may be used to authenticate the testRigor CLI and establish the testRigor MCP connection.

A PAT should be treated like a password.
Users should never:
  • Publish the token in documentation
  • Include it in screenshots
  • Send it through public communication channels
  • Commit it to source control
  • Share it with unauthorized users

If a token is exposed, it should be revoked in testRigor and replaced with a new one.

The token inherits the permissions of the user who created it. It does not provide access beyond that user’s normal testRigor permissions.

Verifying the Connection

The connection should be verified before asking the AI agent to make changes.

A simple first request is:
List the testRigor test suites I have access to.

This is a useful verification because it is read-only. If the agent can retrieve the available test suites, the MCP connection is working and the Personal Authentication Token has been accepted.

If a particular suite is missing, the user should first confirm that the same testRigor account can open the suite in the normal testRigor application.

If the account cannot access the suite directly in testRigor, connecting through an AI agent will not provide additional access.

Giving the Agent a Test Automation Task

Users do not need to write prompts in a programming language. They can explain the task in normal English.

However, the agent still needs clear information about the intended result.

A useful test automation request should identify:
  1. The test case or feature
  2. The behavior that should be tested
  3. The expected result
  4. The test suite that should be used
  5. Any boundaries on what the agent may change
For example:

Work on the test case “Checkout with valid credit card.”

The test should complete the checkout flow and verify that the order confirmation page appears.

Run the test against the specified testRigor suite.

Do not change unrelated test cases.

Follow the requirements provided below.
The requirements may come from:
  • Acceptance criteria
  • A Jira ticket
  • Product documentation
  • An existing manual test case
  • A design or specification
  • A written explanation from someone who understands the feature

Provide Business Context

AI agents and testRigor can assist with test automation, but they cannot automatically know which behavior is most important to the business.

Important note: If a rule or result is important, it should be stated explicitly.

Useful context may include:
  • The user role performing the action
  • The starting point of the test
  • The main actions the user should complete
  • The expected result
  • Required test data
  • Important validations
  • Permission requirements
  • Business-critical positive and negative scenarios

A request such as “test the checkout” leaves many decisions undefined.

A stronger request explains who is checking out, which payment method should be used, whether the order should be submitted, and what result confirms that the process succeeded.

The Iterative Test Development Workflow

AI-assisted test automation should be treated as an iterative process.

A typical workflow is:
  1. Understand — Review the requirements and intended behavior.
  2. Create or update — Write or modify the test.
  3. Run — Execute the test in the correct testRigor suite.
  4. Inspect — Review the result and identify the cause of any failure.
  5. Refine — Correct the test or clarify the instructions.
  6. Run again — Repeat the process until the expected result is reached.
  7. Verify — Confirm that the final test accurately represents the requirement.

The first generated version may require corrections. This does not necessarily mean that the workflow failed. Iteration is a normal part of AI-assisted test development.

The goal is for AI to reduce the manual effort required to reach a working, maintainable test—not to eliminate human judgment.

Working with Existing Tests

An AI agent can also assist with existing testRigor tests.

Users may ask it to:
  • Investigate why a test is failing
  • Update a test after an application change
  • Add coverage for a new requirement
  • Improve unclear or unstable steps
  • Identify repeated steps that may belong in a reusable rule

When working with an existing suite, the request should clearly define the permitted scope.

For example:
Update only the test case named “Submit expense report.” Do not modify other test cases or shared reusable rules without asking first.

Clear boundaries reduce the risk of unrelated changes.

Working with Local Test Files

Some workflows use test files stored on the user’s computer.

When working with local files, the AI agent should be given access only to the intended test project folder. This helps the agent understand which files belong to the current task and limits unnecessary access.

Some agents may ask whether the folder is trusted. Users should approve the folder only when they recognize it and intend the agent to work with its contents.

Local changes should be reviewed before they are synchronized with an important shared test suite.

Human Review Is Still Required

An AI agent may produce a test that runs successfully but does not validate the intended business behavior.

After a test is created or modified, the user should confirm:
  • The test follows the correct workflow
  • The expected results are accurate
  • Important validations are included
  • The test does not modify unrelated coverage
  • Test data is appropriate
  • Reusable rules are used correctly
  • The test passes for the right reason

Important note: A passing result alone does not prove that a test is complete or meaningful.

Common Mistakes

Assuming Every AI Agent Works the Same Way

Different tools may use different interfaces, configuration files, permission systems, and installation methods.

Follow the setup instructions for the selected agent rather than copying tool-specific commands without checking whether they apply.

Giving the Agent an Unclear Goal

A request such as “make this test better” does not define what success means.

Explain the behavior, expected result, test suite, and permitted scope.

Expecting AI to Know the Business Requirements

AI can work only with the information it can access. It cannot reliably determine internal business rules, priorities, or expected behavior unless they are documented or explained.

Skipping the Verification Step

Confirm the MCP connection and testRigor permissions before asking the agent to perform a larger task.

Allowing Unrelated Changes

Identify the specific test case and tell the agent whether it may change reusable rules, shared files, or other tests.

Treating the First Result as Final

Generated or modified tests should be run, inspected, corrected, and reviewed.

Exposing Authentication Tokens

Personal Authentication Tokens should never appear in shared documentation, screenshots, source control, or public messages.

Experimenting in an Important Shared Suite

When learning the workflow, use a development or personal suite whenever possible. Review actions carefully before updating shared test assets.

Key Takeaways

  • Multiple MCP-compatible AI agents can work with testRigor.
  • The exact setup depends on the selected AI tool and operating system.
  • MCP connects a compatible AI agent to testRigor.
  • The testRigor CLI supports command-line testRigor operations.
  • Skills or instruction files may provide additional testRigor-specific guidance.
  • Personal Authentication Tokens should be protected like passwords.
  • MCP follows the permissions of the connected testRigor user.
  • Clear requirements and completion criteria produce better results.
  • AI-assisted test development is an iterative process.
  • Users remain responsible for reviewing changes and verifying business behavior.

Test your knowledge

To replace the testRigor application
To connect a compatible AI agent to testRigor
To give users additional testRigor permissions
To install an AI agent

That the agent uses the same menus as Claude Code
That the agent never asks for permission
That the agent supports the required MCP connection and capabilities
That the agent can determine all business requirements automatically

Only the name of the test case
The test case, expected behavior, test suite, and permitted scope
Only the URL of the application
A request for the agent to decide all business requirements

Assume the test is correct if it was generated successfully
Publish the test immediately
Review the changes, run the test, and verify the business behavior
Remove the original requirements

Full access to every testRigor suite
The same access available to the testRigor user who created it
Access that bypasses testRigor permissions
Anonymous access without a testRigor account