Skip to content

ATS-PFM-QRY-014Download the complete answer to a query: Capability Test Specification

Markdown

ATS-PFM-QRY-014

Download the complete answer to a query: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleQuestions, record exploration and data deliveryRevision2

Read atservices-platform ad3f6a65react-console baf6dae3rhythm-v2-docs 99376625

Coverage

  • Rule covered
  • Transition gap: FND-PFM-QRY-064
  • Validation covered
  • Permission covered
  • Edge covered
  • Failure gap: FND-PFM-QRY-064
  • Boundary covered
  • Concurrency gap: FND-PFM-QRY-064
  • Invariant gap: FND-PFM-QRY-064
  • Interaction covered

Test Scenarios

13 scenarios proving CAP-PFM-QRY-014; 10 bound to an existing test.

01 Query-export admission mirrors execution accesspermissionapinegativetest
Proves
BR-CAP-PFM-QRY-014-01
Preconditions
A caller lacks the source dataset’s query grant.
Steps
Request a query export.
Expected
The request returns 403 before any export row is written.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#refuses a caller who may not query the dataset, as running the query would (403)
Source
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#refuses a caller who may not query the dataset (403)
02 Export source and options must be unambiguousvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-014-02 INV-DOM-PFM-QRY-004-03
Preconditions
Both a saved question and an on-screen definition are available.
Steps
Submit both sources, request CSV descriptions and omit options.
Expected
Invalid choices return 400; omitted choices default to Excel with labels and no descriptions.
Data
Use the existing binding’s controlled fixture data.
Bound to
Source
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#refuses a body naming both a saved query and a definition (400)
03 Whole-result export preserves order and confinementinvariantapitest
Proves
BR-CAP-PFM-QRY-014-03
Preconditions
A query matches two thousand six hundred rows with similar records elsewhere.
Steps
Generate its file.
Expected
Every matching local row occurs once in the specified order, with no foreign rows.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#writes every planted row exactly once, in the query’s sort, with no gap
Source
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#writes every planted row exactly once, in the query’s sort, with no gap
04 Spreadsheet text is safely serializedruleunittest
Proves
BR-CAP-PFM-QRY-014-04
Preconditions
Fixture values include different types and formula-like text.
Steps
Write the CSV output.
Expected
Encoding, quoting and date forms are preserved, and dangerous text is prefixed without changing negative numeric values.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/unit/services/exports/csv-writer.spec.ts#writes an instant as ISO 8601 with the tenant zone's offset
Source
services-platform:modules/queries/tests/unit/services/exports/csv-writer.spec.ts#starts with a UTF-8 byte-order mark
05 Row-limit failure gives a useful reasonboundaryapinegativetest
Proves
BR-CAP-PFM-QRY-014-05
Preconditions
The query result exceeds the configured output-row limit.
Steps
Run file generation.
Expected
The export records a too-many-rows failure with an actionable sentence.
Data
Use the existing binding’s controlled fixture data.
Bound to
Source
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#fails too_many_rows with the sentence a person reads
06 Lost access prevents file generationpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-014-06
Preconditions
A requester loses query access and staff contexts differ in active workspace grants.
Steps
Run their exports.
Expected
Unauthorized requesters receive access-lost failure without a file; granted staff complete production.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#builds the export through an active approved grant, with the query’s rows
Source
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#fails access_lost
07 Status and downloads follow export audiencepermissionapinegativetest
Proves
BR-CAP-PFM-QRY-014-07 INV-DOM-PFM-QRY-004-04
Preconditions
An export has requester, colleague and manager contexts plus ready and expired states.
Steps
Read and download under each context and state.
Expected
Authorized audiences succeed, unrelated callers receive 404, pending files return 409 and expired files return 410.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#answers 410 expired once the file has been removed, and the export says expired
Source
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#answers the requester their export
08 File keys and expiry remain export-specifictransitionapitest
Proves
BR-CAP-PFM-QRY-014-08
Preconditions
A query export has completed.
Steps
Inspect its storage location and retained execution record.
Expected
Storage is under its workspace and export location and expiry follows completion by thirty days.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#records the rows, the bytes, the completion and the expiry 30 days later
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#stores the file under the tenant’s and the export’s prefix, as CSV
Source
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#records the rows, the bytes, the completion and the expiry 30 days later
09 Recipient links validate membership and expirypermissionapinegativetest
Proves
BR-CAP-PFM-QRY-014-09
Preconditions
A completed delivery has valid, altered, expired and removed-recipient tokens.
Steps
Open every link and inspect download accounting.
Expected
The valid link redirects and is recorded; invalid cases receive the plain invalid-link page.
Data
Use the existing binding’s controlled fixture data.
Bound to
Source
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#redirects a valid link to the presigned file
10 Reference export follows selected columnsedgeapitest
Proves
BR-CAP-PFM-QRY-014-11
Preconditions
Questions include spouse references with and without identity columns and an empty result.
Steps
Export every selection.
Expected
Names remain display values, identities appear only when selected, and the empty result retains headings.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#writes the spouse’s name and, in its own column, the Spouse ID, as CSV
Source
services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#writes the spouse’s name and, in its own column, the Spouse ID, as CSV
11 A file contains the ordered answer beyond the first pageinteractionapiproposed
Proves
BR-CAP-PFM-QRY-002-01 BR-CAP-PFM-QRY-014-03
Preconditions
A contact question spans more than one page, with duplicate sort values and a foreign workspace control.
Steps
Run the first page and export the same on-screen definition.
Expected
The file matches the complete ordered local answer; later pages occur once and foreign records never appear.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js#confines a statement carrying no tenant predicate at all, so row-level security holds beneath the compiler,services-platform:modules/queries/tests/integration/services/exports/run-query-export.integration.spec.js#writes every planted row exactly once, in the query’s sort, with no gap
12 Report files use the shared file-access boundaryinteractionapiproposed
Proves
BR-CAP-PFM-QRY-013-01 BR-CAP-PFM-QRY-014-07
Preconditions
A requester has report use but another reader lacks export ownership and schedule authority.
Steps
Render a table report, follow it as the requester and request the same export as the unrelated reader.
Expected
The requester downloads the completed file and the unrelated reader receives not found.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/integration/services/rendering/report-exports.integration.spec.js#answers a colleague who may not see the private report 404, writing nothing,services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#answers 404 to a colleague who did not ask for it, even once the file exists
13 Retry reuses each recipient’s file deliveryinteractionapiproposed
Proves
BR-CAP-PFM-QRY-014-09 BR-CAP-PFM-QRY-015-08
Preconditions
A query schedule has two active recipients and a completed export.
Steps
Process the occurrence, retry it and follow one recipient link after that recipient loses membership.
Expected
Two recipient-keyed communications requests remain; the departed recipient receives the invalid-link page.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/integration/services/exports/query-export-routes.integration.spec.js#answers the plain page for a recipient no longer on the schedule,services-platform:modules/queries/tests/integration/services/schedules/scheduled-delivery.integration.spec.js#submits nothing new when the same run is run again

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.