@testomatio/reporter
Version:
Testomatio Reporter Client
83 lines (82 loc) • 3.01 kB
TypeScript
/**
* Enhanced NUnit XML Parser that properly handles test-suite hierarchy
* and parameterized tests
*/
export class NUnitXmlParser {
constructor(options?: {});
options: {};
tests: any[];
stats: {
total: number;
passed: number;
failed: number;
skipped: number;
inconclusive: number;
};
/**
* Parse NUnit XML test-run structure
* @param {Object} testRun - Parsed XML test-run object
* @returns {Object} - Parsed test results
*/
parseTestRun(testRun: any): any;
/**
* Recursively parse test-suite elements based on their type
* @param {Object|Array} testSuite - Test suite object or array
* @param {Array} parentPath - Current path in the hierarchy
*/
parseTestSuite(testSuite: any | any[], parentPath?: any[]): void;
/**
* Process child elements of a test suite
* @param {Object} testSuite - Test suite object
* @param {Array} currentPath - Current path in hierarchy
*/
processChildren(testSuite: any, currentPath: any[]): void;
/**
* Parse test-case elements (actual tests)
* @param {Object|Array} testCases - Test case object or array
* @param {Array} suitePath - Path to the test suite
* @param {Object} parentSuite - Parent test suite for context
*/
parseTestCases(testCases: any | any[], suitePath: any[], parentSuite: any): void;
/**
* Parse individual test case
* @param {Object} testCase - Test case object
* @param {Array} suitePath - Path to the test suite
* @param {Object} parentSuite - Parent test suite for context
* @returns {Object|null} - Parsed test object
*/
parseTestCase(testCase: any, suitePath: any[], parentSuite: any): any | null;
/**
* Extract method name and parameters from test name
* @param {string} testName - Full test name
* @returns {Object} - Extracted information
*/
extractParameters(testName: string): any;
/**
* Parse parameter string into array of parameters
* @param {string} paramString - Parameter string
* @returns {Array} - Array of parameters
*/
parseParameterString(paramString: string): any[];
/**
* Extract method name from test name (fallback)
* @param {string} testName - Test name
* @returns {string} - Method name
*/
extractMethodName(testName: string): string;
/**
* Build file path from suite path and class name
* @param {Array} suitePath - Suite path array
* @param {string} className - Class name
* @param {Object} parentSuite - Parent suite for context
* @returns {string} - File path
*/
buildFilePath(suitePath: any[], className: string, parentSuite: any): string;
/**
* Group parameterized tests by base method name
* @param {Array} tests - Array of parsed tests
* @returns {Object} - Grouped tests
*/
groupParameterizedTests(tests: any[]): any;
}
export default NUnitXmlParser;