Turn your manual testers into automation experts!Request a Demo

How to Set Up Claude Code with testRigor on Windows

Weekly Newsletter
Receive weekly testRigor newsletters packed with insights on test automation, codeless testing, and the latest advancements in AI.

You can connect Claude Code to testRigor so that Claude can help you create, run, troubleshoot, and maintain automated tests.

You do not need programming experience or previous command-line experience to complete this setup.
This guide is written specifically for Windows users and assumes you may be using PowerShell for the first time. At every important step, we will tell you what to do, what you should expect to see, and how to confirm that it worked before continuing.

How it Works:
Claude Code + testRigor

There are four important pieces in this setup. They work together, but each has a different job.
🤖
Claude Code
Your AI assistant
You interact with Claude Code in the terminal and describe what you want to accomplish in normal language.
⌨️
testRigor CLI
Command-line access
Allows testRigor operations to be performed from the command line instead of only through the web interface.
🔗
MCP
Connect Claude to testRigor
Allows Claude Code to communicate directly with testRigor and access the testRigor resources available to your user.
🧠
testRigor Skills
Teach Claude testRigor
Give Claude Code testRigor-specific instructions for writing tests, using the CLI, and working through test failures.
The complete setup: Prepare Windows → Install Claude Code and the testRigor CLI → Connect to testRigor → Add the testRigor Skills → Start working.

Prepare:
Get Your Windows Computer Ready

Step 1 · Open PowerShell

PowerShell is a Windows application that lets you give your computer written instructions instead of clicking buttons.
During this setup, you will mostly:
  1. Copy a command from this page.
  2. Paste it into PowerShell.
  3. Press Enter.
  4. Check the result.
You do not need to know how to write PowerShell commands yourself.
Click the Windows Start button and search for:
PowerShell
Open the normal PowerShell or Windows PowerShell application.
Do not select a version labeled x86. You normally do not need to choose Run as administrator.

When PowerShell opens, you should see something similar to:
PS C:\Users\YourName>
Your actual Windows username will appear instead of YourName.
This line means PowerShell is ready for your next instruction.
Do not type the PS C:\Users\YourName> portion yourself. You will paste commands after it.
I have never used PowerShell beforeLearn more
PowerShell does not always give you the visual confirmation you might expect from a normal application.
Some commands display many lines of information. Others finish successfully and display almost nothing.
In most cases, when you see the normal prompt again:
PS C:\Users\YourName>
PowerShell has finished the previous command and is waiting for another one.
You do not have to guess whether the important parts of this setup worked. We provide a verification command after each major step.

✓ Checkpoint — Continue when PowerShell is open and you see a line beginning with PS.

Step 2 · Install Node.js

The testRigor CLI requires Node.js version 18 or newer.
You will not normally open Node.js yourself. It provides functionality that the testRigor CLI needs.
Go to the official Node.js website and download the current LTS version for Windows.
LTS means Long-Term Support. It is generally the stable version intended for normal use.
Run the installer and keep the default installation options unless your organization has provided different instructions.
When the installation finishes, close PowerShell completely and open it again.
Confirm that Node.js is installed. In PowerShell, run:
node --version
You should see a version number. Your number may be different from examples you see online. That is fine.
Now run:
npm --version
You should see another version number.
✓ Checkpoint — Continue when both commands return version numbers.
npm says that running scripts is disabledTroubleshooting help
You may see an error similar to:
npm.ps1 cannot be loaded because running scripts is disabled on this system
This does not necessarily mean Node.js failed to install. Windows may simply be blocking the PowerShell script used by npm.
First try:
npm.cmd --version
If this returns a version number, npm itself is installed correctly.
You can use npm.cmd instead of npm when installing the testRigor CLI later:
npm.cmd install -g @testrigor/testrigor-cli
Another option, if your organization’s security policy permits it, is:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
If this is a company-managed computer and you are unsure whether you are allowed to change this setting, use the npm.cmd option or contact your IT team instead.

Step 3 · Check for Git

Git will be used later to download the testRigor Skills.
You do not need to learn Git for this setup.
First, check whether Git is already installed:
git --version
If you see a Git version number, Git is already installed. Do not reinstall it.
If PowerShell says that git is not recognized, download and install Git for Windows.
After installation, close PowerShell, open it again, and run:
git --version
✓ Checkpoint — Continue when git --version returns a version number.

Step 4 · Install Claude Code

