Skip to content

Commit 7d47b3e

Browse files
committed
doc: various updates
Fixes #43 Fixes #20 Partially addresses #28 by adding doc on how to run via IPM - there's still more we could do to make the support more automatic but that'll be left as a future enhancement.
1 parent f7ccc52 commit 7d47b3e

File tree

3 files changed

+36
-17
lines changed

3 files changed

+36
-17
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [3.2.0] - Unreleased
8+
## [4.0.0] - 2024-08-01
9+
10+
### Changed
11+
- #42: As a consequence of this change, the minimum supported platform version is 2022.1
912

1013
### Added
1114
- #29: Track code coverage for embedded python methods in .cls files

README.md

+31-15
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@ Run your typical ObjectScript %UnitTest tests and see which lines of your code a
77

88
## Getting Started
99

10-
Note: a minimum platform version of InterSystems IRIS® data platform 2019.1 is required.
10+
A minimum platform version of InterSystems IRIS® data platform 2022.1 is required to run the latest version of TestCoverage.
1111

12-
### Installation: ZPM
12+
| InterSystems Platform Version | Compatible TestCoverage Version |
13+
|-------------------------------|----------------------------------------------------------------------------------------------------|
14+
| IRIS >=2022.1 | 4.x |
15+
| IRIS <2022.1 | 3.x |
16+
| Caché / Ensemble | 2.x (via artifacts available in [Releases](https://github.com/intersystems/TestCoverage/releases))|
17+
18+
### Installation: IPM
1319

1420
If you already have the [InterSystems Package Manager](https://openexchange.intersystems.com/package/InterSystems-Package-Manager-1), installation is as easy as:
1521
```
@@ -33,19 +39,6 @@ Set root = "<path on filesystem to which repository was cloned/downloaded>"
3339
Do $System.OBJ.ImportDir(root,"*.inc;*.cls","ck",,1)
3440
```
3541

36-
### Installation: from Atelier
37-
38-
Note: this assumes you have the Git plugin for Atelier installed.
39-
40-
1. Right-click in the Atelier Explorer and select Import...
41-
2. Select the "Projects from Git" wizard under the "Git" folder, then click "Next"
42-
3. In the "Select Repository Source" dialog, select "Clone URI" and enter this repository's URI, then click "Next"
43-
4. Select the branch(es) you intend to build from, then click "Next"
44-
5. Select a local destination in which to store the code, then click "Next"
45-
6. Choose "import existing Eclipse projects" and select the TestCoverage project, then click "Next"
46-
7. Configure a connection for the project
47-
8. Synchronize the project with your selected namespace
48-
4942
### Security
5043
Note that, depending on your security settings, SQL privileges may be required for access to test coverage data. The relevant permissions may be granted by running:
5144

@@ -104,6 +97,28 @@ Where:
10497
* `tPIDList` (optional) has a $ListBuild list of process IDs to monitor. If this is empty, all processes are monitored. If this is $ListBuild("Interop") or "Interoperability", all interoperability processes and the current process are monitored. By default, only the current process is monitored.
10598
* `tTiming` (optional) is 1 to capture execution time data for monitored classes/routines as well, or 0 (the default) to not capture this data.
10699

100+
### Running Tests with Coverage via IPM
101+
102+
Running unit tests with test coverage measurement via IPM is much simpler. Given a package `mycompany.foo`, a coverage.list file within its [unit test resource(s)](https://github.com/intersystems/ipm/wiki/03.-IPM-Manifest-(Module.xml)#unittest-or-test), and TestCoverage installed, tests can be run with coverage with:
103+
104+
```
105+
zpm "mycompany.foo test -only -DUnitTest.ManagerClass=TestCoverage.Manager"
106+
```
107+
108+
Additional "userparam" keys can be passed in the zpm command prefixed with `-DUnitTest.UserParam.` - for example:
109+
110+
```
111+
zpm "mycompany.foo test -only "_
112+
"-verbose -DUnitTest.ManagerClass=TestCoverage.Manager -DUnitTest.JUnitOutput=/test-reports/junit.xml "_
113+
"-DUnitTest.FailuresAreFatal=1 -DUnitTest.Manager=TestCoverage.Manager "_
114+
"-DUnitTest.UserParam.CoverageReportClass=TestCoverage.Report.Cobertura.ReportGenerator "_
115+
"-DUnitTest.UserParam.CoverageReportFile=/source/coverage.xml"
116+
```
117+
118+
Note that it is best practice to put your unit tests in a separate directory from your source code, most commonly `/tests`.
119+
120+
For more details and examples, see [this InterSystems Developer Community article series](https://community.intersystems.com/post/unit-tests-and-test-coverage-intersystems-package-manager).
121+
107122
### Viewing Results
108123
After running the tests, a URL is shown in the output at which you can view test coverage results. If the hostname/IP address in this URL is incorrect, you can fix it by changing the "WebServerName" setting in the management portal, at System Administration > Configuration > Additional Settings > Startup.
109124

@@ -134,6 +149,7 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
134149
## Authors
135150

136151
* **Tim Leavitt** - *Initial implementation* - [timleavitt](http://github.com/timleavitt) / [isc-tleavitt](http://github.com/isc-tleavitt)
152+
* **Chris Ge** - Embedded Python support and other improvements - [isc-cge](http://github.com/isc-cge)
137153

138154
See also the list of [contributors](https://github.com/intersystems/TestCoverage/contributors) who participated in this project.
139155

module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Export generator="Cache" version="25">
33
<Document name="TestCoverage.ZPM"><Module>
44
<Name>TestCoverage</Name>
5-
<Version>3.2.0</Version>
5+
<Version>4.0.0</Version>
66
<Description>Run your typical ObjectScript %UnitTest tests and see which lines of your code are executed. Includes Cobertura-style reporting for use in continuous integration tools.</Description>
77
<Packaging>module</Packaging>
88
<Resource Name="TestCoverage.PKG" Directory="cls" />

0 commit comments

Comments
 (0)