Skip to content

ATS-PFM-QRY-007Run a saved question for the current reader: Capability Test Specification

Markdown

ATS-PFM-QRY-007

Run a saved question for the current reader: 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 not-applicable
  • Validation covered
  • Permission covered
  • Edge gap: FND-PFM-QRY-057
  • Failure gap: FND-PFM-QRY-057
  • Boundary covered
  • Concurrency gap: FND-PFM-QRY-057
  • Invariant covered
  • Interaction covered

Test Scenarios

13 scenarios proving CAP-PFM-QRY-007; 11 bound to an existing test.

01 Shared questions retain runner accesspermissionapinegativetest
Proves
BR-CAP-PFM-QRY-007-01 INV-DOM-PFM-QRY-002-01
Preconditions
A shared query has readers with and without its dataset grant.
Steps
Execute as both readers.
Expected
The granted reader receives rows and the other receives 403.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs the organization’s query for a colleague who may query the dataset
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses to run it for a caller who may not query the dataset as 403, however it was shared
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses the run by the dataset’s own query permission, not by the sharing model [E2E-SQ-11]
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs the organization’s query for a colleague who may query the dataset
02 Run requests cannot replace the stored questionvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-007-02
Preconditions
A reusable question has stored paging.
Steps
Run with page changes, supplied criteria and an unsupported paging key.
Expected
Allowed paging merges; attempts to alter unsupported content return 400.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#takes the page size the caller asks for over the one the definition stored
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#counts every matching row and not the page, for a caller that asks for both a total and a smaller page
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a body carrying anything but the page as 400
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a page carrying a key the query language does not have as 400
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#takes the page size the caller asks for over the one the definition stored
03 Run-time declarations match their usesvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-007-03
Preconditions
A definition asks for a date value.
Steps
Save undeclared input use, an incompatible declaration and invalid parameter structure.
Expected
Each invalid definition returns a located 400 problem.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a save whose token is not declared as 400 naming the criterion
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a save whose declaration does not match its criterion as 400 at definition.parameters[0].dataType
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a save whose parameters are not a list as 400
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a save whose token is not declared as 400 naming the criterion
04 Run-time inputs are validated by nameboundaryapinegativetest
Proves
BR-CAP-PFM-QRY-007-04
Preconditions
A saved query requires a date input.
Steps
Run with a valid value, omission, incorrect type and unrequested name; supply a value to a query asking for none.
Expected
Only the valid input executes; other cases fail at the supplied or missing name.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs with the value given, answering only the contacts it keeps
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a run without the required value as 400 at parameters.updatedBefore
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a value of the wrong type as 400 at its key
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a key the query does not ask for as 400 at that key
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#keeps a text value exactly as sent, never trimmed by the boundary
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#runs with the value given, answering only the contacts it keeps
05 Refinement preserves the original populationinvariantapinegativetest
Proves
BR-CAP-PFM-QRY-007-05 INV-DOM-PFM-QRY-002-07
Preconditions
The stored question excludes some dataset rows.
Steps
Apply outside criteria, negation and an attempted scope change.
Expected
No excluded rows enter the result and the scope replacement is refused.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#never widens: criteria naming a contact outside the query answer none of it
services-platform:modules/queries/tests/e2e/reports.e2e.spec.js#refuses a refinement that states what only the saved query decides as 400
Source
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#narrows to the rows that also meet the refinement’s criteria
06 Readers can adapt displayed columnsruleapitest
Proves
BR-CAP-PFM-QRY-007-06
Preconditions
A saved question selects three fields.
Steps
Refine with other fields permitted by the dataset.
Expected
The same population is presented using the chosen replacement columns.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#answers the columns the refinement names instead of the stored ones, over the same rows
Source
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#answers the columns the refinement names instead of the stored ones, over the same rows
07 Refinement cannot answer required inputsvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-007-07
Preconditions
A saved question requires a run-time value.
Steps
Introduce a run-time token through refinement and omit the original required value.
Expected
Both uses are rejected.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#refuses criteria that ask for a value when run, which only a stored definition may
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#still asks for the value: a refinement does not stand in for a required parameter
Source
services-platform:modules/queries/tests/integration/services/saved-queries/run-with-refinement.integration.spec.js#refuses criteria that ask for a value when run, which only a stored definition may
08 Population paging is complete and resumableruleapitest
Proves
BR-CAP-PFM-QRY-007-08
Preconditions
A question matches two thousand six hundred contacts.
Steps
Enumerate identities, request exact and capped counts, then change criteria before cursor reuse.
Expected
Three ordered pages cover each identity once; counts mark caps and the changed-query cursor is rejected.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-record-ids.integration.spec.js#answers every planted contact once, none repeated and none missed, in record id order
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-record-ids.integration.spec.js#refuses a cursor taken before the criteria changed, rather than paging a mixture
Source
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-record-ids.integration.spec.js#answers three pages of 1,000, 1,000 and 600 ids
09 Population access is rebuilt for each personpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-007-09
Preconditions
Requested users include the disallowed status and customer cases.
Steps
Invoke population reading for each identity.
Expected
Invalid identities or access return access denied and invisible questions return not found.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/record-ids-invocation.integration.spec.js#refuses a user of another customer, who has no access to the tenant, as access_denied
services-platform:modules/queries/tests/integration/services/saved-queries/record-ids-invocation.integration.spec.js#answers saved_query_not_found for a colleague’s private saved query, which the owner may not open
Source
services-platform:modules/queries/tests/integration/services/saved-queries/record-ids-invocation.integration.spec.js#refuses a user who does not exist as access_denied
10 Unsuitable questions cannot become populationsvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-007-10
Preconditions
A question uses Recently Viewed.
Steps
Request its population and try a page beyond one thousand identities.
Expected
The question is invalid for populations and the page size is rejected.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/queries/tests/integration/services/saved-queries/record-ids-invocation.integration.spec.js#answers saved_query_invalid for a saved query of the person’s recently viewed records
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-record-ids.integration.spec.js#refuses a saved query of the person’s recently viewed records, which is no population
Source
services-platform:modules/queries/tests/integration/services/saved-queries/record-ids-invocation.integration.spec.js#answers saved_query_invalid for a saved query of the person’s recently viewed records
11 Population logs omit records and valuesinvariantapitest
Proves
BR-CAP-PFM-QRY-007-11
Preconditions
An application enumerates a saved question’s population.
Steps
Inspect its execution log output.
Expected
Query and dataset context remain while criterion values and record identities are absent.
Data
Use the existing binding’s controlled fixture data.
Bound to
Source
services-platform:modules/queries/tests/integration/services/saved-queries/saved-query-record-ids.integration.spec.js#logs the saved query and its dataset when the population is resolved
12 A colleague runs a shared question with personal valuesinteractionapinegativeproposed
Proves
BR-CAP-PFM-QRY-006-02 BR-CAP-PFM-QRY-007-01
Preconditions
Two users share one role and a saved personal-task question with a requested date.
Steps
Run the shared question as each user with the same date, then remove one user’s dataset grant and rerun.
Expected
Each successful answer contains that runner’s tasks; the revoked runner receives no result.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#answers not found for a role the caller does not hold, and excludes the record from the list [E2E-SQ-09],services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses to run it for a caller who may not query the dataset as 403, however it was shared
13 Finding a report does not grant joined datainteractionapinegativeproposed
Proves
BR-CAP-PFM-QRY-007-01 BR-CAP-PFM-QRY-011-03
Preconditions
A report uses a visible saved question whose base dataset is accessible but whose joined dataset is denied.
Steps
Find and open the report, then run its source question as the viewer.
Expected
Catalog discovery can succeed while the source execution refuses the inaccessible join.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses to run it for a caller who may not query the dataset as 403, however it was shared,services-platform:modules/queries/services/reports/report-library.ts:readableReports

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.