Skip to main content

Run Tests

The DevAssure O2 Agent Extension supports multiple ways to run tests directly from the IDE. Teams can execute a single YAML test, an entire folder, all discovered tests, or code-change-focused sessions based on a branch diff or a specific commit. This execution model is designed to keep testing close to development. Instead of switching to external tools or manually selecting suites, developers can trigger validation from the Tests view, the editor through CodeLens, or git-aware actions that focus on changed code.

Prerequisite

Before starting a test run, make sure the following conditions are met:

  • You are logged in to DevAssure.
  • The workspace has been initialized and contains a valid .devassure/ folder.
  • Test cases exist under .devassure/tests/ or .devassure/test/, or a CSV file is available for execution.
  • If using Test branch or Test commit, the project path is a valid git repository.

If the workspace is still being initialized, if execution is already active, or if no DevAssure project is selected, some run actions may be disabled or show a wait state in the UI.

Run from the Tests view

The Tests view in the DevAssure sidebar is the primary place to discover and execute tests. It supports file-level, folder-level, full-suite, CSV-based, and git-aware runs from a single navigation surface.

Run a single test file

To run one YAML test file, click the run icon next to the file or right-click the file and choose Run Test. Only the selected file is executed in that session.

This mode is useful when validating a single feature flow, debugging a failing scenario, or iterating on a new test case without running the rest of the suite.

Run a folder

To run all tests inside a folder, click the run icon on the folder node in the Tests view. The extension executes every test discovered within that folder scope.

If a saved filter is active, the filter is combined with the folder scope rather than replacing it. In practice, this means the folder acts as the location boundary, while the filter narrows which tests inside that boundary are eligible to run.

Run all tests

To run all discovered tests in the project, click the run icon on the tests root node. This triggers execution for the complete scope currently visible to the extension.

This mode is useful for broad regression validation, sanity sweeps before release, or verifying that recent changes did not affect unrelated flows.

Run a CSV file from the sidebar

CSV files under .devassure/tests/ or .devassure/test/ can also be executed from the Tests view. These files display a run icon similar to YAML-based test.

When a CSV is run from the sidebar, the extension applies the current saved filter to determine which rows should be included in the execution set. This helps teams reuse the same CSV input while varying scope through filters.

Run tests from any CSV

The Run tests from CSV action at the bottom of the Tests view opens a file picker that defaults to the .devassure/ workspace. This allows users to choose any supported CSV file for execution, even if it is not currently listed in the tests tree.

This option is useful when teams organize test inputs outside the default tests folder or generate temporary CSV files as part of local validation workflows.

Run from the editor with CodeLens

The extension also exposes execution commands directly inside the editor using CodeLens, so users can run tests from the file they are actively editing.

Run a YAML test file with CodeLens

Open a test file located under .devassure/tests/ or .devassure/test/. A CodeLens action labeled Run Test (DevAssure Agent) appears near the top of the file.

Clicking the CodeLens action runs only that file using the current saved filter and workspace settings. This mode is ideal when editing a scenario and validating it immediately after making changes.

Run a CSV file with CodeLens

Open a CSV file under .devassure/ in the editor. A CodeLens action labeled Run Test Rows (DevAssure Agent) appears at the top of the file.

Selecting this action runs tests from the rows in that CSV file using the current filter context. This is useful for spreadsheet-driven workflows where test authors want to validate tabular scenarios without leaving the editor.