Boehringer-Ingelheim / toscaci

tosca command line tool and service that simplify tosca integration with Continuous Integration tools
Apache License 2.0
10 stars 7 forks source link

Generated ToscaIntegration.pdf report is inconsistently filled /from empty to full .. #51

Closed clemensutschig closed 2 years ago

clemensutschig commented 2 years ago

When running large scale tests - we see the tosca integration report to be inconsistent.. Sometimes empty, sometimes full, sometimes with only one or two test results in ..

[0] 6:53:29 PM: [ToscaIntegrationReport]
A general error occurred during printing. Check the project file and the data source.
[3] 6:53:29 PM: Task 'Print Report ... ToscaIntegrationReport' finished
[3] 6:53:29 PM: Closing Workspace
[3] 6:53:29 PM: Closing Workspace!
[3] 6:53:29 PM: Log closed!

There is a couple of thoughts whats going on:

Solution improvement ideas:

  1. Idea#1 In general, you don’t have to open the workspace every time you use it like you do here: [https://github.com/Boehringer-Ingelheim/toscaci/blob/6239ea8fd4ea92303202217c428a871aade2fdbf/server/CIService/Helper/ExecutionHelper.cs#L131-L150] are printed, you can close the workspace on the machine. Opening and closing the workspace and the whole WorkspaceSession concept only makes sense if multiple requests are coming in for the same workspace in parallel (like in the case of the REST API). In the CIService, the workspace is only being used by a single thread, so no need for the session logic.

  2. Idea#2 Possible small bug in the WorkspaceSession code, the following 2 lines need to be placed in curly braces if they both apply to the IF statement. Otherwise, C# just takes the first line after the IF statement.

[https://github.com/Boehringer-Ingelheim/toscaci/blob/6239ea8fd4ea92303202217c428a871aade2fdbf/server/CIService/Tosca/WorkspaceSession.cs#L75-L77]

  1. Idea#3 Also, since Tosca 14.2, the ImportAutomationObjectResultsToExecutionLogTask is available in the Product. So this task can be removed from the custom solution and we can use the Product one “Tricentis.Automation.TCAddIns.ExecutionAddIn.Tasks. ImportAutomationObjectResultsToExecutionLog”. For the sessionId, you can send in the executionTracking.id.
clemensutschig commented 2 years ago

maybe tosca tasks execute "async'ly" ... https://github.com/Boehringer-Ingelheim/toscaci/blob/main/server/CIService/Helper/ExecutionHelper.cs#L220

clemensutschig commented 2 years ago

quick update - looks like we have found it ... aside from now using std APIs from the product - compiling it for 64bits helped a LOT

albertpuente commented 2 years ago

Closing this issue since it does not seem to be related to the implementation of toscaci anymore, but to the execution environment and it's (virtual) screen setup/session.