OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

analytics.query.execute.test

Verifies query execution

  • Type: test-spec (test-spec)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.analytics-dashboard
  • Tags: analytics, query, test
  • File: packages/examples/analytics-dashboard/src/query/query.test-spec.ts
  • field.key.label
    analytics.query.execute.test
    field.version.label
    1.0.0
    field.type.label
    test-spec (test-spec)
    field.title.label
    analytics.query.execute.test
    field.description.label

    Verifies query execution

  • Type: test-spec (test-spec)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @example.analytics-dashboard
  • Tags: analytics, query, test
  • File: packages/examples/analytics-dashboard/src/query/query.test-spec.ts
  • field.tags.label
    analytics,query,test
    field.owners.label
    @example.analytics-dashboard
    field.stability.label
    stable

    Verifies query execution

    Source Definition

    import { defineTestSpec } from '@lssm-tech/lib.contracts-spec/tests';
    
    export const ExecuteQueryTest = defineTestSpec({
    	meta: {
    		key: 'analytics.query.execute.test',
    		version: '1.0.0',
    		title: 'Execute Query Test',
    		description: 'Verifies query execution',
    		owners: ['@example.analytics-dashboard'],
    		tags: ['analytics', 'query', 'test'],
    		stability: 'stable',
    	},
    	target: {
    		type: 'operation',
    		operation: { key: 'analytics.query.execute', version: '1.0.0' },
    	},
    	scenarios: [
    		{
    			key: 'success',
    			description: 'Successfully execute query',
    			when: {
    				operation: { key: 'analytics.query.execute', version: '1.0.0' },
    				input: {
    					queryId: 'q-123',
    					params: { limit: 10 },
    				},
    			},
    			then: [
    				{
    					type: 'expectOutput',
    					match: {
    						rowCount: 1,
    					},
    				},
    			],
    		},
    		{
    			key: 'error-query-not-found',
    			description: 'Fail when query not found',
    			when: {
    				operation: { key: 'analytics.query.execute', version: '1.0.0' },
    				input: {
    					queryId: 'q-999',
    					params: {},
    				},
    			},
    			then: [
    				{
    					type: 'expectError',
    					messageIncludes: 'NOT_FOUND',
    				},
    			],
    		},
    	],
    });