Claude Code is the AI assistant that will work with testRigor.
Unlike the normal Claude website, Claude Code runs inside your command-line window.
In PowerShell, paste:
irm https://claude.ai/install.ps1 | iex
Press Enter.
You may see several lines while Claude Code downloads and installs.
When the installation finishes, close PowerShell completely and open it again.
Confirm that Claude Code is installed:
claude --version
You should see a Claude Code version number.
✓ Checkpoint — Continue when claude --version returns a version number.
PowerShell says that claude is not recognizedTroubleshooting help
If you just installed Claude Code, do not immediately install it again.
First:
  1. Close PowerShell completely.
  2. Open it again.
  3. Run claude --version again.
Windows applications that were already open do not always recognize newly installed commands immediately.
If the problem continues, run:
where.exe claude
This can help identify which Claude Code installation Windows can find.

Step 5 · Sign In to Claude Code

In PowerShell, run:
claude
Press Enter.
This is an important transition.
Claude Code normally opens inside the PowerShell window you already have open. A separate graphical application does not need to appear.
The appearance of the terminal will change, and you will now be interacting with Claude Code instead of normal PowerShell.
If Claude asks you to authenticate, follow its browser login process.

Know where you are

There are now two different types of commands in this guide:
PowerShell
You see something similar to:
PS C:\Users\YourName>
Examples: git --version, claude --version, claude mcp list.
Claude Code
You see the Claude Code interface inside the terminal.
Examples: /mcp, /goal, and normal-language requests to Claude.
Claude asks whether I trust this folderLearn more
Claude Code may ask whether you trust the folder where it was started.
Only approve a folder if you recognize it and intend Claude Code to work with its contents.
Later in this guide, we will deliberately start Claude Code inside a folder containing testRigor files.

Once you have successfully signed in, exit Claude Code so we can continue the setup.
Press:
Ctrl + C
If necessary, press it again. You should return to the normal PowerShell prompt.

Step 6 · Install the testRigor CLI

CLI means Command-Line Interface.
It is another way of interacting with testRigor: instead of clicking a button in the web application, a command can perform the operation.
Make sure you are back in normal PowerShell.
Run:
npm install -g @testrigor/testrigor-cli
You may see several lines while npm downloads and installs the CLI.
When the normal PowerShell prompt returns, verify the installation:
testrigor --version
You should see a testRigor CLI version number.
✓ Checkpoint — Continue when testrigor --version returns a version number.
npm still gives me the scripts-disabled errorTroubleshooting help
Use:
npm.cmd install -g @testrigor/testrigor-cli
instead.
Then verify normally:
testrigor --version

I already had the testRigor CLI installedTroubleshooting help
If an older installation already exists, update it with:
npm install -g @testrigor/testrigor-cli@latest
Then check:
testrigor --version
If Windows still appears to be using an unexpected installation, run:
where.exe testrigor

Connect:
Give Claude Code Access to testRigor

Step 7 · Create a testRigor Personal Authentication Token

Now that the testRigor CLI is installed, it needs permission to communicate with your testRigor account.
testRigor provides this through a Personal Authentication Token, or PAT.
Think of the PAT as a special password created for tools such as the testRigor CLI and Claude Code.
In testRigor:
  1. Click your username in the upper-right corner.
  2. Select API Tokens.
  3. Click Generate New Token.
  4. Give the token a clear description, such as Claude Code - Windows.
  5. Choose an expiration that follows your organization’s security policy.
  6. Generate the token.
  7. Copy it.
Keep this token available. You will use it in the very next step to authenticate the testRigor CLI, and again shortly afterward to connect Claude Code through MCP.
Treat the PAT like a password. Do not include it in screenshots, public messages, documentation, or source-control repositories.
If a token is accidentally exposed, revoke it in testRigor and generate a new one.

Step 8 · Authenticate the testRigor CLI

Now we will use the Personal Authentication Token you just created.
In PowerShell, run:
testrigor authenticate
The CLI will ask for your testRigor Personal Authentication Token.
Paste the PAT and press Enter.
Once the token is saved, the CLI will display a confirmation message.
This allows future CLI commands to authenticate without asking you to enter the token every time.
✓ Checkpoint — Continue when the CLI confirms that authentication was saved.
Advanced: Using TESTRIGOR_API_KEY insteadAdvanced option
Most first-time users do not need this option.
Automated systems such as CI pipelines cannot normally stop and answer an authentication prompt. For these situations, testRigor can use an environment variable named TESTRIGOR_API_KEY.
On Windows:
[Environment]::SetEnvironmentVariable(
    "TESTRIGOR_API_KEY",
    "YOUR_TESTRIGOR_PAT",
    "User"
)
Replace YOUR_TESTRIGOR_PAT with your real token.
Close PowerShell and open it again afterward.
You can safely verify that the variable exists without displaying the token:
if ($env:TESTRIGOR_API_KEY) {
    "TESTRIGOR_API_KEY is configured"
} else {
    "TESTRIGOR_API_KEY is NOT configured"
}

