Hello,
"Have you made further changes to TestCoverage.Manager"
No, only that if-clause which checks if Coverage related flags are set.
I am not that familiar with the Mocking Framework yet to know if the unit test manager causes any issues. I thought that setting -DUnitTest.ManagerClass=TestCoverage.Manager overrides the unit test manager. I verified that by adding some debug logging to the TestCoverage.Manager class.
At the moment, my solution works as expected. If you manage to find any clues why it does not work, I am very interested to know.
By the way, where exactly are the arguments CoverageReportClass and CoverageReportFile checked? I didn't find any trace of them in the source code.
I tried to read through the source code to get an idea what triggers the report generation. Didn't find any clues, so I ended up tweaking the Manager.cls source code a bit. I modified OnAfterSaveResult() method where I check if the user has defined the CoverageReportClass and CoverageReportFile parameters and trigger the report generation if defined.
#; Generate coverage reports if needed
If (..UserFields.GetAt("CoverageReportClass") '= "") && (..UserFields.GetAt("CoverageReportFile") '= "") {
Set coverageReportClass = ..UserFields.GetAt("CoverageReportClass")
Set coverageReportFile = ..UserFields.GetAt("CoverageReportFile")
Set tSC = $ClassMethod(coverageReportClass, "GenerateReport", tRunIndex, coverageReportFile)
}
That seems to work and solves my problem. If anyone has a better solution to the problem feel free to comment. For now I will stick with this.
Cheers,
Kari
Hi,
I was struggling with the same thing but managed to find a way to input the username and password unattended as a part of a CI/CD pipeline.
I use that to check if access to terminal is OK.
You can also run a script file after login by replacing the last echo with cat <script_ file>. For example:
PS: It would be nice if iris session could accept a username and password via a command-line argument, so we don't have to resort to using these hacky methods.
Br. Kari