Hi everyone,
I have a question about how to run a data-driven test in the below case. Can you take a look and recommend how can I do it?
I want to create multiple Sales Orders with an optional number of line items.
For example, 2 Sales Orders with header and Item like this
***Header:
Number txtSoldToParty txtShipToParty txtPONumber
1 1000000 1000000 Test001
2 1000000 1000000 Test002
***Item:
Number txtMaterial txtOrderQuantity txtUnit
1 7641 1 CS
1 228.911 1 CS
1 1022.911 1 CS
2 7641 1 CS
2 228.911 1 CS
The UI to configure like the below image
My current Test Suite:
How can I set up the test scripts to solve that problem? Could you guys please give me some recommendations?
Many thanks
Data-driven Test: 1 header with multiple item lines
Data-driven Test: 1 header with multiple item lines
Last edited by leo.phan on Tue Apr 21, 2020 11:51 am, edited 1 time in total.
Re: Data-driven Test: 1 header with multiple item lines
Hi,
I'm afraid, there are no images displayed in your post. So we have no clue, what your current configuration looks like and therefore, it's hard to understand what exactly you want to achieve? Please upload the images again. Thanks.
I'm afraid, there are no images displayed in your post. So we have no clue, what your current configuration looks like and therefore, it's hard to understand what exactly you want to achieve? Please upload the images again. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Data-driven Test: 1 header with multiple item lines
Thank you for your reply.
I've updated the images. Please help me to take a look and give me some recommendations!
Many thanks.
I've updated the images. Please help me to take a look and give me some recommendations!
Many thanks.
Re: Data-driven Test: 1 header with multiple item lines
Hi,
The easiest (UI) way to achieve what you want, is to create a copy of Input_Item smart folder. Then in first Input_Item, limit data range to just 1-3 rows and add a condition, that this smart folder should run only in case the txtPONumber is equal to "Test001". Then change the data range of second smart folder to 4-5 and add condition that it should run only if txtPONumber is equal to "Test002". Now if you run the test, the first iteration of Create_Sales_Order should run the first instance of Input_Item SF, while the second iteration of Create_Sales_Order, should run second instance of Input_Item. That's it
The easiest (UI) way to achieve what you want, is to create a copy of Input_Item smart folder. Then in first Input_Item, limit data range to just 1-3 rows and add a condition, that this smart folder should run only in case the txtPONumber is equal to "Test001". Then change the data range of second smart folder to 4-5 and add condition that it should run only if txtPONumber is equal to "Test002". Now if you run the test, the first iteration of Create_Sales_Order should run the first instance of Input_Item SF, while the second iteration of Create_Sales_Order, should run second instance of Input_Item. That's it
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Data-driven Test: 1 header with multiple item lines
Hi odklizec ,odklizec wrote: ↑Tue Apr 21, 2020 12:15 pmHi,
The easiest (UI) way to achieve what you want, is to create a copy of Input_Item smart folder. Then in first Input_Item, limit data range to just 1-3 rows and add a condition, that this smart folder should run only in case the txtPONumber is equal to "Test001". Then change the data range of second smart folder to 4-5 and add condition that it should run only if txtPONumber is equal to "Test002". Now if you run the test, the first iteration of Create_Sales_Order should run the first instance of Input_Item SF, while the second iteration of Create_Sales_Order, should run second instance of Input_Item. That's it
Thank you for your recommendation. I just tried to create a test suite like the way you share. However, it did not work automatically if users change the data, the number of item lines. In that case, we must change the data range and the condition before running the test.
I came up with a new idea to solve that problem. I designed the excel file that when users create a new record for header, they must create a new sheet of Item Lines for that header record. With this way, we don't need to configure the data range for each header.
Anyway, thank you so much for your recommendation.