Creating non-schema specific data masks
In the Recording Studio perspective, you can create a non-schema specific data mask in a Test Integrations and APIs project. The mask will replace sensitive data in specified fields in messages recorded against any schema and, thus, prevent that data from appearing in any assets created from those messages.
About this task
If permissions in Test Integrations and APIs are being used to control which users can create, modify, or delete data masks, you might require permissions before you can create a data mask.
You must record unmasked data before you can create a non-schema specific data mask.
When creating a non-schema specific data mask, there
are three possible data masking methods that can be used:
- Creating a fixed value substitution data mask involves entering a value to mask the "real value" of a field and that value will replace any data recorded for that field.
- Creating a data source substitution data mask involves using a
data source, such as a Microsoft™ Excel
spreadsheet or a .csv file, to supply a list of values that can be
used to replace recorded data.Note: Before you can create a data source substitution data mask, you must complete the following tasks:
- Create a spreadsheet or a .csv file that contains a series of "fake" values that you want to use to mask real values of the relevant message element.
- In the Test Factory perspective, create a new Excel data source and select the spreadsheet or .csv file that you created.
- Creating an automatic value creation data mask involves selecting or creating a regular expression (Regex) and Test Integrations and APIs will create new values that match that expression.
Procedure
- Open the Recording Studio perspective.
- Create an event monitor if required.
- Start a recording session.
- Generate events or wait for the system under test to generate events (whichever is applicable).
- On the upper half of the Events View window, select one or more recorded events.
- On the lower half of the Events View window, click the Body tab or the Header tab.
- Select the text node of the relevant message element.
- Click Add Data Mask on the toolbar
on the lower half of the Events View window. Alternatively, right-click
the text node and click Add Data Mask on the
pop-up menu.
The Data Mask Creation Wizard is displayed.
- In the Technique Selection list,
click the required option:
- Click Next.
- Optional: Clear the Apply to existing events check box.
- Click All schemas (if required)
to make this mask a non-schema specific mask.Note: If you click Just this schema, the mask will be only a schema specific mask. If Just this schema is unavailable, there is no schema in your project for the operations that you are recording.
- Click Finish.
Results
A mask icon is displayed next to the selected message element.
To
verify that the new data mask works, use Recording Studio to record
and view new events. On the Events View window, double-click a recorded
event for the relevant operation:
- If you selected fixed value data substitution, verify that the value of the relevant message element has been replaced by the value that you entered for the data mask.
- If you selected data source substitution, verify that the value of the relevant message element has been replaced by a fake value from the specified data source. If you record more events, you should notice that the fake values displayed change as the real values change.
- If you selected automatic value creation, verify that the value of the relevant message element has been replaced by a fake value from the specified Regex. If you record more events, you should notice that the fake values displayed change as the real values change.