# How do we wait until Pabot generates report before using them?

**URL:** https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902
**Category:** Pabot
**Created:** [9 October 2024 01:44 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902 "2024-10-09T01:44:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yadubhushan](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@yadubhushan](https://forum.robotframework.org/u/yadubhushan)
#### Post date: [9 October 2024 01:44 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902/1 "2024-10-09T01:44:45Z")

</div>

Our requirement is to move test execution reports to some other file system once they are ready. We were using listener V3 ‘close’ function to move the reports when we are executing them in sequential mode. However, the same would not work when we use Pabot for parallel execution since the reports are not ready by time close function complete its execution. I have tried with the keyword ‘Run Teardown only once’ which did not work. Do we have any keyword or function that waits until reports are fully generated so that I could use and wait for them to be generated? Could someone assist on this? Thanks

---

<div class="post-metadata">

### Author: ![Anne165Hernadez](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Anne165Hernadez](https://forum.robotframework.org/u/Anne165Hernadez)
#### Post date: [9 October 2024 10:28 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902/2 "2024-10-09T10:28:27Z")

</div>

> [@yadubhushan](#):
>
> Our requirement is to move test execution reports to some other file system once they are ready. We were using listener V3 ‘close’ function to move the reports when we are executing them in sequential mode. However, the same would not work when we use Pabot for parallel execution since the reports are not ready by time close function complete its execution. I have tried with the keyword ‘Run Teardown only once’ which did not work. Do we have any keyword or function that waits until reports are fully generated so that I could use and wait for them to be generated? Could someone assist on this? Thanks

Hello!  
To handle parallel execution with Pabot and ensure test execution reports are moved only when fully generated, you can use the Run On Last Process keyword. This keyword waits until all other parallel processes have stopped executing before running the specified keyword. Here’s how you can use it:

robot

\*\*\* Test Cases \*\*\*  
Move Reports  
Run On Last Process Move Execution Reports  
In this example, Move Execution Reports will only be executed once all parallel processes have completed, ensuring that the reports are fully generated before moving them.

---

<div class="post-metadata">

### Author: ![burr](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@burr](https://forum.robotframework.org/u/burr)
#### Post date: [9 October 2024 12:39 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902/3 "2024-10-09T12:39:40Z")

</div>

**As far as I know,** Pabot combines all the partial reports (using Rebot) after all the Robot processes finish. I don’t know if you can get Pabot to pass on instructions to its Rebot merge call…

If it is any help, we used a script to run Pabot, which would then use Rebot (again) to do some post-processing on the final results (adding meta-data, shrinking Selenium debug logs, etc) Then if it was running in Azure, Azure took care of moving and packaging the test results.

---

<div class="post-metadata">

### Author: ![burr](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@burr](https://forum.robotframework.org/u/burr)
#### Post date: [9 October 2024 12:42 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902/4 "2024-10-09T12:42:40Z")

</div>

P.S. I think the preferred approach now is to use a Python “script” to manage running Pabot, Rebot, etc. but it is the same idea.

---

<div class="post-metadata">

### Author: ![CharlieScene](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/charliescene/32/3484_2.png) [@CharlieScene](https://forum.robotframework.org/u/CharlieScene)
#### Post date: [9 October 2024 17:40 UTC](https://forum.robotframework.org/t/how-do-we-wait-until-pabot-generates-report-before-using-them/7902/5 "2024-10-09T17:40:39Z")

</div>

Hi,

A solution could be to implement a kind of function to verify if the report is ready.

- If report means “xml”, you can use Parse XML keyword from XML library and verify if parsing can be done or not, and retry with arguments (sleep and retry count).  
Here’s a py example, but you can do it in robot:

- If you need to wait for .html files also, there you could use _Get File Size_ or _Get Modified Time_ and iterate until value doesn’t change with a tolerance.

Regards.  
Charlie
