How do I Test the process workflow with Test Data Queue

I wanted to test the Process workflow using the Test Data Queue but the standard RE-Framework ProcessTestCase.xaml only contains the logic to retreive a real queue item. When I use the test data queue I get a dictionary but not a transactionitem.
Is there an EASY way to convert the dictionary to a Transactionitem containing specific content?
Why is the ProcessTestCase using real queue items in the first place when there is the posibility to use testdata from a testqueue?

Hi @Kevin_Westerman_Tacstone

You can do the following workaround on converting the dictionary obtained into a transaction item.

Dim dict As Dictionary(Of String, Object) = YourDictionaryVariable
Dim specificContentJson As String = JsonConvert.SerializeObject(dict)
Dim transactionItem As TransactionItem = new TransactionItem() With { _
.SpecificContent = JObject.Parse(specificContentJson) _
}

Hope this helps,
Best Regards.

@Kevin_Westerman_Tacstone ,

for test cases please use BDD testing architecture. You can get rid from RE Framework for test cases

and then try to read Test Queue item into BDD Xaml.

Thanks,
Arvind

Kevin,
I ran into the same issue. Doesn’t make any sense to me that they do it that way. Here is how i solved it. First create a mock test case for “Get transaction data.xaml” Do this by right click the .xaml and selecting the box for create mock. Then, inside the workflow right clock on the get transaction item activity and surround in a mock. then follow the following picture. But basically initialize out_transactionItem by using an assign. out_transactionitem = new UiPath.Core.QueueItem() because it will not be auto initialized through the activity like it would through the real activity. Then set in an assign TransactionItem.SpecificContent = dictionaryVar.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.