This tutorial shows how to integrate the jtest-static-analysis and jtest-unit-testing skills into a coding agent, then use them to fix static analysis violations and generate unit tests in an example project.
Skill sources are located in repository: parasoft/jtest-ai-agent-skills
For the purpose of this tutorial we demonstrate integration with GitHub Copilot CLI agent, but the skill can be used with any coding agent that supports SKILL.md skills and has access to Jtest MCP tools.
This repository is an example java project that demonstrates how the Parasoft Jtest AI agent skills can be used to automatically fix static analysis violations inside a GitHub CI/CD pipeline.
The key idea is that when a pull request is created, the pipeline runs Jtest, detects violations, and then invokes an AI coding agent (GitGub Copilot, or others) equipped with Jtest skills and MCP tools to automatically fix the violations, commit the fixes to a new branch, and open a new pull request.
The Jtest AI Agent skills used in this project are taken from the parasoft/jtest-ai-agent-skills repository.
The following prerequisites apply to both the GitHub Actions and local workstation workflows.
-
Install and license Parasoft Jtest
Parasoft Jtest 2026.1 or later must be installed and licensed on the machine (or runner) where analysis will execute. Note the installation directory — it is required for theJTEST_HOMEsetting. -
Install and configure GitHub Copilot CLI
The GitHub Copilot CLI agent must be installed and authenticated. Refer to the GitHub Copilot CLI documentation for installation steps. When selecting a model, choose one capable of multi-step reasoning and tool use. -
Integrating Jtest AI Solutions with GitHub Copilot CLI
Clone repository parasoft/jtest-ai-agent-skills and perform according parasoft/jtest-ai-agent-skills#integrating-jtest-ai-solutions-with-your-coding-agent usinginstall.shscript to configure jtest MCP and add the skills to your agent's skill set.
- Fork or copy this repository.
- Set up and connect a GitHub self-hosted runner: Settings > Actions > Runners. See also Prerequisites above.
- Enable the following option in your repository: Settings > Actions > General > Allow GitHub Actions to create and approve pull requests.
- Clone the repository to your local machine.
- Configure JTEST_HOME and other settings in
.github/workflows/jtest-analyzer.configor via environment variables as described in parasoft/jtest-ai-agent-skills#configuration-reference
- Create a
featurebranch in the local repository. - Introduce a change to the source code.
- Push the branch to the remote GitHub repository.
- Open a pull request on GitHub to merge your
featurebranch into your default branch (masterormain).
Opening a pull request triggers the workflow defined in .github/workflows/jtest-ai-agent-workflow.yml:
- The project is built.
- Jtest runs static analysis by running jtest-analyze.sh and archives the reports as build artifacts.
- If violations are found, the AI Autofix step is triggered:
- A new
autofix/pr-<number>/<timestamp>branch is created. - The AI agent processes violations rule by rule.
- Each fix is verified by running build-verify.sh.
- Verified fixes are committed to the
autofixbranch (one commit per rule). - The
autofixbranch is pushed to the remote repository. - A pull request from
autofixinto yourfeaturebranch is opened, and a comment with links is posted on the original PR.
- Review the changes proposed in the
autofixbranch. - Merge the
autofixbranch into yourfeaturebranch. - Verify that the pipeline passes on the updated
featurebranch. - Merge the
featurebranch into your default branch (masterormain).
- Clone the repository to your local machine.
- Configure JTEST_HOME and other settings in
.github/workflows/jtest-analyzer.configor via environment variables as described in parasoft/jtest-ai-agent-skills#configuration-reference
a) You may omitANALYZED_PROJECT_PATHsince it is set automatically in.github/workflow/jtest-ai-agent-run.shscript
b) Ensure thatJTEST_COMMIT_FIXESis set tofalse
- Run script
.github/workflow/jtest-ai-agent-run.sh
- Review the changes applied on project code.