allure-js-commons 3.4.4 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/facade.js +19 -1
- package/dist/cjs/facade.js.map +1 -1
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model.js.map +1 -1
- package/dist/cjs/sdk/index.js +6 -0
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/cjs/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/cjs/sdk/reporter/types.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/cjs/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/cjs/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/cjs/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/cjs/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js +50 -11
- package/dist/cjs/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/cjs/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/cjs/sdk/runtime/types.js.map +1 -1
- package/dist/cjs/sdk/types.js.map +1 -1
- package/dist/cjs/sdk/utils.js +9 -1
- package/dist/cjs/sdk/utils.js.map +1 -1
- package/dist/esm/facade.js +15 -0
- package/dist/esm/facade.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/reporter/ReporterRuntime.js +91 -15
- package/dist/esm/sdk/reporter/ReporterRuntime.js.map +1 -1
- package/dist/esm/sdk/reporter/types.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js +4 -0
- package/dist/esm/sdk/reporter/writer/FileSystemWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js +6 -0
- package/dist/esm/sdk/reporter/writer/InMemoryWriter.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js +15 -1
- package/dist/esm/sdk/reporter/writer/MessageReader.js.map +1 -1
- package/dist/esm/sdk/reporter/writer/MessageWriter.js +3 -0
- package/dist/esm/sdk/reporter/writer/MessageWriter.js.map +1 -1
- package/dist/esm/sdk/runtime/MessageTestRuntime.js +50 -11
- package/dist/esm/sdk/runtime/MessageTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/NoopTestRuntime.js +31 -13
- package/dist/esm/sdk/runtime/NoopTestRuntime.js.map +1 -1
- package/dist/esm/sdk/runtime/types.js.map +1 -1
- package/dist/esm/sdk/types.js.map +1 -1
- package/dist/esm/sdk/utils.js +7 -0
- package/dist/esm/sdk/utils.js.map +1 -1
- package/dist/types/facade.d.ts +4 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/model.d.ts +10 -0
- package/dist/types/sdk/index.d.ts +2 -2
- package/dist/types/sdk/reporter/ReporterRuntime.d.ts +1 -0
- package/dist/types/sdk/reporter/types.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/FileSystemWriter.d.ts +2 -1
- package/dist/types/sdk/reporter/writer/InMemoryWriter.d.ts +3 -1
- package/dist/types/sdk/reporter/writer/MessageWriter.d.ts +2 -1
- package/dist/types/sdk/runtime/MessageTestRuntime.d.ts +4 -1
- package/dist/types/sdk/runtime/NoopTestRuntime.d.ts +3 -0
- package/dist/types/sdk/runtime/types.d.ts +4 -1
- package/dist/types/sdk/types.d.ts +23 -2
- package/dist/types/sdk/utils.d.ts +2 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReporterRuntime.js","names":["_nodePath","_interopRequireDefault","require","_path","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","set","has","TypeError","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","_classPrivateGetter","s","_assertClassBrand","_classPrivateFieldGet","get","n","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","currentStep","_get_currentStep","startStep","step","stepResult","createStepResult","steps","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","found","addAttachment","attachment","writer","isPath","path","fileExt","extname","fileName","buildAttachmentFileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","exports","_this","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_findParent","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","randomUuid","state","setScope","scope","getScope","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","Stage","FINISHED","scopeUuids","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","attachmentFileName","name","source","wrapInStep","timestamp","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","status","statusDetails","Buffer","from","content","encoding","root","getExecutionItem","_ref2","writtenFixtures","Set","deleteFixtureResult","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","Array","isArray","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n currentStep() {\n return this.#currentStep;\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n\n findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const fileExtension = options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined);\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n const attachment: Attachment = {\n name: attachmentName,\n source: attachmentFileName,\n type: options.contentType,\n };\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAoBA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AASA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AAAmD,SAAAD,uBAAAW,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA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QAAA,IAAlB,CAACjD,IAAI,EAAEjK,KAAK,CAAC,GAAAkN,KAAA;QACrE,IAAIJ,KAAK,CAACC,OAAO,CAAC/M,KAAK,CAAC,EAAE;UACxB,OAAOA,KAAK,CAACwK,GAAG,CAAE2C,CAAC,KAAM;YAAElD,IAAI;YAAEjK,KAAK,EAAEmN;UAAE,CAAC,CAAC,CAAC;QAC/C;QAEA,OAAO;UACLlD,IAAI;UACJjK;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA6jBF;AAAC2D,OAAA,CAAAuB,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ReporterRuntime.js","names":["_nodePath","_interopRequireDefault","require","_path","_model","_LifecycleState","_Notifier","_factory","_testplan","_utils","_attachments","_loader","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classPrivateMethodInitSpec","a","_checkPrivateRedeclaration","add","_classPrivateFieldInitSpec","set","has","TypeError","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","String","Number","_classPrivateGetter","s","_assertClassBrand","_classPrivateFieldGet","get","n","_runningSteps","WeakMap","_ShallowStepsStack_brand","WeakSet","ShallowStepsStack","constructor","currentStep","_get_currentStep","startStep","step","stepResult","createStepResult","steps","updateStep","updateFunc","console","error","stopStep","opts","stop","duration","result","start","undefined","pop","findStepByUuid","uuid","findRecursively","found","addAttachment","attachment","writer","isPath","path","fileExt","extname","fileName","buildAttachmentFileName","contentType","fileExtension","writeAttachmentFromPath","body","writeAttachment","exports","_this","DefaultStepStack","Map","stepsByRoot","clear","rootsByStep","rootUuid","maybeValue","delete","stepUuid","removeStep","newValue","_handleMetadataMessage","_handleStepMetadataMessage","_handleStartStepMessage","_handleStopStepMessage","_handleAttachmentContentMessage","_handleAttachmentPathMessage","_handleGlobalAttachmentContentMessage","_handleGlobalAttachmentPathMessage","_handleGlobalErrorMessage","_findParent","_writeAttachmentFile","_createAttachment","_createGlobalAttachment","_writeGlobals","_writeFixturesOfScope","_writeContainer","_calculateTimings","ReporterRuntime","_ref","_this2","listeners","environmentInfo","categories","links","globalLabels","LifecycleState","randomUuid","state","setScope","scope","getScope","concat","deleteScope","scopeUuid","type","fixtureResult","wrappedFixture","setFixtureResult","createFixtureResult","Date","now","fixtures","fixture","getFixtureResult","startStop","stage","Stage","FINISHED","scopeUuids","testResult","createTestResult","deepClone","notifier","beforeTestResultStart","tests","setTestResult","afterTestResultStart","getTestResult","beforeTestResultUpdate","afterTestResultUpdate","_testResult$testCaseI","_testResult$historyId","wrapped","getWrappedTestResult","beforeTestResultStop","labels","parameters","description","_testResult$descripti","descriptionHtml","_testResult$descripti2","testCaseId","getTestResultTestCaseId","historyId","getTestResultHistoryId","afterTestResultStop","hasSkipLabel","deleteTestResult","beforeTestResultWrite","writeResult","afterTestResultWrite","stepStack","parentStepUuid","parent","JSON","stringify","setStepResult","addStep","getStepResult","beforeStepStop","afterStepStop","attachmentName","attachmentContentOrPath","options","_options$fileExtensio","attachmentFileName","wrapInStep","timestamp","name","attachments","writeEnvironmentInfo","serializedCategories","map","c","messageRegex","RegExp","source","traceRegex","writeCategoriesDefinitions","messages","message","data","getWrappedFixtureResult","displayName","updateFixture","updateScope","linkConfig","formatLinks","updateTest","status","statusDetails","Buffer","from","content","encoding","attachmentContent","attachmentSource","errors","_message$fileExtensio","root","getExecutionItem","globals","writeGlobals","_ref2","writtenFixtures","Set","deleteFixtureResult","befores","afters","writeGroup","children","normalisedDuration","Math","max","round","resolveWriter","Notifier","Array","isArray","entries","flatMap","_ref3","v"],"sources":["../../../../src/sdk/reporter/ReporterRuntime.ts"],"sourcesContent":["/* eslint max-lines: 0 */\nimport path from \"node:path\";\nimport { extname } from \"path\";\nimport {\n type Attachment,\n type AttachmentOptions,\n type FixtureResult,\n type Globals,\n type Label,\n Stage,\n type StepResult,\n type TestResult,\n} from \"../../model.js\";\nimport type {\n Category,\n EnvironmentInfo,\n RuntimeAttachmentContentMessage,\n RuntimeAttachmentPathMessage,\n RuntimeGlobalAttachmentContentMessage,\n RuntimeGlobalAttachmentPathMessage,\n RuntimeGlobalErrorMessage,\n RuntimeMessage,\n RuntimeMetadataMessage,\n RuntimeStartStepMessage,\n RuntimeStepMetadataMessage,\n RuntimeStopStepMessage,\n} from \"../types.js\";\nimport { LifecycleState } from \"./LifecycleState.js\";\nimport { Notifier } from \"./Notifier.js\";\nimport { createFixtureResult, createStepResult, createTestResult } from \"./factory.js\";\nimport { hasSkipLabel } from \"./testplan.js\";\nimport type {\n FixtureResultWrapper,\n FixtureType,\n LinkConfig,\n ReporterRuntimeConfig,\n TestScope,\n Writer,\n} from \"./types.js\";\nimport { deepClone, formatLinks, getTestResultHistoryId, getTestResultTestCaseId, randomUuid } from \"./utils.js\";\nimport { buildAttachmentFileName } from \"./utils/attachments.js\";\nimport { resolveWriter } from \"./writer/loader.js\";\n\nexport interface StepStack {\n clear(): void;\n\n removeRoot(rootUuid: string): void;\n\n currentStep(rootUuid: string): string | undefined;\n\n addStep(rootUuid: string, stepUuid: string): void;\n\n removeStep(stepUuid: string): void;\n}\n\n/**\n * Simpler steps stack implementation that contains only the current steps without root nodes\n * Useful, when you need to create steps without binding them to a specific test or fixture\n * @example\n * ```js\n * const stack = new ShallowStepsStack();\n *\n * stack.startStep({ name: \"step 1\" });\n * stack.startStep({ name: \"step 1.1\" });\n * stack.stopStep({ status: Status.FAILED });\n * stack.stopStep({ status: Status.PASSED });\n * stack.steps // => [{ name: \"step 1\", status: Status.PASSED, steps: [{ name: \"step 1.1\", status: Status.FAILED }] }]\n * ```\n */\nexport class ShallowStepsStack {\n steps: StepResult[] = [];\n\n #runningSteps: StepResult[] = [];\n\n get #currentStep() {\n return this.#runningSteps[this.#runningSteps.length - 1];\n }\n\n currentStep() {\n return this.#currentStep;\n }\n\n startStep(step: Partial<StepResult>) {\n const stepResult: StepResult = {\n ...createStepResult(),\n ...step,\n };\n\n if (this.#currentStep) {\n this.#currentStep.steps.push(stepResult);\n } else {\n this.steps.push(stepResult);\n }\n\n this.#runningSteps.push(stepResult);\n }\n\n updateStep(updateFunc: (result: StepResult) => void) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to update!\");\n return;\n }\n\n updateFunc(this.#currentStep);\n }\n\n stopStep(opts?: { stop?: number; duration?: number }) {\n if (!this.#currentStep) {\n // eslint-disable-next-line no-console\n console.error(\"There is no running step in the stack to stop!\");\n return;\n }\n\n const { stop, duration = 0 } = opts ?? {};\n\n this.updateStep((result) => {\n result.stop = stop ?? result.start ? result.start! + duration : undefined;\n });\n\n this.#runningSteps.pop();\n }\n\n findStepByUuid(uuid: string): StepResult | undefined {\n const findRecursively = (steps: StepResult[]): StepResult | undefined => {\n for (const s of steps) {\n if (s.uuid === uuid) {\n return s;\n }\n const found = findRecursively(s.steps);\n if (found) {\n return found;\n }\n }\n return undefined;\n };\n return findRecursively(this.steps);\n }\n\n addAttachment(attachment: AttachmentOptions, writer: Writer) {\n const isPath = !!attachment.path;\n const fileExt = attachment.path ? path.extname(attachment.path) : undefined;\n const fileName = buildAttachmentFileName({\n contentType: attachment.contentType,\n fileExtension: fileExt,\n });\n if (isPath) {\n writer.writeAttachmentFromPath(fileName, attachment.path as string);\n } else if (attachment.body) {\n writer.writeAttachment(fileName, attachment.body);\n }\n return fileName;\n }\n}\n\nexport class DefaultStepStack implements StepStack {\n private stepsByRoot: Map<string, string[]> = new Map();\n private rootsByStep: Map<string, string> = new Map();\n\n clear = (): void => {\n this.stepsByRoot.clear();\n this.rootsByStep.clear();\n };\n\n removeRoot = (rootUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n this.stepsByRoot.delete(rootUuid);\n if (maybeValue) {\n maybeValue.forEach((stepUuid) => this.rootsByStep.delete(stepUuid));\n }\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n return maybeValue[maybeValue.length - 1];\n };\n\n addStep = (rootUuid: string, stepUuid: string): void => {\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n this.stepsByRoot.set(rootUuid, [stepUuid]);\n } else {\n maybeValue.push(stepUuid);\n }\n this.rootsByStep.set(stepUuid, rootUuid);\n };\n\n removeStep(stepUuid: string) {\n const rootUuid = this.rootsByStep.get(stepUuid);\n if (!rootUuid) {\n return;\n }\n const maybeValue = this.stepsByRoot.get(rootUuid);\n if (!maybeValue) {\n return;\n }\n const newValue = maybeValue.filter((value) => value !== stepUuid);\n this.stepsByRoot.set(rootUuid, newValue);\n }\n}\n\nexport class ReporterRuntime {\n private readonly state = new LifecycleState();\n private notifier: Notifier;\n private stepStack: StepStack = new DefaultStepStack();\n writer: Writer;\n categories?: Category[];\n environmentInfo?: EnvironmentInfo;\n linkConfig?: LinkConfig;\n globalLabels: Label[] = [];\n\n constructor({\n writer,\n listeners = [],\n environmentInfo,\n categories,\n links,\n globalLabels = {},\n }: ReporterRuntimeConfig) {\n this.writer = resolveWriter(writer);\n this.notifier = new Notifier({ listeners });\n this.categories = categories;\n this.environmentInfo = environmentInfo;\n this.linkConfig = links;\n\n if (Array.isArray(globalLabels)) {\n this.globalLabels = globalLabels;\n } else if (Object.keys(globalLabels).length) {\n this.globalLabels = Object.entries(globalLabels).flatMap(([name, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => ({ name, value: v }));\n }\n\n return {\n name,\n value,\n };\n });\n }\n }\n\n startScope = (): string => {\n const uuid = randomUuid();\n this.state.setScope(uuid);\n return uuid;\n };\n\n updateScope = (uuid: string, updateFunc: (scope: TestScope) => void): void => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not update scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(scope);\n };\n\n writeScope = (uuid: string) => {\n const scope = this.state.getScope(uuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not write scope: no scope with uuid ${uuid} is found`);\n return;\n }\n\n this.#writeFixturesOfScope(scope);\n this.state.deleteScope(scope.uuid);\n };\n\n startFixture = (scopeUuid: string, type: FixtureType, fixtureResult: Partial<FixtureResult>): string | undefined => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not start fixture: no scope with uuid ${scopeUuid} is found`);\n return;\n }\n\n const uuid = randomUuid();\n const wrappedFixture = this.state.setFixtureResult(scopeUuid, uuid, type, {\n ...createFixtureResult(),\n start: Date.now(),\n ...fixtureResult,\n });\n\n scope.fixtures.push(wrappedFixture);\n return uuid;\n };\n\n updateFixture = (uuid: string, updateFunc: (result: FixtureResult) => void): void => {\n const fixture = this.state.getFixtureResult(uuid);\n\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not update fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(fixture);\n };\n\n stopFixture = (uuid: string, opts?: { stop?: number; duration?: number }): void => {\n const fixture = this.state.getFixtureResult(uuid);\n if (!fixture) {\n // eslint-disable-next-line no-console\n console.error(`could not stop fixture: no fixture with uuid ${uuid} is found`);\n return;\n }\n\n const startStop = this.#calculateTimings(fixture.start, opts?.stop, opts?.duration);\n fixture.start = startStop.start;\n fixture.stop = startStop.stop;\n\n fixture.stage = Stage.FINISHED;\n };\n\n startTest = (result: Partial<TestResult>, scopeUuids: string[] = []): string => {\n const uuid = randomUuid();\n const testResult: TestResult = {\n ...createTestResult(uuid),\n start: Date.now(),\n ...deepClone(result),\n };\n\n this.notifier.beforeTestResultStart(testResult);\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n if (!scope) {\n // eslint-disable-next-line no-console\n console.error(`count not link test to the scope: no scope with uuid ${uuid} is found`);\n return;\n }\n scope.tests.push(uuid);\n });\n\n this.state.setTestResult(uuid, testResult, scopeUuids);\n this.notifier.afterTestResultStart(testResult);\n return uuid;\n };\n\n updateTest = (uuid: string, updateFunc: (result: TestResult) => void): void => {\n const testResult = this.state.getTestResult(uuid);\n\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not update test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n this.notifier.beforeTestResultUpdate(testResult);\n updateFunc(testResult);\n this.notifier.afterTestResultUpdate(testResult);\n };\n\n stopTest = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const wrapped = this.state.getWrappedTestResult(uuid);\n if (!wrapped) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test result: no test with uuid ${uuid}) is found`);\n return;\n }\n\n const testResult = wrapped.value;\n\n this.notifier.beforeTestResultStop(testResult);\n\n const scopeUuids = wrapped.scopeUuids;\n\n scopeUuids.forEach((scopeUuid) => {\n const scope = this.state.getScope(scopeUuid);\n\n if (scope?.labels) {\n testResult.labels = [...testResult.labels, ...scope.labels];\n }\n\n if (scope?.links) {\n testResult.links = [...testResult.links, ...scope.links];\n }\n\n if (scope?.parameters) {\n testResult.parameters = [...testResult.parameters, ...scope.parameters];\n }\n\n if (scope?.description) {\n testResult.description = testResult.description ?? scope.description;\n }\n\n if (scope?.descriptionHtml) {\n testResult.descriptionHtml = testResult.descriptionHtml ?? scope.descriptionHtml;\n }\n });\n\n testResult.labels = [...this.globalLabels, ...testResult.labels];\n\n testResult.testCaseId ??= getTestResultTestCaseId(testResult);\n testResult.historyId ??= getTestResultHistoryId(testResult);\n\n const startStop = this.#calculateTimings(testResult.start, opts?.stop, opts?.duration);\n\n testResult.start = startStop.start;\n testResult.stop = startStop.stop;\n\n this.notifier.afterTestResultStop(testResult);\n };\n\n writeTest = (uuid: string) => {\n const testResult = this.state.getTestResult(uuid);\n if (!testResult) {\n // eslint-disable-next-line no-console\n console.error(`could not write test result: no test with uuid ${uuid} is found`);\n return;\n }\n\n if (hasSkipLabel(testResult.labels)) {\n this.state.deleteTestResult(uuid);\n return;\n }\n\n this.notifier.beforeTestResultWrite(testResult);\n\n this.writer.writeResult(testResult);\n this.state.deleteTestResult(uuid);\n\n this.notifier.afterTestResultWrite(testResult);\n };\n\n currentStep = (rootUuid: string): string | undefined => {\n return this.stepStack.currentStep(rootUuid);\n };\n\n startStep = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n result: Partial<StepResult>,\n ): string | undefined => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not start test step: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n const stepResult: StepResult = {\n ...createStepResult(),\n start: Date.now(),\n ...result,\n };\n parent.steps.push(stepResult);\n const stepUuid = randomUuid();\n this.state.setStepResult(stepUuid, stepResult);\n\n this.stepStack.addStep(rootUuid, stepUuid);\n\n return stepUuid;\n };\n\n updateStep = (uuid: string, updateFunc: (stepResult: StepResult) => void) => {\n const step = this.state.getStepResult(uuid)!;\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not update test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n updateFunc(step);\n };\n\n stopStep = (uuid: string, opts?: { stop?: number; duration?: number }) => {\n const step = this.state.getStepResult(uuid);\n if (!step) {\n // eslint-disable-next-line no-console\n console.error(`could not stop test step: no step with uuid ${uuid} is found`);\n return;\n }\n\n this.notifier.beforeStepStop(step);\n\n const startStop = this.#calculateTimings(step.start, opts?.stop, opts?.duration);\n step.start = startStop.start;\n step.stop = startStop.stop;\n\n step.stage = Stage.FINISHED;\n\n this.stepStack.removeStep(uuid);\n\n this.notifier.afterStepStop(step);\n };\n\n writeAttachment = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n attachmentName: string,\n attachmentContentOrPath: Buffer | string,\n options: AttachmentOptions & { wrapInStep?: boolean; timestamp?: number },\n ) => {\n const parent = this.#findParent(rootUuid, parentStepUuid);\n if (!parent) {\n // eslint-disable-next-line no-console\n console.error(\n `could not write test attachment: no context for root ${rootUuid} and parentStepUuid ${JSON.stringify(parentStepUuid)} is found`,\n );\n return;\n }\n\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = this.#writeAttachmentFile(attachmentContentOrPath, {\n ...options,\n fileExtension: options.fileExtension ?? (isPath ? extname(attachmentContentOrPath) : undefined),\n });\n const attachment = this.#createAttachment(attachmentName, options.contentType, attachmentFileName);\n\n if (options.wrapInStep) {\n const { timestamp = Date.now() } = options;\n parent.steps.push({\n name: attachmentName,\n attachments: [attachment],\n start: timestamp,\n stop: timestamp,\n } as StepResult);\n } else {\n parent.attachments.push(attachment);\n }\n };\n\n writeEnvironmentInfo = () => {\n if (!this.environmentInfo) {\n return;\n }\n\n this.writer.writeEnvironmentInfo(this.environmentInfo);\n };\n\n writeCategoriesDefinitions = () => {\n if (!this.categories) {\n return;\n }\n\n const serializedCategories = this.categories.map((c) => {\n if (c.messageRegex instanceof RegExp) {\n c.messageRegex = c.messageRegex.source;\n }\n\n if (c.traceRegex instanceof RegExp) {\n c.traceRegex = c.traceRegex.source;\n }\n\n return c;\n });\n\n this.writer.writeCategoriesDefinitions(serializedCategories);\n };\n\n applyRuntimeMessages = (rootUuid: string, messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"metadata\":\n this.#handleMetadataMessage(rootUuid, message.data);\n return;\n case \"step_metadata\":\n this.#handleStepMetadataMessage(rootUuid, message.data);\n return;\n case \"step_start\":\n this.#handleStartStepMessage(rootUuid, message.data);\n return;\n case \"step_stop\":\n this.#handleStopStepMessage(rootUuid, message.data);\n return;\n case \"attachment_content\":\n this.#handleAttachmentContentMessage(rootUuid, message.data);\n return;\n case \"attachment_path\":\n this.#handleAttachmentPathMessage(rootUuid, message.data);\n return;\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n return;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n return;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n return;\n default:\n // eslint-disable-next-line no-console\n console.error(`could not apply runtime messages: unknown message ${JSON.stringify(message)}`);\n return;\n }\n });\n };\n\n applyGlobalRuntimeMessages = (messages: RuntimeMessage[]) => {\n messages.forEach((message) => {\n switch (message.type) {\n case \"global_attachment_content\":\n this.#handleGlobalAttachmentContentMessage(message.data);\n break;\n case \"global_attachment_path\":\n this.#handleGlobalAttachmentPathMessage(message.data);\n break;\n case \"global_error\":\n this.#handleGlobalErrorMessage(message.data);\n break;\n default:\n break;\n }\n });\n };\n\n #handleMetadataMessage = (rootUuid: string, message: RuntimeMetadataMessage[\"data\"]) => {\n // only display name could be set to fixture.\n const fixtureResult = this.state.getWrappedFixtureResult(rootUuid);\n const { links, labels, parameters, displayName, testCaseId, historyId, description, descriptionHtml } = message;\n\n if (fixtureResult) {\n if (displayName) {\n this.updateFixture(rootUuid, (result) => {\n result.name = displayName;\n });\n }\n\n if (historyId) {\n // eslint-disable-next-line no-console\n console.error(\"historyId can't be changed within test fixtures\");\n }\n if (testCaseId) {\n // eslint-disable-next-line no-console\n console.error(\"testCaseId can't be changed within test fixtures\");\n }\n\n if (links || labels || parameters || description || descriptionHtml) {\n // in some frameworks, afterEach methods can be executed before test stop event, while\n // in others after. To remove the possible undetermined behaviour we only allow\n // using runtime metadata API in before hooks.\n if (fixtureResult.type === \"after\") {\n // eslint-disable-next-line no-console\n console.error(\"metadata messages isn't supported for after test fixtures\");\n return;\n }\n\n this.updateScope(fixtureResult.scopeUuid, (scope) => {\n if (links) {\n scope.links = [...scope.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n scope.labels = [...scope.labels, ...labels];\n }\n if (parameters) {\n scope.parameters = [...scope.parameters, ...parameters];\n }\n if (description) {\n scope.description = description;\n }\n if (descriptionHtml) {\n scope.descriptionHtml = descriptionHtml;\n }\n });\n }\n\n return;\n }\n\n this.updateTest(rootUuid, (result) => {\n if (links) {\n result.links = [...result.links, ...(this.linkConfig ? formatLinks(this.linkConfig, links) : links)];\n }\n if (labels) {\n result.labels = [...result.labels, ...labels];\n }\n if (parameters) {\n result.parameters = [...result.parameters, ...parameters];\n }\n if (displayName) {\n result.name = displayName;\n }\n if (testCaseId) {\n result.testCaseId = testCaseId;\n }\n if (historyId) {\n result.historyId = historyId;\n }\n if (description) {\n result.description = description;\n }\n if (descriptionHtml) {\n result.descriptionHtml = descriptionHtml;\n }\n });\n };\n\n #handleStepMetadataMessage = (rootUuid: string, message: RuntimeStepMetadataMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step metadata message: no step is running\");\n return;\n }\n const { name, parameters } = message;\n this.updateStep(stepUuid, (stepResult) => {\n if (name) {\n stepResult.name = name;\n }\n if (parameters) {\n stepResult.parameters = [...stepResult.parameters, ...parameters];\n }\n });\n };\n\n #handleStartStepMessage = (rootUuid: string, message: RuntimeStartStepMessage[\"data\"]) => {\n this.startStep(rootUuid, undefined, { ...message });\n };\n\n #handleStopStepMessage = (rootUuid: string, message: RuntimeStopStepMessage[\"data\"]) => {\n const stepUuid = this.currentStep(rootUuid);\n if (!stepUuid) {\n // eslint-disable-next-line no-console\n console.error(\"could not handle step stop message: no step is running\");\n return;\n }\n this.updateStep(stepUuid, (result) => {\n if (message.status && !result.status) {\n result.status = message.status;\n }\n if (message.statusDetails) {\n result.statusDetails = { ...result.statusDetails, ...message.statusDetails };\n }\n });\n this.stopStep(stepUuid, { stop: message.stop });\n };\n\n #handleAttachmentContentMessage = (rootUuid: string, message: RuntimeAttachmentContentMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, Buffer.from(message.content, message.encoding), {\n encoding: message.encoding,\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleAttachmentPathMessage = (rootUuid: string, message: RuntimeAttachmentPathMessage[\"data\"]) => {\n this.writeAttachment(rootUuid, undefined, message.name, message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n wrapInStep: message.wrapInStep,\n timestamp: message.timestamp,\n });\n };\n\n #handleGlobalAttachmentContentMessage = (message: RuntimeGlobalAttachmentContentMessage[\"data\"]) => {\n const attachmentContent = Buffer.from(message.content, message.encoding);\n const attachmentSource = this.#writeAttachmentFile(attachmentContent, {\n contentType: message.contentType,\n fileExtension: message.fileExtension,\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalAttachmentPathMessage = (message: RuntimeGlobalAttachmentPathMessage[\"data\"]) => {\n const attachmentSource = this.#writeAttachmentFile(message.path, {\n contentType: message.contentType,\n fileExtension: message.fileExtension ?? extname(message.path),\n });\n\n this.#writeGlobals({\n attachments: [this.#createGlobalAttachment(message.name, message.contentType, attachmentSource)],\n errors: [],\n });\n };\n\n #handleGlobalErrorMessage = (message: RuntimeGlobalErrorMessage[\"data\"]) => {\n this.#writeGlobals({\n attachments: [],\n errors: [{ ...message, timestamp: Date.now() }],\n });\n };\n\n #findParent = (\n rootUuid: string,\n parentStepUuid: string | null | undefined,\n ): FixtureResult | TestResult | StepResult | undefined => {\n const root = this.state.getExecutionItem(rootUuid);\n if (!root) {\n return;\n }\n\n if (parentStepUuid === null) {\n return root;\n } else if (parentStepUuid === undefined) {\n const stepUuid = this.currentStep(rootUuid);\n return stepUuid ? this.state.getStepResult(stepUuid) : root;\n } else {\n return this.state.getStepResult(parentStepUuid);\n }\n };\n\n #writeAttachmentFile = (\n attachmentContentOrPath: Buffer | string,\n options: Pick<AttachmentOptions, \"contentType\" | \"fileExtension\">,\n ) => {\n const isPath = typeof attachmentContentOrPath === \"string\";\n const attachmentFileName = buildAttachmentFileName({\n contentType: options.contentType,\n fileExtension: options.fileExtension,\n });\n\n if (isPath) {\n this.writer.writeAttachmentFromPath(attachmentFileName, attachmentContentOrPath);\n } else {\n this.writer.writeAttachment(attachmentFileName, attachmentContentOrPath);\n }\n\n return attachmentFileName;\n };\n\n #createAttachment = (name: string, contentType: string, source: string): Attachment => ({\n name,\n source,\n type: contentType,\n });\n\n #createGlobalAttachment = (name: string, contentType: string, source: string): Globals[\"attachments\"][number] => ({\n ...this.#createAttachment(name, contentType, source),\n timestamp: Date.now(),\n });\n\n #writeGlobals = (globals: Globals): void => {\n this.writer.writeGlobals(`${randomUuid()}-globals.json`, globals);\n };\n\n #writeFixturesOfScope = ({ fixtures, tests }: TestScope) => {\n const writtenFixtures = new Set<string>();\n if (tests.length) {\n for (const wrappedFixture of fixtures) {\n if (!writtenFixtures.has(wrappedFixture.uuid)) {\n this.#writeContainer(tests, wrappedFixture);\n this.state.deleteFixtureResult(wrappedFixture.uuid);\n writtenFixtures.add(wrappedFixture.uuid);\n }\n }\n }\n };\n\n #writeContainer = (tests: string[], wrappedFixture: FixtureResultWrapper) => {\n const fixture = wrappedFixture.value;\n const befores = wrappedFixture.type === \"before\" ? [wrappedFixture.value] : [];\n const afters = wrappedFixture.type === \"after\" ? [wrappedFixture.value] : [];\n this.writer.writeGroup({\n uuid: wrappedFixture.uuid,\n name: fixture.name,\n children: [...new Set(tests)],\n befores,\n afters,\n });\n };\n\n #calculateTimings = (\n start?: number,\n stop?: number,\n duration?: number,\n ): {\n start?: number;\n stop?: number;\n } => {\n const result: { start?: number; stop?: number } = { start, stop };\n if (duration) {\n const normalisedDuration = Math.max(0, duration);\n if (result.stop !== undefined) {\n result.start = result.stop - normalisedDuration;\n } else if (result.start !== undefined) {\n result.stop = result.start + normalisedDuration;\n } else {\n result.stop = Date.now();\n result.start = result.stop - normalisedDuration;\n }\n } else {\n if (result.stop === undefined) {\n result.stop = Date.now();\n }\n if (result.start === undefined) {\n result.start = result.stop;\n }\n }\n return {\n start: result.start ? Math.round(result.start) : undefined,\n stop: result.stop ? Math.round(result.stop) : undefined,\n };\n };\n}\n"],"mappings":";;;;;;AACA,IAAAA,SAAA,GAAAC,sBA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AC,CAAC;QAC/C;QAEA,OAAO;UACLtD,IAAI;UACJ1K;QACF,CAAC;MACH,CAAC,CAAC;IACJ;EACF;AA8oBF;AAAC2D,OAAA,CAAA8B,eAAA,GAAAA,eAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"types.js","names":["ALLURE_METADATA_CONTENT_TYPE","exports","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE"],"sources":["../../../../src/sdk/reporter/types.ts"],"sourcesContent":["import type {\n FixtureResult,\n Globals,\n Label,\n LabelName,\n Link,\n LinkType,\n Parameter,\n StepResult,\n TestResult,\n TestResultContainer,\n} from \"../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../types.js\";\n\nexport const ALLURE_METADATA_CONTENT_TYPE = \"application/vnd.allure.metadata+json\";\nexport const ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE = \"application/vnd.allure.message+json\";\n\nexport interface LifecycleListener {\n beforeTestResultStart?: (result: TestResult) => void;\n\n afterTestResultStart?: (result: TestResult) => void;\n\n beforeTestResultStop?: (result: TestResult) => void;\n\n afterTestResultStop?: (result: TestResult) => void;\n\n beforeTestResultUpdate?: (result: TestResult) => void;\n\n afterTestResultUpdate?: (result: TestResult) => void;\n\n beforeTestResultWrite?: (result: TestResult) => void;\n\n afterTestResultWrite?: (result: TestResult) => void;\n\n beforeStepStop?: (result: StepResult) => void;\n\n afterStepStop?: (result: StepResult) => void;\n}\n\nexport type LinkTemplate = string | ((url: string) => string);\n\nexport type LinkTypeOptions = {\n urlTemplate: LinkTemplate;\n nameTemplate?: LinkTemplate;\n};\n\nexport type LinkConfig<TOpts extends LinkTypeOptions = LinkTypeOptions> = Partial<Record<LinkType, TOpts>> &\n Record<string, TOpts>;\n\nexport type WriterDescriptor = [cls: string, ...args: readonly unknown[]] | string;\n\nexport type GlobalLabelsConfig = Partial<Record<LabelName, string | string[]>> & Record<string, string | string[]>;\n\nexport interface ReporterConfig {\n readonly resultsDir?: string;\n readonly links?: LinkConfig;\n readonly globalLabels?: Label[] | GlobalLabelsConfig;\n readonly listeners?: LifecycleListener[];\n readonly environmentInfo?: EnvironmentInfo;\n readonly categories?: Category[];\n}\n\nexport interface ReporterRuntimeConfig extends Omit<ReporterConfig, \"resultsDir\"> {\n readonly writer: Writer | WriterDescriptor;\n}\n\nexport interface Writer {\n writeResult(result: TestResult): void;\n\n writeGroup(result: TestResultContainer): void;\n\n writeAttachment(distFileName: string, content: Buffer): void;\n\n writeAttachmentFromPath(distFileName: string, from: string): void;\n\n writeEnvironmentInfo(info: EnvironmentInfo): void;\n\n writeCategoriesDefinitions(categories: Category[]): void;\n\n writeGlobals(distFileName: string, info: Globals): void;\n}\n\nexport type TestScope = {\n uuid: string;\n tests: string[];\n fixtures: FixtureResultWrapper[];\n labels: Label[];\n links: Link[];\n parameters: Parameter[];\n description?: string;\n descriptionHtml?: string;\n};\n\nexport type FixtureType = \"before\" | \"after\";\n\nexport type FixtureResultWrapper = {\n uuid: string;\n value: FixtureResult;\n type: FixtureType;\n scopeUuid: string;\n};\n\nexport type TestResultWrapper = {\n value: TestResult;\n scopeUuids: string[];\n};\n"],"mappings":";;;;;;AAcO,IAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,sCAAsC;AAC3E,IAAME,mCAAmC,GAAAD,OAAA,CAAAC,mCAAA,GAAG,qCAAqC","ignoreList":[]}
|
|
@@ -39,6 +39,10 @@ class FileSystemWriter {
|
|
|
39
39
|
var path = this.buildPath("".concat(result.uuid, "-result.json"));
|
|
40
40
|
writeJson(path, result);
|
|
41
41
|
}
|
|
42
|
+
writeGlobals(distFileName, info) {
|
|
43
|
+
var path = this.buildPath(distFileName);
|
|
44
|
+
writeJson(path, info);
|
|
45
|
+
}
|
|
42
46
|
buildPath(name) {
|
|
43
47
|
(0, _nodeFs.mkdirSync)(this.config.resultsDir, {
|
|
44
48
|
recursive: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystemWriter.js","names":["_nodeFs","require","_nodePath","_envInfo","writeJson","path","data","writeFileSync","JSON","stringify","FileSystemWriter","constructor","config","writeAttachment","distFileName","content","buildPath","writeAttachmentFromPath","from","to","copyFileSync","writeEnvironmentInfo","info","text","stringifyEnvInfo","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","name","mkdirSync","resultsDir","recursive","join","exports"],"sources":["../../../../../src/sdk/reporter/writer/FileSystemWriter.ts"],"sourcesContent":["import { copyFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst writeJson = (path: string, data: unknown): void => {\n writeFileSync(path, JSON.stringify(data), \"utf-8\");\n};\n\nexport class FileSystemWriter implements Writer {\n constructor(private config: { resultsDir: string }) {}\n\n writeAttachment(distFileName: string, content: Buffer): void {\n const path = this.buildPath(distFileName);\n\n writeFileSync(path, content, \"utf-8\");\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n const to = this.buildPath(distFileName);\n\n copyFileSync(from, to);\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n const path = this.buildPath(\"environment.properties\");\n\n writeFileSync(path, text);\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n const path = this.buildPath(\"categories.json\");\n\n writeJson(path, categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n const path = this.buildPath(`${result.uuid}-container.json`);\n writeJson(path, result);\n }\n\n writeResult(result: TestResult): void {\n const path = this.buildPath(`${result.uuid}-result.json`);\n writeJson(path, result);\n }\n\n private buildPath(name: string): string {\n mkdirSync(this.config.resultsDir, {\n recursive: true,\n });\n return join(this.config.resultsDir, name);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,SAAS,GAAGA,CAACC,IAAY,EAAEC,IAAa,KAAW;EACvD,IAAAC,qBAAa,EAACF,IAAI,EAAEG,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,EAAE,OAAO,CAAC;AACpD,CAAC;AAEM,MAAMI,gBAAgB,CAAmB;EAC9CC,WAAWA,CAASC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAErDC,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAAQ;IAC3D,IAAMV,IAAI,GAAG,IAAI,CAACW,SAAS,CAACF,YAAY,CAAC;IAEzC,IAAAP,qBAAa,EAACF,IAAI,EAAEU,OAAO,EAAE,OAAO,CAAC;EACvC;EAEAE,uBAAuBA,CAACH,YAAoB,EAAEI,IAAY,EAAQ;IAChE,IAAMC,EAAE,GAAG,IAAI,CAACH,SAAS,CAACF,YAAY,CAAC;IAEvC,IAAAM,oBAAY,EAACF,IAAI,EAAEC,EAAE,CAAC;EACxB;EAEAE,oBAAoBA,CAACC,IAAqB,EAAQ;IAChD,IAAMC,IAAI,GAAG,IAAAC,yBAAgB,EAACF,IAAI,CAAC;IACnC,IAAMjB,IAAI,GAAG,IAAI,CAACW,SAAS,CAAC,wBAAwB,CAAC;IAErD,IAAAT,qBAAa,EAACF,IAAI,EAAEkB,IAAI,CAAC;EAC3B;EAEAE,0BAA0BA,CAACC,UAAsB,EAAQ;IACvD,IAAMrB,IAAI,GAAG,IAAI,CAACW,SAAS,CAAC,iBAAiB,CAAC;IAE9CZ,SAAS,CAACC,IAAI,EAAEqB,UAAU,CAAC;EAC7B;EAEAC,UAAUA,CAACC,MAA2B,EAAQ;IAC5C,IAAMvB,IAAI,GAAG,IAAI,CAACW,SAAS,IAAAa,MAAA,CAAID,MAAM,CAACE,IAAI,oBAAiB,CAAC;IAC5D1B,SAAS,CAACC,IAAI,EAAEuB,MAAM,CAAC;EACzB;EAEAG,WAAWA,CAACH,MAAkB,EAAQ;IACpC,IAAMvB,IAAI,GAAG,IAAI,CAACW,SAAS,IAAAa,MAAA,CAAID,MAAM,CAACE,IAAI,iBAAc,CAAC;IACzD1B,SAAS,CAACC,IAAI,EAAEuB,MAAM,CAAC;EACzB;
|
|
1
|
+
{"version":3,"file":"FileSystemWriter.js","names":["_nodeFs","require","_nodePath","_envInfo","writeJson","path","data","writeFileSync","JSON","stringify","FileSystemWriter","constructor","config","writeAttachment","distFileName","content","buildPath","writeAttachmentFromPath","from","to","copyFileSync","writeEnvironmentInfo","info","text","stringifyEnvInfo","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","writeGlobals","name","mkdirSync","resultsDir","recursive","join","exports"],"sources":["../../../../../src/sdk/reporter/writer/FileSystemWriter.ts"],"sourcesContent":["import { copyFileSync, mkdirSync, writeFileSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport type { Globals, TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst writeJson = (path: string, data: unknown): void => {\n writeFileSync(path, JSON.stringify(data), \"utf-8\");\n};\n\nexport class FileSystemWriter implements Writer {\n constructor(private config: { resultsDir: string }) {}\n\n writeAttachment(distFileName: string, content: Buffer): void {\n const path = this.buildPath(distFileName);\n\n writeFileSync(path, content, \"utf-8\");\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n const to = this.buildPath(distFileName);\n\n copyFileSync(from, to);\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n const path = this.buildPath(\"environment.properties\");\n\n writeFileSync(path, text);\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n const path = this.buildPath(\"categories.json\");\n\n writeJson(path, categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n const path = this.buildPath(`${result.uuid}-container.json`);\n writeJson(path, result);\n }\n\n writeResult(result: TestResult): void {\n const path = this.buildPath(`${result.uuid}-result.json`);\n writeJson(path, result);\n }\n\n writeGlobals(distFileName: string, info: Globals): void {\n const path = this.buildPath(distFileName);\n writeJson(path, info);\n }\n\n private buildPath(name: string): string {\n mkdirSync(this.config.resultsDir, {\n recursive: true,\n });\n return join(this.config.resultsDir, name);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAIA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,SAAS,GAAGA,CAACC,IAAY,EAAEC,IAAa,KAAW;EACvD,IAAAC,qBAAa,EAACF,IAAI,EAAEG,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,EAAE,OAAO,CAAC;AACpD,CAAC;AAEM,MAAMI,gBAAgB,CAAmB;EAC9CC,WAAWA,CAASC,MAA8B,EAAE;IAAA,KAAhCA,MAA8B,GAA9BA,MAA8B;EAAG;EAErDC,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAAQ;IAC3D,IAAMV,IAAI,GAAG,IAAI,CA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AS,EAAC,IAAI,CAACtB,MAAM,CAACuB,UAAU,EAAE;MAChCC,SAAS,EAAE;IACb,CAAC,CAAC;IACF,OAAO,IAAAC,cAAI,EAAC,IAAI,CAACzB,MAAM,CAACuB,UAAU,EAAEF,IAAI,CAAC;EAC3C;AACF;AAACK,OAAA,CAAA5B,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -15,6 +15,7 @@ class InMemoryWriter {
|
|
|
15
15
|
_defineProperty(this, "attachments", {});
|
|
16
16
|
_defineProperty(this, "categories", void 0);
|
|
17
17
|
_defineProperty(this, "envInfo", void 0);
|
|
18
|
+
_defineProperty(this, "globals", void 0);
|
|
18
19
|
}
|
|
19
20
|
writeGroup(result) {
|
|
20
21
|
this.groups.push(result);
|
|
@@ -34,6 +35,11 @@ class InMemoryWriter {
|
|
|
34
35
|
writeEnvironmentInfo(envInfo) {
|
|
35
36
|
this.envInfo = envInfo;
|
|
36
37
|
}
|
|
38
|
+
writeGlobals(distFileName, info) {
|
|
39
|
+
var _this$globals;
|
|
40
|
+
this.globals = (_this$globals = this.globals) !== null && _this$globals !== void 0 ? _this$globals : {};
|
|
41
|
+
this.globals[distFileName] = info;
|
|
42
|
+
}
|
|
37
43
|
}
|
|
38
44
|
exports.InMemoryWriter = InMemoryWriter;
|
|
39
45
|
//# sourceMappingURL=InMemoryWriter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryWriter.js","names":["_fs","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","InMemoryWriter","constructor","writeGroup","result","groups","push","writeResult","tests","writeAttachment","distFileName","content","attachments","writeAttachmentFromPath","from","readFileSync","writeCategoriesDefinitions","categories","writeEnvironmentInfo","envInfo","exports"],"sources":["../../../../../src/sdk/reporter/writer/InMemoryWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults, Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\n\nexport class InMemoryWriter implements Writer, AllureResults {\n public groups: TestResultContainer[] = [];\n public tests: TestResult[] = [];\n public attachments: Record<string, Buffer> = {};\n public categories?: Category[];\n public envInfo?: Record<string, string | undefined>;\n\n public writeGroup(result: TestResultContainer): void {\n this.groups.push(result);\n }\n\n public writeResult(result: TestResult): void {\n this.tests.push(result);\n }\n\n public writeAttachment(distFileName: string, content: Buffer): void {\n this.attachments[distFileName] = content;\n }\n\n public writeAttachmentFromPath(distFileName: string, from: string): void {\n this.attachments[distFileName] = readFileSync(from);\n }\n\n public writeCategoriesDefinitions(categories: Category[]): void {\n this.categories = categories;\n }\n\n public writeEnvironmentInfo(envInfo: EnvironmentInfo): void {\n this.envInfo = envInfo;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAAkC,SAAAC,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA,CAAA,YAAAK,SAAA,yEAAAd,CAAA,GAAAe,MAAA,GAAAC,MAAA,EAAAf,CAAA;AAK3B,MAAMgB,cAAc,CAAkC;EAAAC,YAAA;IAAApB,eAAA,iBACpB,EAAE;IAAAA,eAAA,gBACZ,EAAE;IAAAA,eAAA,sBACc,CAAC,CAAC;IAAAA,eAAA;IAAAA,eAAA;EAAA;
|
|
1
|
+
{"version":3,"file":"InMemoryWriter.js","names":["_fs","require","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","InMemoryWriter","constructor","writeGroup","result","groups","push","writeResult","tests","writeAttachment","distFileName","content","attachments","writeAttachmentFromPath","from","readFileSync","writeCategoriesDefinitions","categories","writeEnvironmentInfo","envInfo","writeGlobals","info","_this$globals","globals","exports"],"sources":["../../../../../src/sdk/reporter/writer/InMemoryWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { Globals, TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults, Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\n\nexport class InMemoryWriter implements Writer, AllureResults {\n public groups: TestResultContainer[] = [];\n public tests: TestResult[] = [];\n public attachments: Record<string, Buffer> = {};\n public categories?: Category[];\n public envInfo?: Record<string, string | undefined>;\n public globals?: Record<string, Globals>;\n\n public writeGroup(result: TestResultContainer): void {\n this.groups.push(result);\n }\n\n public writeResult(result: TestResult): void {\n this.tests.push(result);\n }\n\n public writeAttachment(distFileName: string, content: Buffer): void {\n this.attachments[distFileName] = content;\n }\n\n public writeAttachmentFromPath(distFileName: string, from: string): void {\n this.attachments[distFileName] = readFileSync(from);\n }\n\n public writeCategoriesDefinitions(categories: Category[]): void {\n this.categories = categories;\n }\n\n public writeEnvironmentInfo(envInfo: EnvironmentInfo): void {\n this.envInfo = envInfo;\n }\n\n public writeGlobals(distFileName: string, info: Globals): void {\n this.globals = this.globals ?? {};\n this.globals[distFileName] = info;\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1C;EAEOE,uBAAuBA,CAACH,YAAoB,EAAEI,IAAY,EAAQ;IACvE,IAAI,CAACF,WAAW,CAACF,YAAY,CAAC,GAAG,IAAAK,gBAAY,EAACD,IAAI,CAAC;EACrD;EAEOE,0BAA0BA,CAACC,UAAsB,EAAQ;IAC9D,IAAI,CAACA,UAAU,GAAGA,UAAU;EAC9B;EAEOC,oBAAoBA,CAACC,OAAwB,EAAQ;IAC1D,IAAI,CAACA,OAAO,GAAGA,OAAO;EACxB;EAEOC,YAAYA,CAACV,YAAoB,EAAEW,IAAa,EAAQ;IAAA,IAAAC,aAAA;IAC7D,IAAI,CAACC,OAAO,IAAAD,aAAA,GAAG,IAAI,CAACC,OAAO,cAAAD,aAAA,cAAAA,aAAA,GAAI,CAAC,CAAC;IACjC,IAAI,CAACC,OAAO,CAACb,YAAY,CAAC,GAAGW,IAAI;EACnC;AACF;AAACG,OAAA,CAAAvB,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -20,9 +20,11 @@ class MessageReader {
|
|
|
20
20
|
_defineProperty(this, "results", {
|
|
21
21
|
tests: [],
|
|
22
22
|
groups: [],
|
|
23
|
-
attachments: {}
|
|
23
|
+
attachments: {},
|
|
24
|
+
globals: {}
|
|
24
25
|
});
|
|
25
26
|
_defineProperty(this, "handleMessage", jsonMessage => {
|
|
27
|
+
var _this$results$globals;
|
|
26
28
|
var {
|
|
27
29
|
path,
|
|
28
30
|
type = "undefined",
|
|
@@ -38,6 +40,10 @@ class MessageReader {
|
|
|
38
40
|
case "attachment":
|
|
39
41
|
this.results.attachments[path] = data;
|
|
40
42
|
return;
|
|
43
|
+
case "globals":
|
|
44
|
+
this.results.globals = (_this$results$globals = this.results.globals) !== null && _this$results$globals !== void 0 ? _this$results$globals : {};
|
|
45
|
+
this.results.globals[path] = parseJsonResult(data);
|
|
46
|
+
return;
|
|
41
47
|
case "misc":
|
|
42
48
|
switch (path) {
|
|
43
49
|
case "environment.properties":
|
|
@@ -90,6 +96,14 @@ class MessageReader {
|
|
|
90
96
|
});
|
|
91
97
|
}
|
|
92
98
|
}
|
|
99
|
+
if (_this.results.globals) {
|
|
100
|
+
for (var _key of Object.keys(_this.results.globals)) {
|
|
101
|
+
yield (0, _facade.attachment)(_key, JSON.stringify(_this.results.globals[_key], null, 2), {
|
|
102
|
+
contentType: "application/json",
|
|
103
|
+
encoding: "utf-8"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
93
107
|
}));
|
|
94
108
|
}));
|
|
95
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageReader.js","names":["_facade","require","_envInfo","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_defineProperty","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","parseJsonResult","data","JSON","parse","Buffer","from","toString","MessageReader","constructor","_this","tests","groups","attachments","jsonMessage","path","type","results","push","envInfo","parseEnvInfo","categories","handleCustomMessage","step","attachment","stringify","stringifyEnvInfo","key","keys","content","contentType","encoding","tr","concat","uuid","trc","exports"],"sources":["../../../../../src/sdk/reporter/writer/MessageReader.ts"],"sourcesContent":["import { attachment, step } from \"../../../facade.js\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults } from \"../../types.js\";\nimport { parseEnvInfo, stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst parseJsonResult = <T>(data: string) => {\n return JSON.parse(Buffer.from(data, \"base64\").toString(\"utf-8\")) as T;\n};\n\nexport class MessageReader {\n readonly results: AllureResults = {\n tests: [],\n groups: [],\n attachments: {},\n };\n\n handleMessage = (jsonMessage: string) => {\n const { path, type = \"undefined\", data }: { path: string; type?: string; data: string } = JSON.parse(jsonMessage);\n\n switch (type) {\n case \"container\":\n this.results.groups.push(parseJsonResult<TestResultContainer>(data));\n return;\n case \"result\":\n this.results.tests.push(parseJsonResult<TestResult>(data));\n return;\n case \"attachment\":\n this.results.attachments[path] = data;\n return;\n case \"misc\":\n switch (path) {\n case \"environment.properties\":\n this.results.envInfo = parseEnvInfo(Buffer.from(data, \"base64\").toString());\n break;\n case \"categories.json\":\n this.results.categories = parseJsonResult(data);\n break;\n default:\n break;\n }\n return;\n default:\n this.handleCustomMessage(type, data, path);\n return;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n handleCustomMessage = (type: string, data: any, path: string) => {};\n\n attachResults = async () => {\n await step(\"allure-results\", async () => {\n if (this.results.categories) {\n await attachment(\"categories.json\", JSON.stringify(this.results.categories), \"application/json\");\n }\n if (this.results.envInfo) {\n await attachment(\"environment.properties\", stringifyEnvInfo(this.results.envInfo), \"text/plain\");\n }\n if (this.results.attachments) {\n for (const key of Object.keys(this.results.attachments)) {\n const content = this.results.attachments[key];\n await attachment(key, content, {\n contentType: \"text/plain\",\n encoding: \"base64\",\n });\n }\n }\n if (this.results.tests) {\n for (const tr of this.results.tests) {\n await attachment(`${tr.uuid}-result.json`, JSON.stringify(tr, null, 2), {\n contentType: \"application/json\",\n encoding: \"utf-8\",\n });\n }\n }\n if (this.results.groups) {\n for (const trc of this.results.groups) {\n await attachment(`${trc.uuid}-container.json`, JSON.stringify(trc, null, 2), {\n contentType: \"application/json\",\n encoding: \"utf-8\",\n });\n }\n }\n });\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AAAqE,SAAAE,mBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,cAAAC,CAAA,GAAAP,CAAA,CAAAK,CAAA,EAAAC,CAAA,GAAAE,CAAA,GAAAD,CAAA,CAAAE,KAAA,WAAAT,CAAA,gBAAAE,CAAA,CAAAF,CAAA,KAAAO,CAAA,CAAAG,IAAA,GAAAT,CAAA,CAAAO,C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AErE,IAAMgC,eAAe,GAAOC,IAAY,IAAK;EAC3C,OAAOC,IAAI,CAACC,KAAK,CAACC,MAAM,CAACC,IAAI,CAACJ,IAAI,EAAE,QAAQ,CAAC,CAACK,QAAQ,CAAC,OAAO,CAAC,CAAC;AAClE,CAAC;AAEM,MAAMC,aAAa,CAAC;EAAAC,YAAA;IAAA,IAAAC,KAAA;IAAAvB,eAAA,kBACS;MAChCwB,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,WAAW,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"MessageReader.js","names":["_facade","require","_envInfo","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","_defineProperty","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","parseJsonResult","data","JSON","parse","Buffer","from","toString","MessageReader","constructor","_this","tests","groups","attachments","globals","jsonMessage","_this$results$globals","path","type","results","push","envInfo","parseEnvInfo","categories","handleCustomMessage","step","attachment","stringify","stringifyEnvInfo","key","keys","content","contentType","encoding","tr","concat","uuid","trc","exports"],"sources":["../../../../../src/sdk/reporter/writer/MessageReader.ts"],"sourcesContent":["import { attachment, step } from \"../../../facade.js\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { AllureResults } from \"../../types.js\";\nimport { parseEnvInfo, stringifyEnvInfo } from \"../utils/envInfo.js\";\n\nconst parseJsonResult = <T>(data: string) => {\n return JSON.parse(Buffer.from(data, \"base64\").toString(\"utf-8\")) as T;\n};\n\nexport class MessageReader {\n readonly results: AllureResults = {\n tests: [],\n groups: [],\n attachments: {},\n globals: {},\n };\n\n handleMessage = (jsonMessage: string) => {\n const { path, type = \"undefined\", data }: { path: string; type?: string; data: string } = JSON.parse(jsonMessage);\n\n switch (type) {\n case \"container\":\n this.results.groups.push(parseJsonResult<TestResultContainer>(data));\n return;\n case \"result\":\n this.results.tests.push(parseJsonResult<TestResult>(data));\n return;\n case \"attachment\":\n this.results.attachments[path] = data;\n return;\n case \"globals\":\n this.results.globals = this.results.globals ?? {};\n this.results.globals[path] = parseJsonResult(data);\n return;\n case \"misc\":\n switch (path) {\n case \"environment.properties\":\n this.results.envInfo = parseEnvInfo(Buffer.from(data, \"base64\").toString());\n break;\n case \"categories.json\":\n this.results.categories = parseJsonResult(data);\n break;\n default:\n break;\n }\n return;\n default:\n this.handleCustomMessage(type, data, path);\n return;\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n handleCustomMessage = (type: string, data: any, path: string) => {};\n\n attachResults = async () => {\n await step(\"allure-results\", async () => {\n if (this.results.categories) {\n await attachment(\"categories.json\", JSON.stringify(this.results.categories), \"application/json\");\n }\n if (this.results.envInfo) {\n await attachment(\"environment.properties\", stringifyEnvInfo(this.results.envInfo), \"text/plain\");\n }\n if (this.results.attachments) {\n for (const key of Object.keys(this.results.attachments)) {\n const content = this.results.attachments[key];\n await attachment(key, content, {\n contentType: \"text/plain\",\n encoding: \"base64\",\n });\n }\n }\n if (this.results.tests) {\n for (const tr of this.results.tests) {\n await attachment(`${tr.uuid}-result.json`, JSON.stringify(tr, null, 2), {\n contentType: \"application/json\",\n encoding: \"utf-8\",\n });\n }\n }\n if (this.results.groups) {\n for (const trc of this.results.groups) {\n await attachment(`${trc.uuid}-container.json`, JSON.stringify(trc, null, 2), {\n contentType: \"application/json\",\n encoding: \"utf-8\",\n });\n }\n }\n if (this.results.globals) {\n for (const key of Object.keys(this.results.globals)) {\n await attachment(key, JSON.stringify(this.results.globals[key], null, 2), {\n contentType: \"application/json\",\n encoding: \"utf-8\",\n });\n }\n }\n });\n };\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AAAqE,SAAAE,mBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,EAAAC,CAA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kB;cAC/BC,QAAQ,EAAE;YACZ,CAAC,CAAC;UACJ;QACF;MACF,CAAC,EAAC;IACJ,CAAC;EAAA;AACH;AAACK,OAAA,CAAA9B,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -47,6 +47,9 @@ class MessageWriter {
|
|
|
47
47
|
writeResult(result) {
|
|
48
48
|
this.writeJson("".concat(result.uuid, "-result.json"), "result", result);
|
|
49
49
|
}
|
|
50
|
+
writeGlobals(distFileName, info) {
|
|
51
|
+
this.writeJson(distFileName, "globals", info);
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
exports.MessageWriter = MessageWriter;
|
|
52
55
|
//# sourceMappingURL=MessageWriter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageWriter.js","names":["_fs","require","_process","_interopRequireDefault","_envInfo","e","__esModule","default","MessageWriter","constructor","bus","sendData","path","type","data","_process$send","event","toString","emit","JSON","stringify","process","send","call","writeJson","Buffer","from","writeAttachment","distFileName","content","writeAttachmentFromPath","readFileSync","writeEnvironmentInfo","info","text","stringifyEnvInfo","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","exports"],"sources":["../../../../../src/sdk/reporter/writer/MessageWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { EventEmitter } from \"node:events\";\nimport process from \"process\";\nimport type { TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\ntype EventType = \"result\" | \"container\" | \"attachment\" | \"misc\";\n\nexport class MessageWriter implements Writer {\n constructor(private bus?: EventEmitter) {}\n\n private sendData(path: string, type: EventType, data: Buffer) {\n const event = { path, type, data: data.toString(\"base64\") };\n\n if (this.bus) {\n this.bus.emit(\"allureWriterMessage\", JSON.stringify(event));\n return;\n }\n\n process.send?.(JSON.stringify(event));\n }\n\n private writeJson(path: string, type: EventType, data: any) {\n this.sendData(path, type, Buffer.from(JSON.stringify(data), \"utf-8\"));\n }\n\n writeAttachment(distFileName: string, content: Buffer): void {\n this.sendData(distFileName, \"attachment\", content);\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n this.sendData(distFileName, \"attachment\", readFileSync(from));\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n\n this.sendData(\"environment.properties\", \"misc\", Buffer.from(text, \"utf-8\"));\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n this.writeJson(\"categories.json\", \"misc\", categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n this.writeJson(`${result.uuid}-container.json`, \"container\", result);\n }\n\n writeResult(result: TestResult): void {\n this.writeJson(`${result.uuid}-result.json`, \"result\", result);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AAAuD,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIhD,MAAMG,aAAa,CAAmB;EAC3CC,WAAWA,CAASC,GAAkB,EAAE;IAAA,KAApBA,GAAkB,GAAlBA,GAAkB;EAAG;EAEjCC,QAAQA,CAACC,IAAY,EAAEC,IAAe,EAAEC,IAAY,EAAE;IAAA,IAAAC,aAAA;IAC5D,IAAMC,KAAK,GAAG;MAAEJ,IAAI;MAAEC,IAAI;MAAEC,IAAI,EAAEA,IAAI,CAACG,QAAQ,CAAC,QAAQ;IAAE,CAAC;IAE3D,IAAI,IAAI,CAACP,GAAG,EAAE;MACZ,IAAI,CAACA,GAAG,CAACQ,IAAI,CAAC,qBAAqB,EAAEC,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,CAAC;MAC3D;IACF;IAEA,CAAAD,aAAA,GAAAM,gBAAO,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
1
|
+
{"version":3,"file":"MessageWriter.js","names":["_fs","require","_process","_interopRequireDefault","_envInfo","e","__esModule","default","MessageWriter","constructor","bus","sendData","path","type","data","_process$send","event","toString","emit","JSON","stringify","process","send","call","writeJson","Buffer","from","writeAttachment","distFileName","content","writeAttachmentFromPath","readFileSync","writeEnvironmentInfo","info","text","stringifyEnvInfo","writeCategoriesDefinitions","categories","writeGroup","result","concat","uuid","writeResult","writeGlobals","exports"],"sources":["../../../../../src/sdk/reporter/writer/MessageWriter.ts"],"sourcesContent":["import { readFileSync } from \"fs\";\nimport type { EventEmitter } from \"node:events\";\nimport process from \"process\";\nimport type { Globals, TestResult, TestResultContainer } from \"../../../model.js\";\nimport type { Category, EnvironmentInfo } from \"../../types.js\";\nimport type { Writer } from \"../types.js\";\nimport { stringifyEnvInfo } from \"../utils/envInfo.js\";\n\ntype EventType = \"result\" | \"container\" | \"attachment\" | \"misc\" | \"globals\";\n\nexport class MessageWriter implements Writer {\n constructor(private bus?: EventEmitter) {}\n\n private sendData(path: string, type: EventType, data: Buffer) {\n const event = { path, type, data: data.toString(\"base64\") };\n\n if (this.bus) {\n this.bus.emit(\"allureWriterMessage\", JSON.stringify(event));\n return;\n }\n\n process.send?.(JSON.stringify(event));\n }\n\n private writeJson(path: string, type: EventType, data: any) {\n this.sendData(path, type, Buffer.from(JSON.stringify(data), \"utf-8\"));\n }\n\n writeAttachment(distFileName: string, content: Buffer): void {\n this.sendData(distFileName, \"attachment\", content);\n }\n\n writeAttachmentFromPath(distFileName: string, from: string): void {\n this.sendData(distFileName, \"attachment\", readFileSync(from));\n }\n\n writeEnvironmentInfo(info: EnvironmentInfo): void {\n const text = stringifyEnvInfo(info);\n\n this.sendData(\"environment.properties\", \"misc\", Buffer.from(text, \"utf-8\"));\n }\n\n writeCategoriesDefinitions(categories: Category[]): void {\n this.writeJson(\"categories.json\", \"misc\", categories);\n }\n\n writeGroup(result: TestResultContainer): void {\n this.writeJson(`${result.uuid}-container.json`, \"container\", result);\n }\n\n writeResult(result: TestResult): void {\n this.writeJson(`${result.uuid}-result.json`, \"result\", result);\n }\n\n writeGlobals(distFileName: string, info: Globals): void {\n this.writeJson(distFileName, \"globals\", info);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAIA,IAAAG,QAAA,GAAAH,OAAA;AAAuD,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAIhD,MAAMG,aAAa,CAAmB;EAC3CC,WAAWA,CAASC,GAAkB,EAAE;IAAA,KAApBA,GAAkB,GAAlBA,GAAkB;EAAG;EAEjCC,QAAQA,CAACC,IAAY,EAAEC,IAAe,EAAEC,IAAY,EAAE;IAAA,IAAAC,aAAA;IAC5D,IAAMC,KAAK,GAAG;MAAEJ,IAAI;MAAEC,IAAI;MAAEC,IAAI,EAAEA,IAAI,CAACG,QAAQ,CAAC,QAAQ;IAAE,CAAC;IAE3D,IAAI,IAAI,CAACP,GAAG,EAAE;MACZ,IAAI,CAACA,GAAG,CAACQ,IAAI,CAAC,qBAAqB,EAAEC,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,CAAC;MAC3D;IACF;IAEA,CAAAD,aAAA,GAAAM,gBAAO,CAACC,IAAI,cAAAP,aAAA,eAAZA,aAAA,CAAAQ,IAAA,CAAAF,gBAAO,EAAQF,IAAI,CAACC,SAAS,CAACJ,KAAK,CAAC,CAAC;EACvC;EAEQQ,SAASA,CAACZ,IAAY,EAAEC,IAAe,EAAEC,IAAS,EAAE;IAC1D,IAAI,CAACH,QAAQ,CAACC,IAAI,EAAEC,IAAI,EAAEY,MAAM,CAACC,IAAI,CAACP,IAAI,CAACC,SAAS,CAACN,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;EACvE;EAEAa,eAAeA,CAACC,YAAoB,EAAEC,OAAe,EAA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