stable
Clone or download
Until now the content of the test executions was retrieved twice to build the document: once for the traceability matrix and once for the artifacts section. This contribution memoizes the call made to the REST API when retrieving the test executions in order to avoid that. The memoization is done by generating a cache key from the parameters. It would be better to have a "tiered" approach to transform (A0, A1, ...An) => R into something like memoize(A0, => memoize(A1 => ...memoize(An => R))). It is however a bit more complex and the current approach is good enough for our current needs (it is not possible to have a cache key conflict). The traceability is now added without adding a specific flag into the URL. Part of story #23461: have a tracability matrix in my exported document (test executions) Change-Id: Id503ef4cd9cc757e0d8829aea53ad267de58a1b4
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/artifacts-retriever.test.ts | +3 | −4 | Go to diff View file |
M | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/artifacts-retriever.ts | +20 | −13 | Go to diff View file |
M | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/create-export-document.ts | +8 | −2 | Go to diff View file |
M | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/create-traceability-matrix.test.ts | +261 | −247 | Go to diff View file |
M | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/create-traceability-matrix.ts | +12 | −12 | Go to diff View file |
A | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/memoize.test.ts | +53 | −0 | Go to diff View file |
A | plugins/document_generation/scripts/tracker-report-action/src/DocumentBuilder/memoize.ts | +46 | −0 | Go to diff View file |