Question

Test Data between multiple recordings

  • 18 October 2023
  • 4 replies
  • 26 views

I’m currently working on a series of APTs in order for us to automate our AST testing. I had hoped to write short recordings, and connect them together using the Test functionality. However I’m struggling to get them to connect together easily, as it doesn’t seem like scenario data setup for 1 recording is available to the next recording, instead it asks for the data again.

For example, I have three recordings that do the following

  1. Create and Release Purchase Requisition
  2. Find Purchase Requisition
  3. Convert Purchase Requisition Line to Purchase Order

When connected into a test, I setup the part data differently per scenario. So scenario 1 wants Part Number LEGO-BROWN, Scenario 2 wants Part Number LEGO-TEAL, etc.

This works easily for creating/releasing the requisition, and then I can use the screenshot capture to get the PR number in order to do recording #2.

However when I get to recording #3, I want to select the requisition line based on the Part Number from Scenario 1. But to do this, I would have to re-type in the same part number, because I can’t capture Scenario 1’s part number during Recording 1.

 

Am I missing something? Can I not capture the scenario’s data values into a variable or something else so that I can reference it in future recordings in the test? The ability to get the Scenario Number as a variable makes it feel like I should be able to get the Scenario Data into a variable, but I can’t figure it out!

Apologies if this doesn’t make sense. I’ve attached some images of my tests to illustrate my points:

Why can’t I reference the Part Number entry from the earlier recording?

 

I guess what I’m trying to do is: I want to be able to have one scenario defined across all my recordings, and to not have to re-enter data for recordings when the data isn’t changing in the scenario.

Perhaps I’m just structuring my testing wrong, but I’m trying to keep things as modular as possible


4 replies

Userlevel 6
Badge

Hi @CFerguson 

 

Have you tried using scenarios? I do it here:

 

 

Hey @Morten , 

I’m tried making use of both Scenarios and Iterators and watched your video when trying to troubleshoot this earlier. However in both cases, if I need to input data into two recordings during a test, I have to enter the data twice.

In your video, imagine if you were doing both of your tests together: Creating a new user (recording 1) and then adding a phone number (recording 2), with having to find the new user you created in between.

In your video, you enter their names twice. I want to enter their name once, along with a phone number for the second step.

Is this possible?

Thanks for the quick response!

Userlevel 6
Badge

Hi @CFerguson 

 

My colleague does this from 19:00 here:

 

 

check it out :) i think this is what you need then!

Hey @Morten 

Yep, that’s what I need to do but he is using the API to loop through. I can’t figure out how to do this without the API. I don’t have the API setup to query and get results from a table, instead I have the recording finding the set in the client, and then I want to loop through the set.

Thanks,

Cameron

Reply