pyEDAA.Reports.CodeCoverage.UCIS.HistoryNodes

pyEDAA/Reports/CodeCoverage/UCIS/HistoryNodes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# ==================================================================================================================== #
#              _____ ____    _        _      ____                       _                                              #
#  _ __  _   _| ____|  _ \  / \      / \    |  _ \ ___ _ __   ___  _ __| |_ ___                                        #
# | '_ \| | | |  _| | | | |/ _ \    / _ \   | |_) / _ \ '_ \ / _ \| '__| __/ __|                                       #
# | |_) | |_| | |___| |_| / ___ \  / ___ \ _|  _ <  __/ |_) | (_) | |  | |_\__ \                                       #
# | .__/ \__, |_____|____/_/   \_\/_/   \_(_)_| \_\___| .__/ \___/|_|   \__|___/                                       #
# |_|    |___/                                        |_|                                                              #
# ==================================================================================================================== #
# Authors:                                                                                                             #
#   Patrick Lehmann                                                                                                    #
#                                                                                                                      #
# License:                                                                                                             #
# ==================================================================================================================== #
# Copyright 2026-2026 Electronic Design Automation Abstraction (EDA²)                                                  #
#                                                                                                                      #
# Licensed under the Apache License, Version 2.0 (the "License");                                                      #
# you may not use this file except in compliance with the License.                                                     #
# You may obtain a copy of the License at                                                                              #
#                                                                                                                      #
#   http://www.apache.org/licenses/LICENSE-2.0                                                                         #
#                                                                                                                      #
# Unless required by applicable law or agreed to in writing, software                                                  #
# distributed under the License is distributed on an "AS IS" BASIS,                                                    #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.                                             #
# See the License for the specific language governing permissions and                                                  #
# limitations under the License.                                                                                       #
#                                                                                                                      #
# SPDX-License-Identifier: Apache-2.0                                                                                  #
# ==================================================================================================================== #
#
"""
The history nodes of the UCIS XML interchange format: the tests, which measured the coverage, and the merges of their
coverage, with the tool, the date and how the test ran.
"""
from __future__                                import annotations

from datetime                                  import datetime
from decimal                                   import Decimal
from pathlib                                   import Path
from typing                                    import TYPE_CHECKING, Iterable, Optional as Nullable, Self

from lxml.etree                                import _Element
from pyTooling.Common                          import getFullyQualifiedName
from pyTooling.Decorators                      import export, readonly

from pyEDAA.Reports.CodeCoverage.UCIS.Elements import Base, UserAttribute

if TYPE_CHECKING:
	from pyEDAA.Reports.CodeCoverage.UCIS        import Report


