- Overview
- Callout
- Complex Scenarios
- Credentials
- Data Service
- Form
- Release notes
- Project compatibility
- Real Time Forms
- Updating form data
- Running forms using JavaScript
- Customizing Forms Using CSS
- Conditional components
- Adding multiple components on the same row in Columns
- Using the Data Table component
- Get File/Folder path
- Reading cell values from a Data Grid component
- Displaying PDF files
- Displaying images in forms
- Scrolling through Data Grids
- Using Dev Tools with forms
- Calculate form component values
- Managing dates in forms
- Opening hyperlinks inside forms
- Displaying a default tab in forms
- Displaying the full label of a component
- Searching long strings in drop-down lists
- About the pre 23.4 Form experience
- Project Compatibility
- Real Time Forms
- Dynamic Checkboxes
- Conditional Dropdowns
- Displaying a Default Tab
- Displaying Images
- Displaying PDF Files
- Displaying the Full Label
- Dynamic HTML Elements
- Managing Dates
- Searching Long Strings in Drop-downs
- Customizing Forms Using Local CSS Files
- Executing Do Block On Checkbox Change
- Customizing Columns Width
- Updating Form Data
- Resetting Collection Data
- Advanced Logic
- Executing Do Block on Dropdown Option Change
- Reading Cell Values From a Data Grid Component
- Conditional Components
- Scrolling Through Data Grid Components
- Using the Grid Component
- Dev Tools
- Calculated Value
- Dynamic Dropdowns
- Switching Tabs With Button Click
- Opening Hyperlinks Inside Form
- FTP
- IPC
- Persistence
- Release notes
- Project compatibility
- About the Persistence activity package
- Bulk Form Designer
- Start Job And Get Reference
- Wait for Job and Resume
- Add Queue Item And Get Reference
- Wait For Queue Item And Resume
- Wait for Form Task and Resume
- Resume After Delay
- Assign Tasks
- Create External Task
- Wait For External Task and Resume
- Complete Task
- Forward Task
- Get Form Tasks
- Get Task Data
- Add Task Comment
- Update Task Labels
- Create App Task
- Wait for App Task and Resume
- Working with App tasks
- Building Your First Form Action
- Advanced Controls for Drop-downs
- Embedding Objects in Form Actions
- Allowing Users to Upload Files to the Storage Bucket
- Adding Advanced Logic Using Java Script
- Setting a Default Tab
- Removing the Delete button from Edit Grid using custom CSS
- Customizing Edit Grid templates
- Using buttons to trigger custom logic
- Using an External Form Layout
- Dynamically expanding form components at runtime
- Sample Workflows
- Automation Ops Pipelines
- System
- Release notes
- About the System activity package
- Project compatibility
- RegEx Builder Wizard
- Is Text Matching
- Find Matching Patterns
- Modify Text
- Modify Date
- Replace Matching Patterns
- Text to Left/Right
- Add Data Column
- Add Data Row
- Build Data Table
- Clear Data Table
- Get Row Item
- Update Row Item
- Merge Data Table
- Output Data Table
- Remove Data Column
- Remove Data Row
- For Each Row in Data Table
- Generate Data Table From Text
- Create List
- Append Item to List
- Read List Item
- Update List Item
- Add Log Fields
- Comment Out / Disabled Activities
- Comment
- Change Type
- Log Message
- Remove Log Fields
- Invoke Com Method
- Format Value
- Lookup Data Table
- Filter Data Table
- Sort Data Table
- Remove Duplicate Rows
- Join Data Tables
- Report Status
- Append Line
- Compress/Zip Files
- Copy File
- Copy Folder
- Create Folder
- Create File
- Delete
- File Exists
- Folder Exists
- Extract/Unzip Files
- Wait for Download
- File Change Trigger
- For Each File in Folder
- For Each Folder in Folder
- Delete File
- Delete Folder
- Move File
- Move Folder
- Rename Folder
- Rename File
- Path Exists
- Read Text File
- Write Text File
- Get File Info
- Get Folder Info
- Get Processes
- Get Username/Password
- Kill Process
- Beep
- Get Environment Folder
- Get Environment Variable
- Invoke Power Shell
- Input Dialog
- Message Box
- Browse for File
- Browse for Folder
- Invoke VBScript
- Process End Trigger
- Process Start Trigger
- File Change Trigger V3
- Trigger Scope
- Repeat Number of Times
- Text to Upper/Lowercase
- Set Environment Variable
- For Each
- Break / Exit Loop
- Retry Scope
- Check True
- Check False
- Workflow Placeholder
- Invoke Workflow File
- Launch Workflow Interactive
- Invoke Code
- Continue / Skip Current
- Multiple Assign
- Invoke Process
- Run Parallel Process
- While
- Do While
- Repeat Number Of Times
- Raise Alert
- Orchestrator HTTP Request
- Get Asset
- Get Credential / Get Orchestrator Credential
- Set Asset
- Set Credential
- Get Jobs
- Get Current Job Info
- Start Job
- Stop Job
- Add Queue Item
- Add Transaction Item
- Delete Queue Items
- Get Queue Items
- Get Transaction Item
- Postpone Transaction Item
- Set Transaction Progress
- Set Transaction Status
- Should Stop
- Wait Queue Item
- Bulk Add Queue Items
- Write Storage Text
- Upload Storage File
- List Storage Files
- Read Storage Text
- Download Storage File
- Delete Storage File
- Custom Input
- Append Item to Collection
- Build Collection
- Collection to Data Table
- Exists in Collection
- Filter Collection
- Merge Collections
- Remove From Collection
- Reset Timer
- Resume Timer
- Start Timer
- Stop Timer
- Timeout Scope
- Manual Trigger
- When New Item Added to Queue
- Stop Local Triggers
- Run Local Triggers
- Repeat Trigger
- Time Trigger
- Disable Local Trigger
- Enable Local Trigger
- Notify Global Variable Changed
- Global Variable Changed Trigger
- Extract Text
- Find and Replace
- Return
- Extract Date and Time from Text
- Change Case for Text
- Add or Subtract from Date
- Download file from URL
- Format Date as Text
- Split Text
- Combine text
- AddDataRow
- AddQueueItem
- AddTransactionItem
- AppendLine
- BulkAddQueueItems
- ClearDataTable
- CompressZipFiles
- CopyFile
- CreateFile
- CreateFolder
- DeleteFileOrFolder
- DeleteQueueItems
- DeleteStorageFile
- DownloadStorageFile
- ExtractUnzipFiles
- FilterDataTable
- GetAsset
- GetCredential
- GetJobs
- GetQueueItem
- GetQueueItems
- GetResourceForLocalPath
- GetRowItem
- GetTransactionItem
- InvokeProcess
- JoinDataTables
- ListStorageFiles
- LookUpDataTable
- MergeDataTable
- MoveFile
- OrchestratorHTTPRequest
- OutputDataTable
- PathExists
- PostponeTransactionItem
- ReadStorageText
- ReadTextFile
- RemoveDataColumn
- RemoveDuplicateRows
- Replace
- SetAsset
- SetCredential
- SetTransactionProgress
- SetTransactionStatus
- SortDataTable
- StartJob
- StopJob
- UpdateRowItem
- UploadStorageFile
- WaitQueueItem
- WriteStorageText
- WriteTextFile
- Testing
- Release notes
- Project compatibility
- About the Testing activity package
- Project Settings
- Add Test Data Queue Item
- Address
- Attach Document
- Bulk Add Test Data Queue Items
- Delete Test Data Queue Items
- Get Test Data Queue Item
- Get Test Data Queue Items
- Given Name
- Last Name
- Random Date
- Random Number
- Random String
- Random Value
- Verify Control Attribute
- Verify Expression
- Verify Expression With Operator
- Verify Range
- Address
- AddTestDataQueueItem
- AttachDocument
- BulkAddTestDataQueueItems
- DeleteTestDataQueueItems
- GetTestDataQueueItem
- GetTestDataQueueItems
- GivenName
- LastName
- RandomDate
- RandomNumber
- RandomString
- RandomValue
- VerifyAreEqual
- VerifyAreNotEqual
- VerifyContains
- VerifyExpression
- VerifyExpressionWithOperator
- VerifyIsGreater
- VerifyIsGreaterOrEqual
- VerifyIsLess
- VerifyIsLessOrEqual
- VerifyIsRegexMatch
- VerifyRange
- Adding and consuming test data queue items
- Workflow Events
- Workflow Foundation
Adding and consuming test data queue items
This tutorial shows you how to work with the test data queue activities.
In the given scenario, we generate random values, add them as items to a test data queue, and use them to fill out loan application forms in the UiBank app. Let's break down the process that this tutorial guides you on:
- Generate the data used to fill in the
Apply for a loan form in the UiBank
app:
- Enter the number of test data queue items you want to add.
- Generate the necessary random values for a loan application.
- Add these values as items to a test data queue.
- Retrieve the items from the test data queue and use them to fill in the form:
- Retrieve these items from the test data queue.
- Use these items to fill in the Apply for a loan form in the UiBank app with the help of UIAutomation activities.
- The Test Automation module in Orchestrator, used as the Testing tab.
- Testing.Activities
- UIAutomation.Activities
- System.Activities
Start by deciding the number of items you want to add to the test data queue. For each item generate random values for various parameters such as first name, last name, age, yearly income, and loan amount.
- Create a test data queue in
Orchestrator. Go to the Testing tab, select Test Data Queues, and
create a queue called
TMDTQueue
. - Open your project in Studio and create a new Workflow. Name it
GenerateLoanData
. - Add an Input Dialog activity with the following settings:
- Input Label:
"Records"
. - Dialog Title:
"Enter the records"
. - Input Type: Text Box.
- In the Value entered field, create a variable for saving the
number of records entered. For this example, name the variable
records_new
.
- Input Label:
- Add an Assign activity to
convert the string variable you previously created to
Int32
. Create anInt32
variable namedcount
and assign it the following expression:Convert.ToInt32(records_new)
. - Add another Assign
activity to initialize a counter. Create an
Int32
variable callednumRec
and assign it the value1
. It acts as your counter for the upcoming While loop.
- Add a While activity and set the Condition as
numRec <= count
. This ensures that the loop executes as long asnumRec
is less than or equal tocount
. - Add a Try Catch activity within the While loop. This helps managing any errors during execution.
- Inside the Try block, add activities to generate random first name, last
name, loan amount, age, yearly income, and loan term.
- Use the Given Name
activity to generate a random first name. Store the generated value
within a variable named
firstName
. - Use the Last Name
activity to generate a random last name. Store the generated value
within a variable named
lastName
. - Use four Random Number
activities to generate random
Decimal
values for parameters like loan amount, age, yearly income, and loan term.Parameter Min value Max value Output variable Loan amount 5000
100000
loanAmount
Age 18
100
age
Yearly income 100000
1000000
yearlyIncome
Loan term 5
5
loanTerm
- Use the Given Name
activity to generate a random first name. Store the generated value
within a variable named
- Add an Assign activity to
generate an email address based on the first names and last names generated
previously. Within a
String
variable (namedemail
), save the following value:firstName+lastName+"@gmail.com"
. - Add an Add Test Data Queue Item
activity to add the generated values as items into the queue.
- Input a Queue Name. For this example, input
TDMTQueue
. - In the Items dictionary, add key-value pairs for each parameter
generated previously. The value for each pair will be the variable where
you store the corresponding generated value. For this example, add the
following key-value pairs:
Key Type Value loanAmount System.Decimal
loanAmount
age System.Decimal
age
yearlyIncome System.Decimal
yearlyIncome
email String
email
term System.Decimal
term
id Int32
idInteger
firstName String
firstName
lastName String
lastName
- Input a Queue Name. For this example, input
- Add an Assign activity to
increment the counter variable value by 1:
numRec = numRec + 1
.
Now let's use the random values stored in the queue to fill out a loan application form in the UiBank app.
- Create another Workflow within your Studio project. Name it
LoanApplication
. - Add an Get Test Data Queue Item activity to
retrieve the queue items you previously added. Provide the same Queue
Name. For this example, input
TDMTQueue
and save the queue items within aDictionary(<String,Object>)
variable, nameddata
. - Add Assign activities to
store the values you want to retrieve from the queue items. For this example,
add five activities, for the following values: email, loan amount, term, yearly
income, and age. Make sure each value corresponds to its key in the
data
dictionary.Save to Value to save email
data.Item("email")
loanAmount
data.Item("loanAmount")
term
data.Item("term")
yearlyIncome
data.Item("yearlyIncome")
age
data.Item("age")
- Add an Use Application/Browser activity to
automate the UiBank app. In the browser URL field input
the login page of the UiBank app:
"https://uibank.uipath.com/welcome"
.- Add two Type Into activities, to insert the username and password. Input your credentials as plain text.
- Use a series of Click activities to automate
the following:
- Click the Sign in button.
- Consent to the Privacy Policy by clicking I agree.
- Navigate to the loan application form by clicking Products, then Loans, and lastly, Apply for a Loan.
- Add five Type Into
activities to input the test data queue values. Use the
.toString
method because these fields only acceptString
variables. - Lastly, add a Click activity, to click the Submit Loan Application button.
To follow the steps of this tutorial and try it out yourself, download the following sample project: TestDataQueuesActivitiesSample.