All Projects → nadako → Coverme

nadako / Coverme

Licence: mit
Code coverage for Haxe

Programming Languages

haxe
709 projects

Labels

Projects that are alternatives of or similar to Coverme

Mosdepth
fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing
Stars: ✭ 376 (+3318.18%)
Mutual labels:  coverage
Xcov
Nice code coverage reporting without hassle
Stars: ✭ 467 (+4145.45%)
Mutual labels:  coverage
Xcodecoverage
Code coverage for Xcode projects (Objective-C only)
Stars: ✭ 818 (+7336.36%)
Mutual labels:  coverage
Shellspec
A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells
Stars: ✭ 375 (+3309.09%)
Mutual labels:  coverage
Coveralls Python
Show coverage stats online via coveralls.io
Stars: ✭ 455 (+4036.36%)
Mutual labels:  coverage
Kcov
Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
Stars: ✭ 515 (+4581.82%)
Mutual labels:  coverage
Mochify.js
☕️ TDD with Browserify, Mocha, Headless Chrome and WebDriver
Stars: ✭ 338 (+2972.73%)
Mutual labels:  coverage
Cyr2lat
Converts Cyrillic characters in post, page and term slugs to Latin characters. Useful for creating human-readable URLs.
Stars: ✭ 25 (+127.27%)
Mutual labels:  coverage
Intern
A next-generation code testing stack for JavaScript.
Stars: ✭ 4,326 (+39227.27%)
Mutual labels:  coverage
Gogradle
A Gradle Plugin Providing Full Support for Go
Stars: ✭ 712 (+6372.73%)
Mutual labels:  coverage
Utplsql
Testing Framework for PL/SQL
Stars: ✭ 402 (+3554.55%)
Mutual labels:  coverage
Simplecov
Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
Stars: ✭ 4,362 (+39554.55%)
Mutual labels:  coverage
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (+5118.18%)
Mutual labels:  coverage
Jscover
JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
Stars: ✭ 377 (+3327.27%)
Mutual labels:  coverage
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (+8036.36%)
Mutual labels:  coverage
Altcover
Cross-platform coverage gathering and processing tool set for .net/.net core and Mono
Stars: ✭ 344 (+3027.27%)
Mutual labels:  coverage
Gcovr
generate code coverage reports with gcc/gcov
Stars: ✭ 482 (+4281.82%)
Mutual labels:  coverage
Sbt Ignore Play Generated
Configure linters and coverage tools to ignore Play's generated source files.
Stars: ✭ 10 (-9.09%)
Mutual labels:  coverage
Golang Ci Template Github Actions
example for golang project using github actions
Stars: ✭ 24 (+118.18%)
Mutual labels:  coverage
Express Babel
Express starter kit with ES2017+ support, testing, linting, and code coverage
Stars: ✭ 621 (+5545.45%)
Mutual labels:  coverage

CoverMe

This library provides code coverage for Haxe projects.

STATUS: PRE-ALPHA (very much work in progress, trying out stuff, NOT ready for real world)

It is heavily inspired by mcover, however it's written from scratch in modern Haxe for modern Haxe.

Not much more to say right now, since it's in very early stage of development.

Here's something to play with though: https://nadako.github.io/coverme/

Usage

Don't use it, it's not ready. I'll update the README when it's ready for public usage. :)

Implementation

It's implemented as the build macro that instruments Haxe expressions by adding additional logging function call to each "statement" and "branch", e.g. this:

class MyClass {
    static function myFunction(a:Int) {
        if (a == 10) {
            trace("Ten!");
        } else {
            trace("Not ten!");
        }
    }
}

becomes this (JavaScript output):

MyClass.myFunction = function(a) {
    coverme_Logger.logStatement(0);
    if(coverme_Logger.logBranch(1,a == 10)) {
        coverme_Logger.logStatement(2);
        console.log("Ten!");
    } else {
        coverme_Logger.logStatement(3);
        console.log("Not ten!");
    }
};

As you can see, there are logStatement calls added before each statement in a block. The numbers are identifiers of a statement, created at compile-time. And then there's a mapping from these identifiers to objects containing information about statements, such as file and position (also created at compile-time).

When you run the code, injected logStatements will increase execution counters of their corresponding statements. The logBranch is almost the same, but has two counters (for true and false evaluation results).

After running the code in question, we have all counters there and we can analyze the results and report statements and branches that wasn't evaluated once in a nice HTML page:

Obligatory meme

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].