Skip to content

cy.vrtStop() does not mark the test/build as completed #486

Closed

Description

Description

When using the Cypress integration with Visual Regression Tracker, calling cy.vrtStop() does not appear to complete the test/build in the VRT UI.

The Cypress test itself finishes successfully, and cy.vrtStop() is executed without errors, but in the Visual Regression Tracker UI the corresponding test/build remains in Running state.

Environment

  • Angular: 20.3.0
  • Angular CLI: 20.3.32
  • Cypress: 16.1.0
  • VRT Cypress agent: @visual-regression-tracker/agent-cypress 5.7.0
  • TypeScript: 5.9.2
  • Browser: Chrome
  • OS: Windows

Cypress configuration

The VRT plugin is registered as follows:

import { defineConfig } from 'cypress';
import { addVisualRegressionTrackerPlugin } from '@visual-regression-tracker/agent-cypress';

export default defineConfig({
  e2e: {
    baseUrl: 'http://localhost:4201',
    setupNodeEvents(on, config) {
      addVisualRegressionTrackerPlugin(on, config);
      return config;
    },
  },
  env: {
    visualRegressionTracker: {
      apiUrl: 'http://localhost:4200',
      project: 'test-app',
      apiKey: 'DEFAULTUSERAPIKEYTOBECHANGED',
      branchName: 'main',
    },
  },
});

Reproduction

A simplified test looks like this:

describe('Visual regression test', () => {
  before(() => {
    cy.vrtStart();
  });

  it('should track the page', () => {
    cy.visit('/');

    cy.vrtTrack('Home page');
  });

  after(() => {
    cy.vrtStop();
  });
});

The Cypress test completes successfully.

However, after cy.vrtStop() has been executed, the corresponding test/build in the Visual Regression Tracker UI is still displayed as Running.

Expected behavior

After cy.vrtStop() completes successfully, the corresponding VRT test/build should be marked as completed and should no longer appear as Running.

Actual behavior

The Cypress test finishes successfully, but the corresponding VRT test/build remains in Running state in the VRT UI.

Additional information

The application is an Angular application running locally on http://localhost:4201, while the VRT API is running locally on http://localhost:4200.

The Cypress command itself does not report an error when cy.vrtStop() is executed.

Could this be related to the lifecycle/state handling between @visual-regression-tracker/agent-cypress and the VRT backend?

I can provide additional information if needed, such as the complete Cypress logs, network requests made to the VRT API, or a minimal reproduction repository.

Activity

  1. Nok1on1 commented on Oct 1, 2026

    @Nok1on1

    i believe the problem is sdk-js's stop method here is fix. there is same problem on sdk-java too :(

  2. pashidlos commented on Oct 24, 2026

    @pashidlos
    Member

    Thanks @SalvatoreDiGenua-Orbyta, confirmed. cy.vrtStop() → sdk-js stop() sends PATCH /builds/:id with an empty body, and since the NestJS 11 upgrade (api 5.1.0) the backend no longer treated an empty body as "stop", so the build stayed Running.

    Fixed on the backend side in Visual-Regression-Tracker/backend#410: an empty body stops the build again, so existing agent-cypress / sdk-js versions work as soon as you update the api image to the next release — no client update needed.

    sdk-js will also send isRunning: false explicitly (Visual-Regression-Tracker/sdk-js#345, thanks @RiWiPe for the original fix in #343), and agent-cypress will pick it up in Visual-Regression-Tracker/agent-cypress#274.

  3. added 2 commits that reference this issue on Oct 24, 2026
    9a2e3ce
    a6ec670
  4. pashidlos commented on Oct 24, 2026

    @pashidlos
    Member

    Released: @visual-regression-tracker/agent-cypress@5.7.1 (uses @visual-regression-tracker/sdk-js@5.7.2, which sends isRunning: false on stop). Update the agent and cy.vrtStop() finishes the build again, also on backends that don't have the server-side fix yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions