Skip to content

Testing & TDD

Do not stop at code that looks right.

Turn expected behaviour into a check. Generate tests in your project context or start with a failing test and work through implementation and refactoring.

AI test generation is available from Pro. An existing, runnable project test setup is needed to execute and verify the tests.

Existing Lurus Code screenshot illustrating the product interface and project workflow.
A look at Lurus Code

Behaviour before implementation

Follow the TDD cycle

  1. RED

    Define what should happen.

    Write a failing test for the required behaviour and check that it fails for the right reason.

  2. GREEN

    Make the smallest change.

    Implement enough to satisfy the test. Run it again to verify the behaviour.

  3. REFACTOR

    Improve it without changing it.

    Clean up the implementation and rerun the relevant tests to catch regressions.

Tests for the code you have

Start with the implementation. Add the missing checks.

/test gen reads a file or module and the test setup, then asks the agent to generate tests for normal cases, boundaries and errors. Review what the assertions actually prove.

  1. Generate tests for a source file
    /test gen src/auth.ts

  1. Read the code and its dependencies
  2. Match the project test framework
  3. Create assertions and required mocks
  4. Run tests and investigate failures
The diff and verification that actually ran.
Results and checks

Keep test-first work intentional

A guard for the workflow.

TDD Guard can warn about source changes without corresponding tests or apply stricter blocking. Choose the setting for your task; it does not replace a review of test quality.

  1. Enable warnings
    /tdd on
  2. Enable strict mode
    /tdd strict
  3. Disable TDD Guard
    /tdd off

Before the next handoff

A green run needs meaningful assertions.

Run the test suite your project actually uses. Check whether the tests cover the requirement, not just the implementation. Keep integration checks and human review for the paths that matter.

Generated tests can be incomplete, incorrect or overly tied to the code. Passing tests do not guarantee a bug-free or secure release.

Capture of a run handoff with the resulting diff, verification evidence and remaining gaps.
Implementation and its checks

Choose the first check.

Run these slash commands inside Lurus Code chat. Replace the example file or task with your own project context.

Read the documentation
  1. Generate tests for a source file
    /test gen src/auth.ts
  2. Start a test-first feature
    /tdd Add input validation

Your code stays yours.

Source code and request context are processed with Zero Data Retention. No use for model training. Providers and processing regions are disclosed transparently.

See privacy and processing details

A few things to know before you start.

How do I generate tests?
Use /test gen followed by a file or module inside Lurus Code chat. Test generation is available from Pro. The agent uses project context and the existing test setup.
Does this replace manual testing?
No. Review generated assertions and mocks. Business-critical, integration and acceptance scenarios still need your judgement and existing quality process.
Can I work test-first?
Yes. /tdd with a task starts a Red-Green-Refactor workflow. /tdd on, /tdd strict and /tdd off control TDD Guard. Verify the results with your project tests.

Testing & TDD

Give the next change a check that matters.

Start with one file or one expected behaviour. Review the tests and run them before trusting the result.

For Pro, Pro+ and Ultra. Paid subscription after the trial unless you cancel beforehand. Usage and features depend on your plan and credit.

Want to start with your team? Talk to us.

A deliberate choice

Before your first prompt.

Interactive demo
Lurus Codeprivacy-demo · illustrative workspace

Demo session ready. Your model choice and data route are separate decisions.

Illustrative scenario. No real sign-in, security test or code transmission takes place.

Image preview