Test data preparation

To prepare data for workflows data should be unique for each separate workflow.

To run all workflows:

credentials (variables or .csv file) needed for the environment being tested. Username, password, hostname, and tenant should be replaced by valid data.


Simultate Blacklight Requests (BLS)

The following data files are needed to support the Jmeter script during its execution.
- BLS_item_holdings_instance_ids.csv.csv: a list of item ids and their related holdings and instances to run the script. To obtain these UUIDs, run the following SQL script:

SELECT item.id as itemId, hr.id as hrId, hr.jsonb->>'instanceId' as instanceId 
FROM {tenant}_mod_inventory_storage.item item
INNER JOIN {tenant}_mod_inventory_storage.holdings_record hr
ON uuid(item.jsonb->>'holdingsRecordId') = hr.id
WHERE item.jsonb->'status'->>'name' = 'Available'
LIMIT 1000


- BLS_user_ids.csv: a list of user ids to run the script. These are users who are active and have a valid barcode.

View Patron Record (PRV)

The following data files are needed to support the Jmeter script during its execution.
- user_ids.csv: a list of UUIDs and names of actual users that will be used to execute the script.

Check-in Check-out (CICO)

The following data files are needed to support the Jmeter script during its execution.
- Available.csv: a list of barcodes that have Available status
- checked_out.csv: a list of barcodes that although have Available status may be considered as "checked out" so that they can be used in the check-in calls.
- user_barcodes.scv: a list of barcodes of actual patron IDs that will be used to check in/out with.


Item level Requests (ILR)

The following data files are needed to support the Jmeter script during its execution.
- itembarcodes.csv: a list of barcodes that have Available status

select jsonb->>'barcode' from  fs09000000_mod_inventory_storage.item  WHERE jsonb->'status'->>'name' = 'Available' and jsonb->>'barcode' is not null limit 3000;


- user_barcodes.scv: a list of barcodes of actual patron IDs that will be used to check in/out with.

select jsonb->>'barcode' from fs09000000_mod_users.users where jsonb->'active' = 'true' and jsonb->>'barcode' is not null and jsonb->>'type' = 'patron' limit 3000

Monitoring Pick Slips Requests (MPS)

The following data files are needed to support the Jmeter script during its execution.
- servicepoints.csv: a list of service point ids. It will be used to execute /circulation/pick-slips/<servicepointId> requests.


Data export (DE)

The following data files are needed to support the Jmeter script during its execution.

-A proper job profile should be configured or added to the environment

-A set of files with item IDs, holdings IDs, or/and instance IDs should be prepared.

For example: 

SELECT id FROM {tenant}_mod_inventory_storage.instance where jsonb->>'source'='MARC' LIMIT 40;


Data Import (DI)

- Prepare files with proper naming. Do not use dashes (-) in file names:
                        bib_Create should be included in the file name for MARC BIB Create
                        holdings_Create should be included in the file name for MARC Holdings Create
                        authority_Create should be included in the file name for MARC Authority Create

                        or another naming according to specific profiles
- Ensure that the environment has proper job profiles.


Fiscal Year Rollover (FYR)

The following data files are needed to support the Jmeter script during its execution.
- ledgers_ids.scv: a list of keywords for searching ledger and id

SELECT {tenant}_mod_finance_storage.ledger.jsonb->'name', id
  FROM {tenant}_mod_finance_storage.ledger;

Use preparation script to generate data for FYR (FY_rollover_preparation.jmx).

Ledger Operations (LO)

The following data files are needed to support the Jmeter script during its execution.
- keywords.scv: a list of keywords for searching ledger and id

SELECT {tenant}_mod_finance_storage.ledger.jsonb->'name', id
  FROM {tenant}_mod_finance_storage.ledger;


Edit Bib Record Tag Table Group (ETT)

- ETT_keywords.csv (contains keyword) in this case it is Instance keyword you can generate this file using scripts/selectKeyWords.sql

SELECT substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4),ARRAY_AGG({tenant}_mod_inventory_storage.instance.id)
FROM {tenant}_mod_inventory_storage.instance
INNER JOIN {tenant}_mod_inventory.records_instances
ON {tenant}_mod_inventory_storage.instance.id = {tenant}_mod_inventory.records_instances.instance_id
INNER JOIN {tenant}_mod_source_record_storage.raw_records_lb
ON {tenant}_mod_inventory.records_instances.record_id = {tenant}_mod_source_record_storage.raw_records_lb.id
group by substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4)
having count(1) > 3 and count(1) < 10;

ETT_search_items.csv:  a list of item ids to run the script, this items will be edited (editable).

Item Record Operations (IRO)

The following data files are needed to support the Jmeter script during its execution.
- IRO_search_items.csv: a list of instance hrids for Search field that will be used to execute the script.

- IRO_search_items_delete.csv: a list of instance hrid for Search field that will be used to execute delete and edit operations in the script.


Retrieving Instances and Holdings (RIH)

- RIH_instance_ids.csv contains instance ids

View Bib (VB)

- VB_keywords.csv (contains keyword) in this case it is searching Instance by a keyword.

("aab",5
"aabe",2
"AAC",4
"AACE",2)

