Giter Club home page Giter Club logo

karma-test-explorer's Introduction

Installs Rating Build and Test

Karma Test Explorer for Visual Studio Code

This extension lets you run your Karma or Angular tests in Visual Studio Code using the Test Explorer UI, and supports both the Jasmine and Mocha test frameworks. It is based on the Angular/Karma Test Explorer extension, with various significant enhancements that are outlined in Why this Extension below.

Karma Test Explorer screenshot


Your feedback helps improve this extension. Please rate it in the marketplace, star the GitHub project, and report issues and feature requests through the issue tracker.


Contents

Features

Core Features

  • Angular and Karma project support
  • Jasmine and Mocha test framework support
  • Karma version 6 support
  • Support for Dev Containers
  • Watch mode support with auto pass / fail test status update
  • Show only focused tests or exclude disabled tests from the test view
  • Non-Headless testing mode
  • Group and run tests by folder or by test suite
  • Duplicate test detection and reporting
  • Specify or override environment variables for Karma
  • Run your tests in VS Code using any custom launcher in the Karma config file
  • Auto-reload Karma when karma config or other files change
  • Automatic port management prevents any port conflicts when running tests
  • Support for using a custom Karma executable or script (enables greater automation and integration with other processes and workflows)
  • Config option to easily switch Karma server to debug logging

UI Features

  • Shows your Karma tests in a visual test explorer in VS Code
  • Adds code lenses to your test files to easily run individual tests or suites
  • Adds gutter decorations to your test files that show the status of each test
  • Adds line decorations to your test files that show the failure message at the point of each test failure

Quick Start

Karma Test Explorer uses reasonable defaults that in many cases means it will work out-of-the-box without any configuration. Nonetheless, specific configuration to the particular needs of your project can often bring additional performance, usability and features that increase the productivity and value of the extension to you and your team.

To quickly get started:

  • Ensure the required dependencies are installed - Chrome browser on the computer or container, and the project dependencies (such as Karma, Angular, Jasmine, Mocha, etc)
  • Install the Karma Test Explorer extension
  • If the project root path is not same as the VS Code workspace root, specify its path using the karmaTestExplorer.projectRootPath setting
  • If the karma.conf.js file is not at the project root folder, specify its path using the karmaTestExplorer.karmaConfFilePath setting
  • Specify your project's test files using the karmaTestExplorer.testFiles setting
  • Apply the updated settings and wait a moment while it refreshes, or simply restart VS Code
  • When done, you should see your tests in the Test View, and code lenses above each test in the editor, either of which can be used to run and debug the tests

Also explore the many other extension settings to further customize it to the needs of your project and team, and if you run into any issues with setup or usage, please see the more detailed Documentation for help.


Documentation

For a more detailed guide on how to setup Karma Test Explorer to work with your project, customizing and fully leveraging all its features, and other helpful documentation around common scenarios and potential issues, please see the more detailed Documentation.

Why this Extension

The Karma Test Explorer extension was initially created out of need for additional features from the Angular/Karma Test Explorer extension at a time when that project seemed not to be accepting contributions anymore, and is a major rewrite aimed at facilitating various significant enhancements and new features (such as some of those in the initial release changelog).

This extension's core focus is on better and robust support for:

  • Large projects with thousands of tests
  • Remote development sceanarios with Dev Containers
  • Flexibility to support a wide range of testing scenarios and workflows
  • Reliability, usability, and team productivity

Acknowledgement

Special thanks to the author and contributors of the Angular/Karma Test Explorer extension on which Karma Test Explorer is based.

Reporting Issues

If you encounter any problems using Karma Test Explorer, would like to request a feature, or have any questions, please open an issue here.


See Also

karma-test-explorer's People

Contributors

lucono avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.