Feature Request - I would love it if we could use variables in condition steps

1 Answer 98 Views
General Discussions
HemoSonics
Top achievements
Rank 1
Iron
Iron
HemoSonics asked on 24 May 2022, 08:57 PM

Currently condition steps only allow choices of verifications or extractions.  It would be nice to be able to use a data binding as a condition. 

 

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 25 May 2022, 08:12 AM

Hi,

I believe that such functionality is already in place in Test Studio - the verification used in the conditional step can be data driven as well. You can first set the binding info in the step and then insert the verification as condition. Or, if you need to edit a verification already implemented in conditional block, you can access its properties through the condition step properties - please, check the screenshot. 

Let me know if this is what you are looking for and if it helps you set up the test as you need it.

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
HemoSonics
Top achievements
Rank 1
Iron
Iron
commented on 25 May 2022, 05:47 PM

Thanks Elena.   This doesn't seem to work in the scenario I am thinking of.  Let me know if there is more I need to do.

I have three tests Parent test, Child A, and Child B.  ChildA gets the data bound Variable from a pop-up window.  Child B needs the data bound information to determine if it should perform various steps.  Is that possilbe?

Elena
Telerik team
commented on 26 May 2022, 10:45 AM

Hi, 

Yes, this is also possible - the extracted variable info is kept in the current test context. So, if both these tests are executed from the parent test, the extracted variable is available in its context. You only need to manually insert the name of the variable from ChildTestA into the property to data bind in ChildTestB. 

Please, give this a try and let me know if this fits your needs.

Regards,
Elena

HemoSonics
Top achievements
Rank 1
Iron
Iron
commented on 07 Jun 2022, 02:31 PM

Hi Elena.  

I see how I could use the extracted variable from another step, but there seems to be no way that it can be used in a Condition, since it is not being set into any data on the screen.  There is no verification or extraction step in the child step, so not sure where to go from here.  Any more suggestions?

Elena
Telerik team
commented on 08 Jun 2022, 01:11 PM

Hello, 

I may be missing something about the scenario you want to cover. Can you, please, elaborate on the condition you want to use and how is the test set up in overall?

In general all condition steps in Test Studio uses a verification step to determine what should be executed (see if..else for example). If this is what you have implemented you can data drive that verification step with the extracted variable from another step. 

If you are using any conditional block in a coded step, you can also use the extracted variables in code and tailor up your custom designed logic. 

In case this information doesn't seem to fit your needs, please, take the time to describe the scenario in further details. 

Thank you for your cooperation in advance.

Regards,
Elena

HemoSonics
Top achievements
Rank 1
Iron
Iron
commented on 10 Jun 2022, 04:09 PM

We have a product that has a different behavior for when it is in the US and for when it is EUROPE.  What I want to do is have a test that says if US then run certain steps.  I don't have a verification on the screen that is useful to me. It does not appear that the product allows for this type of logic that is independent of what the UI would look like.
Elena
Telerik team
commented on 15 Jun 2022, 08:02 AM

Hi, 

Thank you for sharing additional details for the scenario you automate. What is then the condition you use to understand which steps should be executed? How do you plan to set up the condition? 

If you will be setting this in code, then you can use data source values in the code as well.

In case the suggested configurations still don't meet your needs, you can submit a private support thread, where we can discuss the scenario in further depth. Or, I can do this on your behalf, if necessary. 

Thank you for your continuous cooperation.

Regards,
Elena

Tags
General Discussions
Asked by
HemoSonics
Top achievements
Rank 1
Iron
Iron
Answers by
Elena
Telerik team
Share this question
or