@export
class HistoryNode(Base):
	"""
	A ``<historyNodes>`` of the report: a test, which measured coverage, or a merge of coverage, its tool, its date and -
	if the report says - how the test ran.

	A history node names the node it belongs to - e.g. the merge, which merged it - by the ID of that node.
	"""

	_parent:            Nullable[Report]     #: The report the history node belongs to.
	_historyNodeID:     int                  #: ID of the history node.
	_logicalName:       str                  #: Name of the history node, e.g. of the test.
	_testStatus:        bool                 #: Whether the test passed.
	_date:              datetime             #: When the test ran.
	_toolCategory:      str                  #: Kind of the tool, e.g. ``simulator``.
	_ucisVersion:       str                  #: Version of the UCIS, in which the tool measured the coverage.
	_vendorID:          str                  #: ID of the tool's vendor.
	_vendorTool:        str                  #: Name of the tool.
	_vendorToolVersion: str                  #: Version of the tool.
	_parentID:          Nullable[int]        #: ID of the history node this one belongs to.
	_physicalName:      Nullable[Path]       #: Path of the coverage database the history node wrote.
	_kind:              Nullable[str]        #: Kind of the history node, e.g. a test or a merge.
	_simulationTime:    Nullable[float]      #: How long the test ran, in simulated time.
	_timeUnit:          Nullable[str]        #: Unit of the simulated time.
	_runDirectory:      Nullable[Path]       #: The directory the test ran in.
	_cpuTime:           Nullable[float]      #: How long the test ran, in CPU time.
	_seed:              Nullable[str]        #: The seed of the test's random numbers.
	_command:           Nullable[str]        #: The command, which ran the test.
	_arguments:         Nullable[str]        #: The command line arguments of the test.
	_compulsory:        Nullable[str]        #: Whether the test must run.
	_userName:          Nullable[str]        #: Name of the user, who ran the test.
	_cost:              Nullable[Decimal]    #: Cost of the test.
	_sameTests:         Nullable[int]        #: ID of a test this one is equivalent to.
	_comment:           Nullable[str]        #: A comment.

	def __init__(
		self,
		historyNodeID: int,
		logicalName: str,
		testStatus: bool,
		date: datetime,
		toolCategory: str,
		ucisVersion: str,
		vendorID: str,
		vendorTool: str,
		vendorToolVersion: str,
		parentID: Nullable[int] = None,
		physicalName: Nullable[Path] = None,
		kind: Nullable[str] = None,
		simulationTime: Nullable[float] = None,
		timeUnit: Nullable[str] = None,
		runDirectory: Nullable[Path] = None,
		cpuTime: Nullable[float] = None,
		seed: Nullable[str] = None,
		command: Nullable[str] = None,
		arguments: Nullable[str] = None,
		compulsory: Nullable[str] = None,
		userName: Nullable[str] = None,
		cost: Nullable[Decimal] = None,
		sameTests: Nullable[int] = None,
		comment: Nullable[str] = None,
		userAttributes: Nullable[Iterable[UserAttribute]] = None,
		*,
		parent: Nullable[Report] = None
	) -> None:
		"""
		Initialize the history node, and add it to the history nodes of its report.

		:param historyNodeID:     ID of the history node.
		:param logicalName:       Name of the history node, e.g. of the test.
		:param testStatus:        Whether the test passed.
		:param date:              When the test ran.
		:param toolCategory:      Kind of the tool, e.g. ``simulator``.
		:param ucisVersion:       Version of the UCIS, in which the tool measured the coverage, e.g. ``1.0``.
		:param vendorID:          ID of the tool's vendor.
		:param vendorTool:        Name of the tool.
		:param vendorToolVersion: Version of the tool.
		:param parentID:          Optional, ID of the history node this one belongs to. Default: ``None``.
		:param physicalName:      Optional, path of the coverage database the history node wrote. Default: ``None``.
		:param kind:              Optional, kind of the history node, e.g. a test or a merge. Default: ``None``.
		:param simulationTime:    Optional, how long the test ran, in simulated time. Default: ``None``.
		:param timeUnit:          Optional, unit of the simulated time, e.g. ``ns``. Default: ``None``.
		:param runDirectory:      Optional, the directory the test ran in. Default: ``None``.
		:param cpuTime:           Optional, how long the test ran, in CPU time. Default: ``None``.
		:param seed:              Optional, the seed of the test's random numbers. Default: ``None``.
		:param command:           Optional, the command, which ran the test. Default: ``None``.
		:param arguments:         Optional, the command line arguments of the test. Default: ``None``.
		:param compulsory:        Optional, whether the test must run. Default: ``None``.
		:param userName:          Optional, name of the user, who ran the test. Default: ``None``.
		:param cost:              Optional, cost of the test. Default: ``None``.
		:param sameTests:         Optional, ID of a test this one is equivalent to. Default: ``None``.
		:param comment:           Optional, a comment. Default: ``None``.
		:param userAttributes:    Optional, the user-defined attributes. Default: ``None``.
		:param parent:            Optional, the report the history node belongs to; the history node is added to its
		                          history nodes. Default: ``None``.
		:raises TypeError:        If parameter ``userAttributes`` isn't iterable.
		:raises TypeError:        If parameter ``userAttributes`` contains an element not of type
		                          :class:`~pyEDAA.Reports.CodeCoverage.UCIS.Elements.UserAttribute`.
		:raises ValueError:       If parameter ``historyNodeID`` is ``None``.
		:raises TypeError:        If parameter ``historyNodeID`` isn't of type :class:`int`.
		:raises ValueError:       If parameter ``historyNodeID`` is negative.
		:raises ValueError:       If parameter ``testStatus`` is ``None``.
		:raises TypeError:        If parameter ``testStatus`` isn't of type :class:`bool`.
		:raises ValueError:       If parameter ``date`` is ``None``.
		:raises TypeError:        If parameter ``date`` isn't of type :class:`~datetime.datetime`.
		:raises ValueError:       If parameter ``logicalName``, ``toolCategory``, ``ucisVersion``, ``vendorID``,
		                          ``vendorTool`` or ``vendorToolVersion`` is ``None``.
		:raises TypeError:        If parameter ``logicalName``, ``toolCategory``, ``ucisVersion``, ``vendorID``,
		                          ``vendorTool`` or ``vendorToolVersion`` isn't of type :class:`str`.
		:raises TypeError:        If parameter ``parentID`` isn't of type :class:`int`.
		:raises ValueError:       If parameter ``parentID`` is negative.
		:raises TypeError:        If parameter ``sameTests`` isn't of type :class:`int`.
		:raises ValueError:       If parameter ``sameTests`` is negative.
		:raises TypeError:        If parameter ``physicalName`` isn't of type :class:`~pathlib.Path`.
		:raises TypeError:        If parameter ``runDirectory`` isn't of type :class:`~pathlib.Path`.
		:raises TypeError:        If parameter ``simulationTime`` isn't of type :class:`float`.
		:raises TypeError:        If parameter ``cpuTime`` isn't of type :class:`float`.
		:raises TypeError:        If parameter ``kind``, ``timeUnit``, ``seed``, ``command``, ``arguments``,
		                          ``compulsory``, ``userName`` or ``comment`` isn't of type :class:`str`.
		:raises TypeError:        If parameter ``cost`` isn't of type :class:`~decimal.Decimal`.
		:raises TypeError:        If parameter ``parent`` isn't of type :class:`~pyEDAA.Reports.CodeCoverage.UCIS.Report`.
		"""
		from pyEDAA.Reports.CodeCoverage.UCIS import Report

		super().__init__(userAttributes)

		if historyNodeID is None:
			raise ValueError("Parameter 'historyNodeID' is None.")
		elif not isinstance(historyNodeID, int) or isinstance(historyNodeID, bool):
			ex = TypeError("Parameter 'historyNodeID' is not of type 'int'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(historyNodeID)}'.")
			raise ex
		elif historyNodeID < 0:
			ex = ValueError("Parameter 'historyNodeID' is negative.")
			ex.add_note(f"Got value '{historyNodeID}'.")
			raise ex

		if testStatus is None:
			raise ValueError("Parameter 'testStatus' is None.")
		elif not isinstance(testStatus, bool):
			ex = TypeError("Parameter 'testStatus' is not of type 'bool'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(testStatus)}'.")
			raise ex

		if date is None:
			raise ValueError("Parameter 'date' is None.")
		elif not isinstance(date, datetime):
			ex = TypeError("Parameter 'date' is not of type 'datetime'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(date)}'.")
			raise ex

		for name, value in (
			("logicalName",       logicalName),
			("toolCategory",      toolCategory),
			("ucisVersion",       ucisVersion),
			("vendorID",          vendorID),
			("vendorTool",        vendorTool),
			("vendorToolVersion", vendorToolVersion)
		):
			if value is None:
				raise ValueError(f"Parameter '{name}' is None.")
			elif not isinstance(value, str):
				ex = TypeError(f"Parameter '{name}' is not of type 'str'.")
				ex.add_note(f"Got type '{getFullyQualifiedName(value)}'.")
				raise ex

		if parentID is not None:
			if not isinstance(parentID, int) or isinstance(parentID, bool):
				ex = TypeError("Parameter 'parentID' is not of type 'int'.")
				ex.add_note(f"Got type '{getFullyQualifiedName(parentID)}'.")
				raise ex
			elif parentID < 0:
				ex = ValueError("Parameter 'parentID' is negative.")
				ex.add_note(f"Got value '{parentID}'.")
				raise ex

		if sameTests is not None:
			if not isinstance(sameTests, int) or isinstance(sameTests, bool):
				ex = TypeError("Parameter 'sameTests' is not of type 'int'.")
				ex.add_note(f"Got type '{getFullyQualifiedName(sameTests)}'.")
				raise ex
			elif sameTests < 0:
				ex = ValueError("Parameter 'sameTests' is negative.")
				ex.add_note(f"Got value '{sameTests}'.")
				raise ex

		if physicalName is not None and not isinstance(physicalName, Path):
			ex = TypeError("Parameter 'physicalName' is not of type 'Path'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(physicalName)}'.")
			raise ex

		if runDirectory is not None and not isinstance(runDirectory, Path):
			ex = TypeError("Parameter 'runDirectory' is not of type 'Path'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(runDirectory)}'.")
			raise ex

		if simulationTime is not None and not isinstance(simulationTime, float):
			ex = TypeError("Parameter 'simulationTime' is not of type 'float'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(simulationTime)}'.")
			raise ex

		if cpuTime is not None and not isinstance(cpuTime, float):
			ex = TypeError("Parameter 'cpuTime' is not of type 'float'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(cpuTime)}'.")
			raise ex

		for name, value in (
			("kind",       kind),
			("timeUnit",   timeUnit),
			("seed",       seed),
			("command",    command),
			("arguments",  arguments),
			("compulsory", compulsory),
			("userName",   userName),
			("comment",    comment)
		):
			if value is not None and not isinstance(value, str):
				ex = TypeError(f"Parameter '{name}' is not of type 'str'.")
				ex.add_note(f"Got type '{getFullyQualifiedName(value)}'.")
				raise ex

		if cost is not None and not isinstance(cost, Decimal):
			ex = TypeError("Parameter 'cost' is not of type 'Decimal'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(cost)}'.")
			raise ex

		if parent is not None and not isinstance(parent, Report):
			ex = TypeError("Parameter 'parent' is not of type 'Report'.")
			ex.add_note(f"Got type '{getFullyQualifiedName(parent)}'.")
			raise ex

		self._parent =            parent
		self._historyNodeID =     historyNodeID
		self._logicalName =       logicalName
		self._testStatus =        testStatus
		self._date =              date
		self._toolCategory =      toolCategory
		self._ucisVersion =       ucisVersion
		self._vendorID =          vendorID
		self._vendorTool =        vendorTool
		self._vendorToolVersion = vendorToolVersion
		self._parentID =          parentID
		self._physicalName =      physicalName
		self._kind =              kind
		self._simulationTime =    simulationTime
		self._timeUnit =          timeUnit
		self._runDirectory =      runDirectory
		self._cpuTime =           cpuTime
		self._seed =              seed
		self._command =           command
		self._arguments =         arguments
		self._compulsory =        compulsory
		self._userName =          userName
		self._cost =              cost
		self._sameTests =         sameTests
		self._comment =           comment

		if parent is not None:
			parent._historyNodes[historyNodeID] = self

	@classmethod
	def Parse(cls, element: _Element, *, parent: Nullable[Report] = None) -> Self:
		"""
		Parse a history node from its ``<historyNodes>`` element.

		:param element:            The ``<historyNodes>`` element.
		:param parent:             Optional, the report the history node belongs to. Default: ``None``.
		:returns:                  The history node.
		:raises CodeCoverageError: If a user-defined attribute's value isn't of the type the attribute states.
		"""
		attributes =     element.attrib
		parentID =       attributes.get("parentId")
		physicalName =   attributes.get("physicalName")
		simulationTime = attributes.get("simtime")
		runDirectory =   attributes.get("runCwd")
		cpuTime =        attributes.get("cpuTime")
		cost =           attributes.get("cost")
		sameTests =      attributes.get("sameTests")

		return cls(
			int(attributes["historyNodeId"]),
			attributes["logicalName"],
			cls._ParseBoolean(attributes["testStatus"]),
			datetime.fromisoformat(attributes["date"]),
			attributes["toolCategory"],
			attributes["ucisVersion"],
			attributes["vendorId"],
			attributes["vendorTool"],
			attributes["vendorToolVersion"],
			None if parentID is None else int(parentID),
			None if physicalName is None else Path(physicalName),
			attributes.get("kind"),
			None if simulationTime is None else float(simulationTime),
			attributes.get("timeunit"),
			None if runDirectory is None else Path(runDirectory),
			None if cpuTime is None else float(cpuTime),
			attributes.get("seed"),
			attributes.get("cmd"),
			attributes.get("args"),
			attributes.get("compulsory"),
			attributes.get("userName"),
			None if cost is None else Decimal(cost),
			None if sameTests is None else int(sameTests),
			attributes.get("comment"),
			cls._ParseUserAttributes(element),
			parent=parent
		)

	@readonly
	def Parent(self) -> Nullable[Report]:
		"""
		Read-only property to access the report the history node belongs to (:attr:`_parent`).

		:returns: The report; ``None``, if the history node belongs to none.
		"""
		return self._parent

	@readonly
	def HistoryNodeID(self) -> int:
		"""
		Read-only property to access the ID of the history node (:attr:`_historyNodeID`).

		:returns: The ID, by which bins name the tests, which covered them.
		"""
		return self._historyNodeID

	@readonly
	def LogicalName(self) -> str:
		"""
		Read-only property to access the name of the history node (:attr:`_logicalName`).

		:returns: The name, e.g. of the test.
		"""
		return self._logicalName

	@readonly
	def TestStatus(self) -> bool:
		"""
		Read-only property to access whether the test passed (:attr:`_testStatus`).

		:returns: ``True``, if the test passed.
		"""
		return self._testStatus

	@readonly
	def Date(self) -> datetime:
		"""
		Read-only property to access when the test ran (:attr:`_date`).

		:returns: The date and time.
		"""
		return self._date

	@readonly
	def ToolCategory(self) -> str:
		"""
		Read-only property to access the kind of the tool (:attr:`_toolCategory`).

		:returns: The kind, as stated.
		"""
		return self._toolCategory

	@readonly
	def UCISVersion(self) -> str:
		"""
		Read-only property to access the UCIS version, in which the tool measured the coverage (:attr:`_ucisVersion`).

		:returns: The version, as stated.
		"""
		return self._ucisVersion

	@readonly
	def VendorID(self) -> str:
		"""
		Read-only property to access the ID of the tool's vendor (:attr:`_vendorID`).

		:returns: The ID, as stated.
		"""
		return self._vendorID

	@readonly
	def VendorTool(self) -> str:
		"""
		Read-only property to access the name of the tool (:attr:`_vendorTool`).

		:returns: The name, as stated.
		"""
		return self._vendorTool

	@readonly
	def VendorToolVersion(self) -> str:
		"""
		Read-only property to access the version of the tool (:attr:`_vendorToolVersion`).

		:returns: The version, as stated.
		"""
		return self._vendorToolVersion

	@readonly
	def ParentID(self) -> Nullable[int]:
		"""
		Read-only property to access the ID of the history node this one belongs to (:attr:`_parentID`).

		:returns: The ID, e.g. of the merge, which merged this one; ``None``, if the report states none.
		"""
		return self._parentID

	@readonly
	def PhysicalName(self) -> Nullable[Path]:
		"""
		Read-only property to access the path of the coverage database the history node wrote (:attr:`_physicalName`).

		:returns: The path, as stated; ``None``, if the report states none.
		"""
		return self._physicalName

	@readonly
	def Kind(self) -> Nullable[str]:
		"""
		Read-only property to access the kind of the history node (:attr:`_kind`).

		:returns: The kind, as stated; ``None``, if the report states none.
		"""
		return self._kind

	@readonly
	def SimulationTime(self) -> Nullable[float]:
		"""
		Read-only property to access how long the test ran in simulated time (:attr:`_simulationTime`).

		:returns: The time, in :attr:`TimeUnit`; ``None``, if the report states none.
		"""
		return self._simulationTime

	@readonly
	def TimeUnit(self) -> Nullable[str]:
		"""
		Read-only property to access the unit of the simulated time (:attr:`_timeUnit`).

		:returns: The unit, e.g. ``ns``; ``None``, if the report states none.
		"""
		return self._timeUnit

	@readonly
	def RunDirectory(self) -> Nullable[Path]:
		"""
		Read-only property to access the directory the test ran in (:attr:`_runDirectory`).

		It is a path on the machine the coverage was measured on, so it may not exist where the report is read.

		:returns: The directory; ``None``, if the report states none.
		"""
		return self._runDirectory

	@readonly
	def CPUTime(self) -> Nullable[float]:
		"""
		Read-only property to access how long the test ran in CPU time (:attr:`_cpuTime`).

		:returns: The time; ``None``, if the report states none.
		"""
		return self._cpuTime

	@readonly
	def Seed(self) -> Nullable[str]:
		"""
		Read-only property to access the seed of the test's random numbers (:attr:`_seed`).

		:returns: The seed; ``None``, if the report states none.
		"""
		return self._seed

	@readonly
	def Command(self) -> Nullable[str]:
		"""
		Read-only property to access the command, which ran the test (:attr:`_command`).

		:returns: The command; ``None``, if the report states none.
		"""
		return self._command

	@readonly
	def Arguments(self) -> Nullable[str]:
		"""
		Read-only property to access the command line arguments of the test (:attr:`_arguments`).

		:returns: The arguments; ``None``, if the report states none.
		"""
		return self._arguments

	@readonly
	def Compulsory(self) -> Nullable[str]:
		"""
		Read-only property to access whether the test must run (:attr:`_compulsory`).

		:returns: The value, as stated; ``None``, if the report states none.
		"""
		return self._compulsory

	@readonly
	def UserName(self) -> Nullable[str]:
		"""
		Read-only property to access the name of the user, who ran the test (:attr:`_userName`).

		:returns: The name; ``None``, if the report states none.
		"""
		return self._userName

	@readonly
	def Cost(self) -> Nullable[Decimal]:
		"""
		Read-only property to access the cost of the test (:attr:`_cost`).

		:returns: The cost; ``None``, if the report states none.
		"""
		return self._cost

	@readonly
	def SameTests(self) -> Nullable[int]:
		"""
		Read-only property to access the ID of a test this one is equivalent to (:attr:`_sameTests`).

		:returns: The ID; ``None``, if the report states none.
		"""
		return self._sameTests

	@readonly
	def Comment(self) -> Nullable[str]:
		"""
		Read-only property to access the comment (:attr:`_comment`).

		:returns: The comment; ``None``, if the report states none.
		"""
		return self._comment