Icon

03.Generating_​Unit_​Test_​Report - Solution

Generating Unit Test Report - Exercise (Solution)

In this exercise you'll learn how to execute testflows that correspond to different unit tests and concatenate their execution information into a report.

Session 1 - Preparing to Deploy a WorkflowExercise 03.Generating_Unit_Test_ReportIn this exercise you'll learn how to execute testflows that correspond to different unit tests and concatenate their execution informationinto a report. Prepare the PDF report. The status of the testflow is 0 in the case of success and 1 inthe case of failure. Let's add some colors to the report and replace these plain numberswith a red and a green square images respectively. Step 1. Get a list of unit tests togenerate a report from.1 - Drag List Files/Folders to this partof the workflow.2 - When configuring the node, set'Read' options as 'Relative to' and'Current workflow', 'Mode' as 'Files infolder', and 'Folder' as '../Unit_Tests/'.3 - Connect the output port of this nodeto the input port of the Table Row toVariable Loop Start node. Step 2. Execute the testflows and import their status and metadata. Here, we'll loop overthe list of unit tests executing them one by one and capturing their execution information.1 - Drag Call Workflow Service node to this part of the workflow and drop it between nodesTable Row to Variable Loop Start and Column Resorter.2 - Configure the Call Workflow Service node to read the first workflow in the ../Unit_Testfolder and click 'Adjust node ports'. Then go to the Flow Variables tab and set flow variable'calleeWorkflow > path' as 'Path'. This node will then execute the unit test associated to thefilename in variable 'Path', which changes as the loop iterates over the list of unit tests.3 - Connect the output port of the Call Workflow Service node to the input port of the ColumnResorter node. Execute the whole workflow and check the created PDF report in the locationdesignated in the Table to PDF node at the end of the workflow. Create thetestflow reportExecution dateCreate pathFilename + execution dateReplace plainexecution statuswith the colorRead status dictionarywith imagesBeautify forthe reportIterate overtestflow namesConcatenate resultsMake sure reportcolumns are alwaysin the same order Table to PDF Date&TimeConfiguration Create File/FolderVariables String Manipulation(Variable) Cell Replacer Table Reader Table Manipulator Table Row ToVariable Loop Start Loop End List Files/Folders Column Resorter Call WorkflowService Session 1 - Preparing to Deploy a WorkflowExercise 03.Generating_Unit_Test_ReportIn this exercise you'll learn how to execute testflows that correspond to different unit tests and concatenate their execution informationinto a report. Prepare the PDF report. The status of the testflow is 0 in the case of success and 1 inthe case of failure. Let's add some colors to the report and replace these plain numberswith a red and a green square images respectively. Step 1. Get a list of unit tests togenerate a report from.1 - Drag List Files/Folders to this partof the workflow.2 - When configuring the node, set'Read' options as 'Relative to' and'Current workflow', 'Mode' as 'Files infolder', and 'Folder' as '../Unit_Tests/'.3 - Connect the output port of this nodeto the input port of the Table Row toVariable Loop Start node. Step 2. Execute the testflows and import their status and metadata. Here, we'll loop overthe list of unit tests executing them one by one and capturing their execution information.1 - Drag Call Workflow Service node to this part of the workflow and drop it between nodesTable Row to Variable Loop Start and Column Resorter.2 - Configure the Call Workflow Service node to read the first workflow in the ../Unit_Testfolder and click 'Adjust node ports'. Then go to the Flow Variables tab and set flow variable'calleeWorkflow > path' as 'Path'. This node will then execute the unit test associated to thefilename in variable 'Path', which changes as the loop iterates over the list of unit tests.3 - Connect the output port of the Call Workflow Service node to the input port of the ColumnResorter node. Execute the whole workflow and check the created PDF report in the locationdesignated in the Table to PDF node at the end of the workflow. Create thetestflow reportExecution dateCreate pathFilename + execution dateReplace plainexecution statuswith the colorRead status dictionarywith imagesBeautify forthe reportIterate overtestflow namesConcatenate resultsMake sure reportcolumns are alwaysin the same order Table to PDF Date&TimeConfiguration Create File/FolderVariables String Manipulation(Variable) Cell Replacer Table Reader Table Manipulator Table Row ToVariable Loop Start Loop End List Files/Folders Column Resorter Call WorkflowService

Nodes

Extensions

Links