Step 9 · Connect Claude Code to testRigor with MCP

Now we will use the same Personal Authentication Token to create the direct connection between Claude Code and testRigor.
MCP stands for Model Context Protocol.
You do not need to understand the protocol itself. For this setup, the important idea is: MCP allows Claude Code to communicate directly with testRigor.
Make sure you are in normal PowerShell.
Replace YOUR_TESTRIGOR_PAT in the command below with the Personal Authentication Token you created in Step 7:
claude mcp add --transport http --scope user --header "personal-access-token: YOUR_TESTRIGOR_PAT" testrigor https://api2.testrigor.com/api/v1/mcp
Do not leave the words YOUR_TESTRIGOR_PAT in the command. They are only a placeholder.
Do not add brackets around your token.
Press Enter.
Once the configuration is saved, run:
claude mcp list
Look for testrigor. You want its status to indicate that it is connected.
✓ Checkpoint — Continue when the testrigor MCP connection appears successfully.
testRigor does not show as connectedTroubleshooting help
Run:
claude mcp get testrigor
This provides more information about the saved MCP configuration.
Common causes include:
  • The PAT was copied incorrectly.
  • The PAT expired or was revoked.
  • Your network or firewall is blocking the connection.
  • The MCP endpoint or header was entered incorrectly.
  • The testRigor user does not have access to the resource you are trying to use.
MCP does not bypass testRigor permissions.

Step 10 · Confirm MCP from Inside Claude Code

Start Claude Code:
claude
Remember: the terminal changes because you are now inside Claude Code.
Inside Claude Code, enter:
/mcp
You should see your configured MCP connections. Look for testRigor.
Give the connection a simple test. Before asking Claude to change anything, try this read-only request:
List the testRigor test suites I have access to.
Claude should use the MCP connection and return the testRigor suites your user can access.
✓ Checkpoint — If Claude can retrieve your test suites, Claude Code and testRigor are successfully communicating through MCP.
Claude connects to testRigor but cannot access my suiteTroubleshooting help
Open the same suite in the testRigor web application while signed in as the user who generated the PAT.
If that user cannot access the suite in testRigor, the PAT will not provide additional access through MCP.
Correct the testRigor permissions first rather than immediately cloning or recreating the suite.

Add the Skills:
Teach Claude How to Work with testRigor

Step 11 · Install the testRigor Skills

MCP gives Claude access to testRigor.
Skills give Claude more detailed instructions about how to work with testRigor correctly.
A Skill is not another application. There is no Skills window, login screen, or application icon.
Skills are instruction files stored on your computer that Claude Code can use when your request involves testRigor.
🔁
testrigor-dev-loop
The end-to-end workflow
Helps Claude build, run, inspect, fix, and run tests again as part of an iterative development loop.
✍️
testrigor-write-tests
Writing testRigor tests
Helps Claude write and edit testRigor tests, reusable rules, and other testRigor test content.
⌨️
testrigor-cli
Using the CLI
Helps Claude understand and use testRigor command-line functionality correctly.
Exit Claude Code and return to PowerShell.
Download the Skills:
git clone https://github.com/TestRigor/skills.git "$HOME\testrigor-skills"
You will probably see messages such as:
Cloning into...
Receiving objects...
Resolving deltas...
When the normal PowerShell prompt returns, the files have been downloaded.
Create Claude’s Skills folder:
New-Item -ItemType Directory -Path "$HOME\.claude\skills" -Force | Out-Null
You may see no success message at all. That is normal.
Copy the testRigor Skills into Claude:
Copy-Item -Path "$HOME\testrigor-skills\testrigor-*" -Destination "$HOME\.claude\skills" -Recurse -Force
Again, PowerShell may display little or no output.
Instead of guessing whether it worked, verify it:
Get-ChildItem "$HOME\.claude\skills" -Directory -Filter "testrigor-*"
You should see:
testrigor-cli
testrigor-dev-loop
testrigor-write-tests
✓ Checkpoint — Continue when the three testRigor Skill folders appear.
The testrigor-skills folder already existsTroubleshooting help
This usually means the Skills were downloaded during an earlier setup attempt.
You do not need to delete everything and start again.
Update the existing copy with:
git -C "$HOME\testrigor-skills" pull
Then repeat the copy and verification steps above.

Another guide tells me to use mkdir -p or cp -rLearn more
Those commands are commonly used in macOS and Linux instructions.
This guide intentionally uses Windows PowerShell commands.
If a macOS/Linux command fails in PowerShell, that does not necessarily mean Claude Code or testRigor is broken. The command may simply have been written for another operating system.

Step 12 · Restart Claude Code

If Claude Code was open while the Skills were installed, close it and start a new session:
claude
Claude Code can now discover the testRigor Skills.
You normally do not need to activate each Skill manually. Simply describe what you want to do.
For example:
Write a testRigor test that logs in and verifies that the dashboard appears.
Or:
Run my testRigor tests and help me troubleshoot the failures.

Start Working:
Use Claude Code with Your testRigor Tests

Step 13 · Optional: Configure a Default testRigor Suite

If you use the CLI regularly, you can configure a default test suite so you do not have to provide its ID every time.
Open the suite in testRigor and find its unique suite ID in the browser URL.
For example, if the URL contains:
/test-suites/1234567890/
the test suite ID is:
1234567890
In PowerShell, run:
testrigor test-suite config --default YOUR_TEST_SUITE_ID
Replace YOUR_TEST_SUITE_ID with the actual value.
Verify the saved configuration:
testrigor test-suite config --show
Once configured, you can run the default suite with:
testrigor test-suite run
Why configure a default suite?Learn more
Without a default, you may need to tell the CLI which suite you mean each time.
Setting a default simply saves the suite you normally work with. You can still specify another suite whenever necessary.

Step 14 · Optional: Work with Existing Test Files Locally

Claude Code is especially useful when your tests are available as files on your computer.
Create a working folder:
New-Item -ItemType Directory -Force "$HOME\testrigor-work\my-suite" | Out-Null
Move into it:
Set-Location "$HOME\testrigor-work\my-suite"
Your PowerShell prompt should now show that folder. For example:
PS C:\Users\YourName\testrigor-work\my-suite>
If you are starting from an existing testRigor suite:
  1. Open the suite.
  2. Open Export Data.
  3. Click Export.
  4. Download the generated file.
  5. Extract the files into your working folder.

Step 15 · Start Claude Code in Your Test Folder

If you are working with local test files, the folder where you start Claude Code matters.
First move to the folder:
Set-Location "$HOME\testrigor-work\my-suite"
Then start Claude:
claude
Claude Code may ask whether you trust the folder.
Approve it only if this is the directory you intended Claude to work with.

Step 16 · Give Claude Its First testRigor Task

You do not need to communicate with Claude using programming language. Describe what you want in normal English.
For test work, make three things clear:
  1. Which test case Claude should work on.
  2. What the test should do.
  3. Which test suite Claude should use to verify the result.
For example:
Work on the test case "Checkout with valid credit card."

It should complete the checkout flow described below and verify that the order confirmation page appears.

Run it against testRigor suite 1234567890.

Do not change unrelated test cases.

Expected behavior:
[paste the specification here]
The specification could come from a Jira ticket, acceptance criteria, product documentation, an existing test case, or another source that describes the expected behavior.

Step 17 · Using /goal for Iterative Test Work

For a task with a clear completion condition, Claude Code’s /goal feature can be useful.
For example:
/goal Test case "Checkout with valid credit card" passes in testRigor suite 1234567890 according to the specification below. Do not change unrelated test cases. If authentication, permissions, or an external dependency prevents completion, stop and explain the blocker.
Then provide the specification.
A strong goal tells Claude what success looks like.
Better:
The test passes in the specified testRigor suite according to the expected behavior.
Less useful:
Make the test better.

Setup Complete:
You’re Ready to Use Claude Code with testRigor

At this point, the core setup is complete.
✓ Claude Code
Installed and authenticated on Windows.
✓ testRigor CLI
Installed and authenticated with your testRigor account.
✓ MCP
Claude Code can communicate directly with testRigor.
✓ testRigor Skills
Claude has testRigor-specific guidance available when you ask it to work with tests.
For normal use, your workflow is now much simpler:
  1. Open PowerShell.
  2. Go to your test project folder if necessary.
  3. Run claude.
  4. Describe what you want to accomplish in normal English.
  5. Review Claude’s proposed actions and permission requests.
  6. Verify the result in testRigor.

