Page 1 of 1

Recording dependency DDT

Posted: Fri Sep 21, 2018 8:04 am
by csolanki
HI Team,

If I want to give dependency of my current recording on previous recording. How I can implement it. I tried doing it by creating smart folders and giving "If" to it, but not able to figure out how to proceed further.

I want to create something like

- recording 1
if recording 1 passes
go to execute recording 2.
else
go to recording 3


is this possible ?

Re: Recording dependency DDT

Posted: Fri Sep 21, 2018 8:43 am
by Stub
You might be able to achieve this by structuring your tests with nested smart folders and using the Error Behaviour options such as continue with sibling and continue with parent.

Re: Recording dependency DDT

Posted: Fri Sep 21, 2018 9:08 am
by csolanki
Okay, Thanks. Is there any good documentation available over error behaviour usage ?

Re: Recording dependency DDT

Posted: Fri Sep 21, 2018 9:17 am
by McTurtle
Hi csolanki,

You'll need the following setup:
  • You need to put each recording in its own Smart Folder so that you can use the conditional execution for the 2nd and 3rd recordings.
  • You need a teardown after Rec1 so that you can check if the Smart Folder failed or passed.
  • The check cannot be done before the teardown because the information of failure/success is not final before that.
  • You need a global parameter that you can assign the value of the following line of code to in the code module in the teardown:
varCurrentTestContainerStatus=TestReport.CurrentTestContainerActivity.Status.ToString();
You then use the value of this global parameter in the conditional execution of the 2nd and 3rd Smart Folder.

The sample is attached:
ConditionalExample.zip
Please let me know if this helps.

Regards,
McTurtle

Re: Recording dependency DDT

Posted: Mon Sep 24, 2018 9:37 am
by csolanki
Hey, I got it.

One more doubt, this variable is only storing last played smart recording folder output status ,right?

Re: Recording dependency DDT

Posted: Mon Sep 24, 2018 12:50 pm
by McTurtle
Hi csolanki,

A teardown can only be assigned to one test container (test case/smart folder). The code will always indicate the failure/success of this container. Please note, if a child container fails it also means that the parent container fails. The rest should be clear :)

Regards,
McTurtle

Re: Recording dependency DDT

Posted: Tue Sep 25, 2018 8:02 am
by csolanki
Thanks a lot. It worked.