Skip to content

Commit 9c2c65a

Browse files
authored
Merge pull request #26 from intersystems/november-2023-review
Fix for 2023.1
2 parents 4565f01 + d4bbdc8 commit 9c2c65a

File tree

16 files changed

+35
-1490
lines changed

16 files changed

+35
-1490
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,15 @@ 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-
## [2.1.4] - Unreleased
8+
## [3.0.0] - 2023-12-01
9+
10+
### Changed
11+
- #25: As a consequence of this change, the minimum supported platform version is 2019.1.
912

1013
### Fixed
1114
- #18: EOL normalization in coverage.list
1215
- #19: Update CI to latest IRIS community (and corresponding test updates)
16+
- #25: Fix so the tool works on 2023.1
1317

1418
## [2.1.3] - 2022-03-30
1519
- Last released version before CHANGELOG existed.

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
[![Build Status](https://travis-ci.com/intersystems/TestCoverage.svg?branch=master)](https://travis-ci.com/intersystems/TestCoverage) [![codecov](https://codecov.io/gh/intersystems/TestCoverage/branch/master/graph/badge.svg)](https://codecov.io/gh/intersystems/TestCoverage)
1+
[![codecov](https://codecov.io/gh/intersystems/TestCoverage/branch/master/graph/badge.svg)](https://codecov.io/gh/intersystems/TestCoverage)
22
[![Quality Gate Status](https://community.objectscriptquality.com/api/project_badges/measure?project=intersystems_iris_community%2FTestCoverage&metric=alert_status)](https://community.objectscriptquality.com/dashboard?id=intersystems_iris_community%2FTestCoverage)
33

4-
# Unit Test Coverage for ObjectScript
4+
# Unit Test Coverage for InterSystems ObjectScript
55

66
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.
77

88
## Getting Started
99

10-
Note: a minimum platform version of Caché/Ensemble 2016.2 is required.
11-
This tool will also work on any version of InterSystems IRIS.
10+
Note: a minimum platform version of InterSystems IRIS® data platform 2019.1 is required.
1211

1312
### Installation: ZPM
1413

15-
If you already have the [ObjectScript Package Manager](https://openexchange.intersystems.com/package/ObjectScript-Package-Manager-2), installation is as easy as:
14+
If you already have the [InterSystems Package Manager](https://openexchange.intersystems.com/package/InterSystems-Package-Manager-1), installation is as easy as:
1615
```
1716
zpm "install testcoverage"
1817
```
@@ -63,7 +62,7 @@ zw ##class(TestCoverage.Utils).GrantSQLReadPermissions("_PUBLIC")
6362
## User Guide
6463

6564
### Running Tests with Coverage
66-
Generally speaking, set `^UnitTestRoot`, and then call `##class(TestCoverage.Manager).RunTest()` the same you would call `##class(%UnitTest.Manager).RunTest()`. For more information on InterSystems' %UnitTest framework, see the [tutorial](https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=TUNT) and/or the [class reference for %UnitTest.Manager](https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25UnitTest.Manager).
65+
Generally speaking, set `^UnitTestRoot`, and then call `##class(TestCoverage.Manager).RunTest()` the same you would call `##class(%UnitTest.Manager).RunTest()`. For more information on InterSystems' %UnitTest framework, see the [tutorial](https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=TUNT) and/or the [class reference for %UnitTest.Manager](https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25UnitTest.Manager).
6766

6867
The "userparam" argument can be used to pass information about code coverage data collection. For example:
6968

@@ -134,7 +133,7 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
134133

135134
## Authors
136135

137-
* **Tim Leavitt** - *Initial implementation* - [timleavitt](http://github.com/timleavitt)
136+
* **Tim Leavitt** - *Initial implementation* - [timleavitt](http://github.com/timleavitt) / [isc-tleavitt](http://github.com/isc-tleavitt)
138137

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

cls/TestCoverage/Data/Aggregate/ByCodeUnit.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Storage Default
5050
<IdLocation>^TestCoverage.Data.Agg.ByCUD</IdLocation>
5151
<IndexLocation>^TestCoverage.Data.Agg.ByCUI</IndexLocation>
5252
<StreamLocation>^TestCoverage.Data.Agg.ByCUS</StreamLocation>
53-
<Type>%Library.CacheStorage</Type>
53+
<Type>%Storage.Persistent</Type>
5454
}
5555

5656
}

cls/TestCoverage/Data/Aggregate/ByRun.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Storage Default
4343
<IdLocation>^TestCoverage.Data.Agg.ByRunD</IdLocation>
4444
<IndexLocation>^TestCoverage.Data.Agg.ByRunI</IndexLocation>
4545
<StreamLocation>^TestCoverage.Data.Agg.ByRunS</StreamLocation>
46-
<Type>%Library.CacheStorage</Type>
46+
<Type>%Storage.Persistent</Type>
4747
}
4848

4949
}

cls/TestCoverage/Data/CodeSubUnit.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Storage Default
3232
<IdLocation>^TestCoverage.Data.CodeUnitC("SubUnits")</IdLocation>
3333
<IndexLocation>^TestCoverage.Data.CodeSubUnitI</IndexLocation>
3434
<StreamLocation>^TestCoverage.Data.CodeSubUnitS</StreamLocation>
35-
<Type>%Library.CacheStorage</Type>
35+
<Type>%Storage.Persistent</Type>
3636
}
3737

3838
}

cls/TestCoverage/Data/CodeSubUnit/Method.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Storage Default
5656
</Value>
5757
</Data>
5858
<DefaultData>MethodDefaultData</DefaultData>
59-
<Type>%Library.CacheStorage</Type>
59+
<Type>%Storage.Persistent</Type>
6060
}
6161

6262
}

cls/TestCoverage/Data/CodeUnit.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Storage Default
488488
<IdLocation>^TestCoverage.Data.CodeUnitD</IdLocation>
489489
<IndexLocation>^TestCoverage.Data.CodeUnitI</IndexLocation>
490490
<StreamLocation>^TestCoverage.Data.CodeUnitS</StreamLocation>
491-
<Type>%Library.CacheStorage</Type>
491+
<Type>%Storage.Persistent</Type>
492492
}
493493

494494
}

