BullseyeCoverage

From Omnia
Revision as of 21:06, 21 May 2018 by Kenneth (talk | contribs) (→‎License Manager)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

BullseyeCoverage

Bullseye Code Coverage

Download

http://www.bullseye.com/cgi-bin/download.sh

Floating License

Floating License - http://www.bullseye.com/license.html

“BullseyeCoverage is sold under a floating license. The product may be used by any number of users, limited to the maximum number of users specified by the license at any one time. A license is in use when you run an executable in the BullseyeCoverage product distribution. Running a test program measured by BullseyeCoverage does not use a license. Each platform (Windows, Linux x86, etc) is licensed separately; licenses do not float between platforms.”

License Manager

Using the License Manager - http://www.bullseye.com/help/licenseManager.html

The license manager is optional. It is provided for organizations that have a strict policy that the number of simultaneous users never exceed the number of users specified by your license, or where estimating the number of simultaneous users is not feasible. If your network file system is not completely reliable or performs slowly, using the license manager may impede usage of the product. Therefore, you may manage license utilization based on an estimate of the number of simultaneous users, rather than using the license manager.

The license manager limits the number of simultaneous users to the number allowed by your license. After the license manager grants all available user licenses, subsequent requesters wait until a license is released. The license manager consumes one user license for the duration of each BullseyeCoverage program. The license manager does not apply to executables instrumented with BullseyeCoverage, only to the programs that ship with BullseyeCoverage. The license manager does not apply to compiler interceptors when coverage build is disabled. In all other cases, BullseyeCoverage programs acquire a license when they start and release the license when they terminate, regardless of whether coverage build is enabled. Note that the Coverage Browser consumes a license even if it is idle. However, if all licenses are busy, cov01 and covlmgr proceed without acquiring a license. This exception allows you to disable coverage build and to monitor the license manager, even when all licenses are busy.

If a BullseyeCoverage program holding a license is killed and therefore does not release the license, that license remains unavailable for 10 minutes, after which it is automatically released.

You can use the license manager with an evaluation license. The license manager cannot be used with an unlimited license.

Status of licenses:

covlmgr --status

Change license manager:

covlmgr --use -f //shareserver/shared/path/LicenseManager

Add license key:

covlmgr --add [key]

Usage

To measure coverage of a project:

  1. Enable Coverage Build
    1. from within the Coverage Browser, or
    2. from the Microsoft Visual Studio menu "Tools", or
    3. with the cov01 command
  2. Rebuild and run the project
  3. Run the Coverage Browser

From command line...

Start Coverage:

cov01 --on

Get Status:

cov01 --status

Build:

...

Stop Coverage:

cov01 --off

Windows

Use simple UNC license file manager with something like \\fileserver\files\Bullseye\manager for convenience

Linux

./install --prefix /opt/BullseyeCoverage --key [LICENSE_KEY]

or just ./install and follow the prompts

Add /opt/BullseyeCoverage/bin to PATH variable

/opt/BullseyeCoverage/bin/cov01
export COVFILE=`pwd`/test.cov
cov01 -1

View results in CoverageBrowser or with covhtml

covhtml `pwd`/test.cov

Linux License Manager

Linux License Manager - http://www.bullseye.com/help/licenseManager.html

To install with license manager:

./install --use /server/BullseyeCoverageLicenseManager

See license status:

covlmgr --status
# covlmgr --status
BullseyeCoverage License Manager Administration 8.13.45 Linux-x64
Copyright (c) Bullseye Testing Technology 1990-2018
License file: /shared/Bullseye/LicenseManager/BullseyeCoverageLicenseManager
Version: 6
Holding: kenneth@kwin(Windows), root@klinux(Linux x64)
Total wait minutes: 0
Peak users waiting: 0
User log: root@klinux, kenneth@kwin
Licenses:
License 40XXX
Valid for Windows: 4 users, Linux x64: 6 users, Total: 10 users
Maintenance expired 2018-02-15. License is perpetual

License used by Compiler Injectors, Coverage Browser, etc.

Linux Quick Test

test.c:

  int main() {
    return 0;
  }
export PATH=/opt/BullseyeCoverage/bin:$PATH
export COVFILE=/tmp/test.cov
cov01 --on
gcc test.c -o test
cov01 --off

check if the /tmp/test.cov there?

Run test and update Bullseye table:

./test

Check Coverage Browser

cd /opt/BullseyeCoverage/bin
./CoverageBrowser

to HTML

# Export coverage measurements as HTML
# covhtml [dir]
covhtml /tmp/output/

HTML Converter

Bullseye HTML converter so that the coverage report can be converted to HTML and browse by testers who does not have Bullseye installed in their machine. It allow testers to analyze the code coverage and create corner cases test cases.

GitHub - simplivity/bullshtml: Bullseye HTML Coverage Report Generator - https://github.com/simplivity/bullshtml

to XML

export COVFILE=/tmp/test.cov
# Export coverage measurements as XML
covxml

Merge

Merge results from same coverage file run under different systems or environments.

covmerge [input.cov] [cov1.cov] [cov2.cov...]

input.cov will be updated with results

Clear Measurements

export COVFILE=/tmp/test.cov
covclear

Report Coverage

export COVFILE=/tmp/test.cov
# Summarize measurements by directory
covdir
# Summarize measurements by function
covfn
# Summarize measurements by source file
covsrc
# Show low-level coverage measurements with annotated source code
covbr

keywords