CycleMantle
Product

Mock API stand-ins that your agent writes and runs

01

A mock API is a stand-in for a real service: it returns fixed answers from a file, so your tests behave the same way on every run. CycleMantle writes that file, builds made-up sample records, and runs your test command from the chat while you watch each step. You decide which of its proposals reach your project.

01

Run your tests

Shell runs your test command, and the card shows the real exit code and the full output.

02

Write test files

write_file and edit_file propose tests and fixtures as a diff that you accept or reject.

03

Read the results

read_file and grep open reports and logs so the agent can name the lines still untested.

What the agent can do in a test project

How a session works

You describe the task in the chat. The agent reads your code, runs commands and shows each result as a card, then waits for your decision before anything changes in Ask first. Plan only comes first when you want to read the steps before any of them run. Every card stays in the chat, so you can scroll back and see what ran.

Four tasks you can hand over

Replace a real service in a test

Your class asks an exchange-rate service for a number, and the test should not depend on a live server. Ask the agent for a mock API: read_file loads the client class, write_file saves tests/fixtures/rates.json with fixed replies, and edit_file changes the test so that it reads that file instead of calling out. Calling real functions in unit test setup makes a test depend on code you did not mean to check, so keep the fixture small and name it after the call it replaces. Ask first shows the diff before anything is saved. Accept it, let Shell run your test command, and read the exit code. Then expand the card to confirm that the replies in the output are the made-up ones. If the output shows a real server address, stop and fix the test.

Create made-up sample records

For a report class you may need 3 users with names, dates and amounts. Test data generation here means the agent writes a JSON file of invented people; it never copies rows from a real customer list. Among the tools testers use to generate test data, a plain file that the agent writes is easy to review in a diff and easy to change later. Use glob to find existing fixtures first, so the new file does not clash with a name that is already taken. Open the file in the chat, fix any odd value by hand, add one row with an empty name to cover an edge case, and run the tests again. Keep names clearly fake. Commit the file with your code, so teammates share the same rows.

Check what the tests miss

Run your coverage command through Shell, then ask the agent to read the report with read_file. It names the functions whose lines never ran and proposes tests for them as a diff. People often ask what to test in a unit test, and the answer starts small: one normal input, one edge such as an empty list, and one invalid value. Accept the tests one by one instead of all at once, so you notice the weak ones. A higher figure still does not prove the code is correct. Stay sceptical. Read each assertion yourself, and ask whether it would fail if the function were wrong. After the last accepted test, run the command a final time. Repeat until the files that matter most have tests you trust.

Understand a failing test

When a test fails, the card shows the real output of your test command. Ask the agent to read the test and the class under test with read_file, then explain the mismatch. It can use grep to find where a value is built and propose a fix as a diff. People ask why mocking causes problems, and one answer is that a fake reply can drift away from the real service. Compare the fixture with the service you own, accept the diff only if it matches, and run the command again. If the same test fails twice, switch to Plan only and ask for an explanation before any further edit. Keep the failing output until the fix is accepted.

What CycleMantle does not do

CycleMantle is not a hosted service or a plugin. It is meant only for your own files, your own PC and servers you are authorised to use, and you decide which folders, commands and servers the agent may touch, because Shell, web and SSH are not limited to the working folder. Passing tests do not guarantee that code is correct.

CycleMantle for Windows

Hand the next test to CycleMantle

Download CycleMantle ↗