cls/TestCoverage/Data/CodeUnitMap.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Storage Default
153153
<IdLocation>^TestCoverage.Data.CodeUnitMapD</IdLocation>
154154
<IndexLocation>^TestCoverage.Data.CodeUnitMapI</IndexLocation>
155155
<StreamLocation>^TestCoverage.Data.CodeUnitMapS</StreamLocation>
156-
<Type>%Library.CacheStorage</Type>
156+
<Type>%Storage.Persistent</Type>
157157
}
158158

159159
}

cls/TestCoverage/Data/Coverage.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ Storage Default
160160
</Data>
161161
<DataLocation>^TestCoverage.Data.CoverageD</DataLocation>
162162
<DefaultData>CoverageDefaultData</DefaultData>
163-
<Description></Description>
164163
<IdLocation>^TestCoverage.Data.CoverageD</IdLocation>
165164
<IndexLocation>^TestCoverage.Data.CoverageI</IndexLocation>
166165
<StreamLocation>^TestCoverage.Data.CoverageS</StreamLocation>
167-
<Type>%Library.CacheStorage</Type>
166+
<Type>%Storage.Persistent</Type>
168167
}
169168

170169
}
170+

cls/TestCoverage/Data/Run.cls

+3-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ ClassMethod MapRunCoverage(pRunIndex As %Integer) As %Status
132132
" AND oldMetric.element_key = map.ToLine "_
133133
"WHERE source.Run = ? "_
134134
" AND source.Ignore = 0"_
135-
" AND source.Calculated = 0"_
135+
" AND source.Calculated = 0 "_
136136
"GROUP BY target.ID,map.ToLine"
137137

138138
#dim tResult As %SQL.StatementResult
@@ -187,7 +187,8 @@ Storage Default
187187
<IdLocation>^TestCoverage.Data.RunD</IdLocation>
188188
<IndexLocation>^TestCoverage.Data.RunI</IndexLocation>
189189
<StreamLocation>^TestCoverage.Data.RunS</StreamLocation>
190-
<Type>%Library.CacheStorage</Type>
190+
<Type>%Storage.Persistent</Type>
191191
}
192192

193193
}
194+

cls/TestCoverage/Manager.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Include (%occErrors, %syPidtab, TestCoverage)
88
/// </example>
99
/// <br />
1010
/// For use in code based on a known (pre-loaded) unit test package, see documentation for <method>RunAllTests</method>. This also serves as a useful example for how to pass other related user parameters.
11-
Class TestCoverage.Manager Extends TestCoverage.ManagerBase
11+
Class TestCoverage.Manager Extends %UnitTest.Manager
1212
{
1313

1414
/// Level of detail at which test coverage is tracked.

0 commit comments

Comments
 (0)