SELECT substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4),LEAST((count(1)-2),5)
	FROM {tenant}_mod_inventory_storage.instance
	INNER JOIN {tenant}_mod_inventory.records_instances
	ON {tenant}_mod_inventory_storage.instance.id = {tenant}_mod_inventory.records_instances.instance_id
	INNER JOIN {tenant}_mod_source_record_storage.raw_records_lb
	ON {tenant}_mod_inventory.records_instances.record_id = {tenant}_mod_source_record_storage.raw_records_lb.id
	group by substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4)
	having count(1) > 3 and count(1) < 10;


View Holdings (VH)

- VH_keywords.csv (contains keyword) in this case it is searching Holdings by a keyword.

(0,5
00,5
00000,5
000000,5)

SELECT substring((({tenant}_mod_inventory_storage.holding_records.jsonb)->'title')::TEXT from 2 for 4),LEAST((count(1)-2),5)
	FROM {tenant}_mod_inventory_storage.holding_records
	INNER JOIN {tenant}_mod_inventory.records_holdings
	ON {tenant}_mod_inventory_storage.holding_records.id = {tenant}_mod_inventory.records_holdings.holdings_id
	INNER JOIN {tenant}_mod_source_record_storage.raw_records_lb
	ON {tenant}_mod_inventory.records_holdings.record_id = {tenant}_mod_source_record_storage.raw_records_lb.id
	group by substring((({tenant}_mod_inventory_storage.holding_records.jsonb)->'title')::TEXT from 2 for 4)
	having count(1) > 3 and count(1) < 10;



View Instance Holdings Details (VIH)

No data preparation is needed.


Inventory Record Monitoring /View (VIR)

The following data files are needed to support the Jmeter script during its execution.
- VIR_instance_item.csv: a list of instance and item ids to run the script (could be not connected).


Invoices Operations (IO)

The following data files are needed to support the Jmeter script during its execution.
- IO_invoice_codes.csv: a list of keywords for searching invoices (the status of the invoiceі should be open)

SELECT {tenant}_mod_invoice_storage.invoices.jsonb->'vendorInvoiceNo'
	FROM {tenant}_mod_invoice_storage.invoices limit 2000;


- IO_organization_names.csv: a list of keywords for searching organization(only for create workflow)

SELECT DISTINCT({tenant}_mod_organizations_storage.organizations.jsonb->'code')
	FROM {tenant}_mod_organizations_storage.organizations limit 2000;


Manage invoices GROUP/Approve invoices (AIE)

The following data files are needed to support the Jmeter script during its execution.
- invoice_codes.csv: a list of keywords for searching invoices (funds used in the invoice should be active and not used in FYR, the status of invoiceі should be open, and invoiceі should be with at least one invoice line)

SELECT {tenant}_mod_invoice_storage.invoices.jsonb->'vendorInvoiceNo'
	FROM {tenant}_mod_invoice_storage.invoices limit 2000;


View Marc Authority (VAR)

The following data files are needed to support the Jmeter script during its execution.
- VAR_search_marc_keyword.csv: a list of search keywords for marc authority records is dependent on the Environment against which tests will be executed.

(Linares
King
Wright
Lee)


Purchase Orders Operations (POO)

The following data files are needed to support the Jmeter script during its execution.
- POO_vendors.csv: a list of vendors ids that have all needed checkers to create orders. It will be used to execute create, view, edit, and delete orders in the script.


Vendor Record/Organisation Operations (VRO)

The following data files are needed to support the Jmeter script during its execution.
- VRO_organizationNames.scv: a list of organization names that will be used to execute view, edit, and delete operations in the script.


Patron Record Operations (PRO)

The following data files are needed to support the Jmeter script during its execution.
- PRO_users.scv: a list of uuids and names of actual users that will be used to execute the script.

Users Loan Renewal (ULR/RENEW)

ULR_users.csv: a list of user IDs that will be used to execute the script, users should be with previously generated loans.

select fs09000000_mod_circulation_storage.loan.jsonb->>'userId' as user, fs09000000_mod_inventory_storage.item.jsonb->>'barcode' as itemBarcode 
from fs09000000_mod_inventory_storage.item join fs09000000_mod_circulation_storage.loan 
ON fs09000000_mod_inventory_storage.item.id = (fs09000000_mod_circulation_storage.loan.jsonb->>'itemId')::uuid
limit 4000

View MARC Tag Table (VTT)

- VTT_keywords.csv (contains keyword) in this case it is Instance keyword you can generate this file using scripts/selectKeyWords.sql

"aab",5
"aabe",2
"AAC",4
"AACE",2

SELECT substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4),ARRAY_AGG({tenant}_mod_inventory_storage.instance.id)
FROM {tenant}_mod_inventory_storage.instance
INNER JOIN {tenant}_mod_inventory.records_instances
ON {tenant}_mod_inventory_storage.instance.id = {tenant}_mod_inventory.records_instances.instance_id
INNER JOIN {tenant}_mod_source_record_storage.raw_records_lb
ON {tenant}_mod_inventory.records_instances.record_id = {tenant}_mod_source_record_storage.raw_records_lb.id
group by substring((({tenant}_mod_inventory_storage.instance.jsonb)->'title')::TEXT from 2 for 4)
having count(1) > 3 and count(1) < 10;