# Transferring output data from a repeated step to parent step

**URL:** <https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626>\
**Category:** General\
**Created:** [January 28, 2026, 6:32am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626 "2026-01-28T06:32:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![t\_marius](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@t\_marius](https://forum.opentap.io/u/t_marius)\
**Post date:** [January 28, 2026, 6:32am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626/1 "2026-01-28T06:32:39Z")

</div>

Hi everyone,

I’m building a test plan programmatically in C#, and I’m running into a data‑flow issue involving a `RepeatStep` / `RepeatUntil` step and output propagation.

My test plan structure looks like this:

```csharp
Test Plan
  - RepeatUntil (stop when data is generated by StepA )
      - StepA_Producer // generates a string OutputValue
  - StepB_Consumer // needs OutputValue
  - StepC_Consumer // needs OutputValue

```

`StepA_Producer` pools some data, and sets the verdict to Pass when data is available  
I can see that `OutputValue` is found, but the steps **after** the repeat (`StepB_Consumer` and `StepC_Consumer`) always receive **null** for the mapped value.

I used programmatic I/O assignment, which works perfectly if the steps are _not_ inside a Repeat, but inside a `RepeatUntil`, the value never propagates to the parent test plan.

**InputOutputRelation.Assign** (  
inputObject: stepB,  
inputMember: destMember,  
outputObject: stepA,  
outputMember: srcMember  
);

What is the **recommended / best‑practice** solution in OpenTAP to transfer data that is produced inside a repeat\childStep to nextSteps\parentSteps ?

Thanks!

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [January 28, 2026, 8:10am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626/2 "2026-01-28T08:10:51Z")

</div>

Hi @t_marius,

There are some scoping rules that apply here. Basically the scope has to be same level or higher and the step has to come before. So sibling steps of the current step or parents that comes before.

Here is an example of what "My Step"s properties can get the output from.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/e/ec005e5e732151806165829258605e6801e68003.png)

---

<div class="post-metadata">

**Author:** ![t\_marius](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@t\_marius](https://forum.opentap.io/u/t_marius)\
**Post date:** [January 28, 2026, 8:33am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626/3 "2026-01-28T08:33:17Z")

</div>

@rolf_madsen Thank you for the info . I just made a test using Input, and the data can be linked to the next steps. We will have to use some global variable in the future, but for now I’m prospecting what kind of data sharing mechanism OpenTAP provides already. Cheers!

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [January 28, 2026, 9:14am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626/4 "2026-01-28T09:14:42Z")

</div>

I would not recommend a global variable. Test steps can refer to each other directly.

So for example, you could make an interface for providing values (or just use the step type directly):

```cs
    public interface IMyValueProvider : ITestStep
    {
        int TheValue { get; }
    }

    public class StepA : TestStep, IMyValueProvider
    {
        public int TheValue { get; private set; }

        public override void Run()
        {
            TheValue = 5;
        }
    }

    public class StepB : TestStep
    {
        // Allows you to reference the other step.
        public IMyValueProvider OtherStep { get; set; }

        public override void Run()
        {
            Log.Debug("The value was: {0}", OtherStep.TheValue);
        }
    }

```

This allows you to select the step like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/opentap/original/2X/2/2fec69ff6bb019a2c3643b058726e595e84dc1a6.png)

---

<div class="post-metadata">

**Author:** ![t\_marius](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@t\_marius](https://forum.opentap.io/u/t_marius)\
**Post date:** [January 28, 2026, 10:41am UTC](https://forum.opentap.io/t/transferring-output-data-from-a-repeated-step-to-parent-step/2626/5 "2026-01-28T10:41:18Z")

</div>

This is interesting, we are trying to avoid coupling as much as possible, so I think for the interface example will definitely have some use cases in our app. Thanks