Troubleshooting:
If Something Doesn’t Look Right

If your setup worked normally, you do not need to read everything below. Open only the problem that matches what you are seeing.
node is not recognizedTroubleshooting help
If you just installed Node.js, close PowerShell completely and open it again.
Then run:
node --version
Do not immediately reinstall Node.js. An already-open PowerShell window may simply not know about the new installation yet.

npm.ps1 cannot be loaded because scripts are disabledTroubleshooting help
Try:
npm.cmd --version
If that works, npm itself is installed.
Use:
npm.cmd install -g @testrigor/testrigor-cli
when installing the testRigor CLI.
If your organization’s policies allow it, another option is:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Do not weaken or bypass company-managed security policies without approval.

git is not recognizedTroubleshooting help
Install Git for Windows, then close and reopen PowerShell.
Check again with:
git --version

claude is not recognizedTroubleshooting help
Close and reopen PowerShell first.
Then run:
claude --version
If necessary:
where.exe claude
can show which Claude installation Windows can find.

I ran a command and nothing appearedTroubleshooting help
Some PowerShell commands do not display a success message.
If the normal prompt returns:
PS C:\Users\YourName>
the command has probably finished. Use the verification step immediately after the command rather than guessing whether it worked.

A folder or item already existsTroubleshooting help
This often means part of the setup was already completed during an earlier attempt.
Do not automatically delete the existing folder.
For the testRigor Skills repository, update the existing copy with:
git -C "$HOME\testrigor-skills" pull

MCP says Failed to connectTroubleshooting help
Run:
claude mcp get testrigor
Then check whether:
  • The PAT is still valid.
  • The full PAT was copied correctly.
  • The token was revoked.
  • Your testRigor user can access testRigor normally.
  • A company firewall or network restriction could be blocking the connection.
Claude can connect to testRigor but cannot access my suiteTroubleshooting help
Open the same suite in the testRigor web application while signed in as the user who generated the PAT.
If that user cannot access the suite in testRigor, MCP will not provide additional permissions.
Correct the testRigor access problem first.

Claude does not seem to use the testRigor SkillsTroubleshooting help
In PowerShell, check:
Get-ChildItem "$HOME\.claude\skills" -Directory -Filter "testrigor-*"
You should see:
testrigor-cli
testrigor-dev-loop
testrigor-write-tests
If the folders are present, exit Claude Code completely and start a new Claude session.

Safety:
Important Options to Understand

Should I disable Claude’s permission prompts?Safety information
No, not for normal workstation use.
Claude Code’s permission controls help prevent unintended changes to your computer and files.
You may encounter demonstrations or advanced workflows that bypass permission checks. These are intended for controlled or isolated environments and should not be the default setup on a normal Windows workstation.
Start Claude normally:
claude
Inside Claude Code, you can review permissions with:
/permissions

Be careful when synchronizing local tests to an existing suiteSafety information
The testRigor CLI can do more than run tests. It can also work with local test files and update a testRigor suite.
Some options change how local files are synchronized with the remote suite.
In particular, do not casually use:
--explicit-mutations
against an important shared suite unless you understand the intended synchronization behavior.
When learning this workflow, use a development or personal test suite rather than experimenting against an important shared suite.

Next Steps:
Go Further with Claude Code and testRigor

Once the initial setup is working, you can explore more advanced workflows such as testRigor CLI execution options, CI/CD usage, localhost testing, targeted test execution, JUnit reporting, synchronizing local test files, and more advanced Claude Code permissions.
For more information, see:
Your actual instructions to Claude can still be written in plain English.
Related Articles

Microsoft SSO with TOTP Setup Using QR Code

Through Microsoft SSO with TOTP support, testRigor users can automate login flows that require a time-based authentication code ...

Selenium Test Example

What is Selenium? Selenium is an open-source software tool used to create automated UI tests. It allows you to write scripts in a ...
Privacy Overview
This site utilizes cookies to enhance your browsing experience. Among these, essential cookies are stored on your browser as they are necessary for ...
Read more
Strictly Necessary CookiesAlways Enabled
Essential cookies are crucial for the proper functioning and security of the website.
Non-NecessaryEnabled
Cookies that are not essential for the website's functionality but are employed to gather additional data. You can choose to opt out by using this toggle switch. These cookies gather data for analytics and performance tracking purposes.