Tests & debugging

Run, test and read the results

Run project tests and turn a failure into a patch verified against the same selection.

In this guideBefore you start · PremiumMake a run repeatableFrom the summary to the failing caseFix a failed test and compare before and afterIf a filter finds no cases

Before you start · Premium#

This guide covers tools included in Code Weaver Premium. Sign in to your account in the IDE and check that Premium is active. Without Premium you can still browse, search, edit and save your files.

The integrated terminal in project context.Code Weaver · Windows

Make a run repeatable#

Use Build and run to keep your usual commands. A profile contains commands, directories and variables; it can run them sequentially, in parallel or according to service dependencies. Start the database, API and frontend together covers the full setup.

  1. Open Build and run and click New.
  2. Name the profile and choose the Run mode.
  3. Fill in Command and Starting directory with your project values.
  4. Save the profile and click Start.
  5. Check the output and result; open recognized source locations to reach the code.

From the summary to the failing case#

The Test panel discovers supported projects, including Node, Vitest, pytest, xUnit, Jest, JUnit and PHPUnit. Framework runtimes and dependencies must be available. Results distinguish passing, failing and skipped cases; filter or rerun the failures.

Where supported, coverage links lines to sources, and affected-test runs use project dependencies. An earlier result does not prove the state of sources changed after that run.

Fix a failed test and compare before and after#

The baseline is the initial run: it records the suite, filter and selection of tests that failed. The comparison uses this same selection to verify the fix. Example: a VAT total test fails for a zero quantity; the patch must correct the behavior and pass that test again.

  1. Open Tests, choose the project and test selection, then run it.
  2. In the failed run, click Fix with AI and verify.
  3. In chat, choose Prepare fix and verification, review the attached errors and sources and send the request.
  4. Read the proposal and compare the changed files before applying it.
  5. Under Verified fix · before and after, enable After Apply, repeat the exact baseline selection.
  6. Apply the reviewed patch and check Before, After and the original selection reference. Repeat original selection lets you run it again.

If a filter finds no cases#

Filters follow the framework: Jest uses a name expression, JUnit can use Class#method and xUnit uses VSTest expressions. Check the selected project and syntax before concluding that a test does not exist. An empty filter result is reported and must not be interpreted as a passing suite.

Open original image ↗