Parameters and SubTest

I have 3 SubTest within 1 Test Case.

SubTest 1: proposal_calcAmount

SubTest 2: annualManagedServiceFee_calc

Both key params are the results of some calculations made within the subtest itself. I’ve categorised them as ‘outputs’

Based on the key params from those 2 SubTest, I then make a calculation in a 3rd SubTest.
proposal_calcAmount + annualManagedServiceFee_calc

Running the testcase got me this error.
Requested to set the value of sub-test output parameter “proposal_calcAmount” to test parameter “proposal_calcAmount”, but “proposal_calcAmount” is never set!

When I ran the test case, and when it failed(naturally), the result I got from the 2 SubTests:

proposal_calcAmount - > 259975
annualManagedServiceFee_calc -> 243

Then, when I reached the 3rd one:

proposal_amount_total -> 260218.00
proposal_calcAmount ->

As you can see, my proposal_calcAmount has value. What does this mean?

Hi @erik.yeow,
Make sure that in subtest1 and subtest2 settings you set the outputs:


Also, make sure to set the inputs and outputs in subtest3

Let me know if it helped solve your issue.

My output are more or less similar to that, but its still having issues.

There are other things done before, but the final step for each of my 3 subtest:

SubTest 1:

SubTest 2:

SubTest 3:

As you can see, SubTest 3 depend on the values generated from SubTest 1 and 2, but when I run it, the results are as you can see in the OP.

All 3 are using the addon ‘Evaluate Mathematical Expression

As a step in the actual TestCase:
SubTest 1:

SubTest 2:

The values are declared as ‘output’, so in the actual step for the SubTest 3, I have no fields for inputs, only output.

Hi @erik.yeow,
In subtest No.3, create two input parameters to receive the previous output parameters (from the main test).
You can also set an output parameter for the result for later use.

If you are still unable to solve the issue, please contact our support mail at support@testproject.io

I literally cant see where to put the input fields as suggested.

(a different test case, but this is using SubTest 3 as well)

Immediately after the “Test” field are the “Output” fields.

If it means something, all the related fields, as mentioned in the OP, were set as ‘Outputs’, like so.

Go into the Sub3 test, then click Parameters up near the top.

You create the params that are being supplied to Sub3 inside of Sub3. Then save and exit, then return to the case, click on Sub3 again it should show you the input options for Sub3's internal use.

Then drop the variables from your case in the appropriate Sub3 inputs.

Is that how this works?

I was re-reading every post in this topic, including the new one. A thought then came to mind.

This screenshot I took showed the parameter set as Output. The key thing is that this is the parameter as declared in the main testcase.

I then went into the parameters tab for SubTest 3 and changed the same variable to Input

This results that when I check the SubTest details in the main Testcase,

And this seems to have fixed the issue.

TL;DR,
These is how the parameters were defined:
Main(which calls all the SubTests):
proposal_amount_total (Output) , proposal_calcAmount (Output)

SubTest 1: proposal_amount_total (Output)
SubTest 2: proposal_calcAmount (Output)
SubTest 3: proposal_amount_total (Output), proposal_calcAmount (Output).

This is how the parameters is currently defined:
Main(which calls all the SubTests):
proposal_amount_total (Output) , proposal_calcAmount (Output)

SubTest 1: proposal_amount_total (Output)
SubTest 2: proposal_calcAmount (Output)
SubTest 3: proposal_amount_total (Input), proposal_calcAmount (Input).

Now, Im not completely sure why this works, considering the original definition still had values when it went to SubTest 3(as the only value missing was explicitly proposal_calcAmount only.), but I think I can put it aside for now, as the new definitions seems to work just as well.

This topic was automatically closed after 180 days. New replies are no longer allowed.