Skip to content

About

A simple VSCode extension that runs the current test

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Test Runner VS Code Extension

A VS Code extension that helps you run PHP tests directly from your editor using a persistent terminal.

Features

  • Run tests for the current function using Ctrl+Alt+T (Windows/Linux) or Cmd+Alt+T (Mac)
  • Run all tests in the current file using Ctrl+Alt+A (Windows/Linux) or Cmd+Alt+A (Mac)
  • Works with PHP test files that have "Test" in their name or path
  • Automatically detects the current test function name
  • Runs tests in a persistent terminal window for better workflow and test history visibility

Installation

  1. Run the installation script:

    ./install.sh
  2. Reload VS Code to activate the extension:

    • Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux)
    • Type "Reload Window" and select "Developer: Reload Window"
    • Press Enter

    Or use the keyboard shortcut:

    • Press Cmd+R (Mac) or Ctrl+R (Windows/Linux)

Usage

Running Test for Current Function

  1. Open a test file
  2. Place your cursor inside a test function
  3. Press Cmd+Alt+T (Mac) or Ctrl+Alt+T (Windows/Linux)
  4. The test will run in the persistent terminal window

Running Tests for Current File

  1. Open a test file
  2. Press Cmd+Alt+A (Mac) or Ctrl+Alt+A (Windows/Linux)
  3. All tests in the file will run in the persistent terminal window

Known Issues

  • Only works with PHP test files that have "Test" in their name or path
  • Requires the cursor to be positioned inside a test function when running a single test

Changelog

[1.0.1] - 2024-03-21

Changed

  • Changed functionality to run tests directly in a persistent terminal instead of copying commands to clipboard
  • Tests now run in the same terminal window for better workflow and visibility of test history
  • Updated command titles to reflect the new functionality
  • Updated VS Code engine version requirement to ^1.80.0

[1.0.0] - 2024-03-21

Added

  • Initial release
  • Added ability to copy test commands for current function (Ctrl+Alt+T / Cmd+Alt+T)
  • Added ability to copy test commands for current file (Ctrl+Alt+A / Cmd+Alt+A)
  • Added support for PHP test files with "Test" in their name or path
  • Added automatic function name detection for test methods

About

A simple VSCode extension that runs the current test

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages