Tip 14Running Tests and Browsing Failures

When doing test-driven development, you may need to run your whole test suite, the tests defined in one particular file, or even just a single isolated test. It would be handy if your text editor provided commands for executing tests at each of these levels of granularity. Also, wouldn’t it be cool if you could leverage Vim’s quickfix list so that when a test fails you could jump directly to the line of code where the error originated? In this tip, you’ll learn about a plugin that handles all of this and is compatible with many different programming languages and testing frameworks.

Preparation

In this tip, you’ll be using the vim-test plugin[44] by Janko Marohnic´ . (The plugin with the awesome strapline: ...

Get Modern Vim now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.