



You can generate unit tests or code coverage by prefixing the rktracer keyword to your build command, or by enabling it in your IDE and rebuilding. The rktracer tool is easy to learn and use.Using rktracer gives you peace of mind since it supports all compilers, cross-compilers, IDEs, and embedded target devices.Even if existing applications or legacy code with or without unit testing, integration testing and functional testing. An automated unit tests generation and code coverage tool must be flexible enough to operate with existing build configurations to be effective. In your tsconfig.json file change rootDir parameter to. With this change you also need to change a couple of parameters in your tsconfig.json file and package.json file.

To fix this, move test folder out of src folder so they will be on the same level. The problem with tests code coverage arise from a simple fact that coverage is measured for src folder and tests code is there as well. That doesn’t seem right, so let’s fix it by some structural changes. It looks really nice, but you may noticed one small problem here that tests code was covered as well. You now can open index.html file there to see HTML-based report. Yay! All the information related to code coverage was saved to coverage folder in the root of your extension. Reports written to /Users/rpeshkov/Developer/vscode-extensions/vscode-testcov/coverage Create file coverconfig.json in the root of your project with the following content: Originally this code is taken from here, but I’ve made some changes to be compatible with strict mode.Īlso, you need to provide configuration for the Istanbul. Since we are not running in a tty environment, we just implementt he method staticallyįunction configure(mochaOpts: any) : void `) Linux: prevent a weird NPE when mocha on Linux requires the window size from the TTY * tslint:disable no-require-imports */ import * as fs from 'fs' Ĭonst remapIstanbul = require( 'remap-istanbul')
