ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Test

by gerardroche ST3

Run your tests at the speed of thought.

Labels testing, tdd

Details

Installs

  • Total 91
  • Win 59
  • OS X 20
  • Linux 12
Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11
Windows 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 4 0 0 3 2 0 1 0 1 0 1 0 1 0 0
OS X 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 2 0 0 0 0 0 1 1 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0

Readme

Source
raw.​githubusercontent.​com

Test

Leverage the power of Sublime Text testing plugins.

Minimum Sublime Version Latest Stable Version GitHub stars Downloads Author

Screenshot

The following testing plugins are currently supported:

Language Framework Package
Sublime Text ColorSchemeUnit
PHP PHPUnit PHPUnitKit
Python Sublime Text UnitTesting

To add support for your testing tool please open an issue and I'll do my best to help.

INSTALLATION

Manual installation

  1. Close Sublime Text.
  2. Download or clone this repository to a directory named Test in the Sublime Text Packages directory for your platform:
    • Linux: git clone https://github.com/gerardroche/sublime-test.git ~/.config/sublime-text-3/Packages/Test
    • OS X: git clone https://github.com/gerardroche/sublime-test.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Test
    • Windows: git clone https://github.com/gerardroche/sublime-test.git %APPDATA%\Sublime/ Text/ 3/Packages/Test
  3. Done!

USAGE

Command Palette Command Description
:TestSuite test_suite Run test suite of the current file.
:TestFile test_file Run tests for the current file. If the current file is not a test file, it runs tests of the test file for the current file.
:TestNearest test_nearest Run a test nearest to the cursor (supports multiple selections). If the current file is not a test file, it runs tests of the test file for the current file.
:TestLast test_last Run the last test.
:TestVisit test_visit Open the last run test in the current window (useful when you're trying to make a test pass, and you dive deep into application code and close your test buffer to make more space, and once you've made it pass you want to go back to the test file to write more tests).
:TestSwitch test_switch Splits the window and puts nearest test case and class under test side by side.
:TestResults test_results Show the test results panel.
:TestCancel test_cancel Cancels current test run.

Add your preferred key bindings:

Menu > Preferences > Key Bindings

[
    { "keys": ["ctrl+shift+a"], "command": "test_suite" },
    { "keys": ["ctrl+shift+f"], "command": "test_file" },
    { "keys": ["ctrl+shift+n"], "command": "test_nearest" },
    { "keys": ["ctrl+shift+l"], "command": "test_last" },
    { "keys": ["ctrl+shift+v"], "command": "test_visit" },
    { "keys": ["ctrl+shift+s"], "command": "test_switch" },
    { "keys": ["ctrl+shift+c"], "command": "test_cancel" },
    { "keys": ["ctrl+shift+r"], "command": "test_results" },
]

Key bindings that often provided by packages by default:

Key Description
F4 Jump to Next Failure
Shift+F4 Jump to Previous Failure

LICENSE

Released under the BSD 3-Clause License.