bjc v1.0.19
bjc
Description
bjc is an OpenHarmony ets instrument tool.
Installation
npm install bjc
Build
Install dependencies
npm i
Build & Pack
npm run build
npm pack
Instructions
1. Usage
Usage: bjc [options] [command]
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
report <input> [output] parse coverage data to generate report.
instrument <input> [output]
install <sdk_home>
help [command] display help for command
2. Using in command-line-tools
Download command-line-tools
Command Line Tools for HarmonyOS NEXT Developer Beta1(5.0.3.404)install bjc to the sdk
bjc install ${command-line-tools}/sdk
- hvigor build Hap & instrument coverage
hvigorw -p buildMode=debug -p coverage-mode=full -p debugLine=true clean assembleHap
3. Coverage file storage location
/data/app/el2/100/base/${bundleName}/haps/{entryModuleName}/cache/bjc_cov_xxx.json
4. Instrument ignore feature
ignore file
Add a comment to the source file // instrument ignore file
or /* instrument ignore file */
. after adding the comment, the file will no longer be instrumented, and the coverage report will not have the file.
ignore next
Add // instrument ignore next
or /* instrument ignore next */
in front of the code block.
ignore if
Add // instrument ignore if
or /* instrument ignore if */
in front of the conditional expression to ignore if branch.
ignore else
Add // instrument ignore else
or /* instrument ignore else */
in front of the conditional expression to ignore else branch.
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago