@testomatio/reporter
Version:
Testomatio Reporter Client
62 lines (61 loc) • 2.1 kB
TypeScript
declare namespace _default {
export { saveArtifact as artifact };
export { logMessage as log };
export { addStep as step };
export { setKeyValue as keyValue };
export { setLabel as label };
export { linkTest };
export { linkJira };
}
export default _default;
/**
* Stores path to file as artifact and uploads it to the S3 storage
* @param {string | {path: string, type: string, name: string}} data - path to file or object with path, type and name
* @param {any} [context=null] - optional context parameter
* @returns {void}
*/
declare function saveArtifact(data: string | {
path: string;
type: string;
name: string;
}, context?: any): void;
/**
* Attach log message(s) to the test report
* @param {...any} args - log messages to attach
* @returns {void}
*/
declare function logMessage(...args: any[]): void;
/**
* Similar to "log" function but marks message in report as a step
* @param {string} message - step message
* @returns {void}
*/
declare function addStep(message: string): void;
/**
* Add key-value pair(s) to the test report
* @param {{[key: string]: string} | string} keyValue - object { key: value } (multiple props allowed) or key (string)
* @param {string|null} [value=null] - optional value when keyValue is a string
* @returns {void}
*/
declare function setKeyValue(keyValue: {
[key: string]: string;
} | string, value?: string | null): void;
/**
* Add a single label to the test report
* @param {string} key - label key (e.g. 'severity', 'feature', or just 'smoke' for labels without values)
* @param {string|null} [value=null] - optional label value (e.g. 'high', 'login')
* @returns {void}
*/
declare function setLabel(key: string, value?: string | null): void;
/**
* Add link(s) to the test report
* @param {...string} testIds - test IDs to link
* @returns {void}
*/
declare function linkTest(...testIds: string[]): void;
/**
* Add JIRA issue link(s) to the test report
* @param {...string} jiraIds - JIRA issue IDs to link
* @returns {void}
*/
declare function linkJira(...jiraIds: string[]): void;