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

Cover​Me

by shauryachats ALL

A Sublime Text 3 Plugin to view code coverage for any programming language's test framework.

Details

Installs

  • Total 222
  • Win 116
  • Mac 77
  • Linux 29
Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5
Windows 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 1 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 0 0 0

Readme

Source
raw.​githubusercontent.​com

CoverMe

A Sublime Text 3 Plugin to view code coverage for any programming language's test framework.

This plugin can easily be extended for any testing framework for any programming language.

Prograaming languages supported

  • Go's go test
  • Python's unittest and coverage.py

The basic paradigm followed by the plugin is: - Run the commands necessary to generate coverage output. - Parse the coverage output.

CoverMe Demo

How to install?

  1. Clone this repository in your Packages folder.
  2. Package Control (under review)

How to use?

It is pretty easy to use this plugin.

First, Go to Preferences > Package Settings > CoverMe > Settings - User.

Update the required variables according to the Settings - Default file.

For example, for Go:

"go" : {
    "GOPATH" : "your gopath goes here"
}

After this, to view code coverage, press ctrl+shift+c (you can override this in keymap) to be presented with various coverage modes, select one and coverage would be presented according to that.

Optional : Project level settings

For some projects, you would need to write your own custom coverage modes. To do that, create a new Sublime Project and in the .sublime-project file:

{
    "folders":
    [
        {
            "path": "/home/shauryachats/go/src/test_package"
        }
    ],
    "settings":
    {
        "CoverMe": {
            "go" : [
                {
                    "title": "Custom Coverage Mode",
                    "basepath" : "/home/shauryachats/go/src/test_package",
                    "commands" : [
                        "go test -coverpkg=./... ./... -coverprofile cover.out"
                    ]
                }
            ]
        }
    }
}

Under the settings key, create a CoverMe key containing the list of coverage modes for each programming type.

Each coverage mode is of the form: “json { "title” : “the title on the quick draw panel”, “basepath” : “the base path for the project, where the commands are to be run”, “commands” : “a list of shell commands, which are run to produce coverage information.” }