UNPKG

playwright-trx-reporter

Version:

TRX reporter for playwright

185 lines (184 loc) 6.5 kB
"use strict"; // basically we just keep the same as xsd. // The difference: // - ResultSummary has a type // - Times has a type // make something from optional to required. Object.defineProperty(exports, "__esModule", { value: true }); exports.CountersType = exports.TestOutcome = exports.TestRunType = exports.Times = exports.ResultsType = exports.OutputType = exports.TestListType = exports.TestEntriesType = exports.TestEntryType = exports.TestDefinitionType = exports.UnitTestResultType = exports.TestResultAggregationType = exports.TestResultType = exports.UnitTestType = exports.WorkItemIDsType = exports.ResultSummary = exports.UNIT_TEST_TYPE = void 0; exports.UNIT_TEST_TYPE = '13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b'; class ResultFilesType { } class ResultSummary { constructor(props) { this.$outcome = props.$outcome; this.Counters = props.Counters; } } exports.ResultSummary = ResultSummary; class WorkItemIDsType { } exports.WorkItemIDsType = WorkItemIDsType; class BaseTestType { constructor(props) { this.$enabled = props.$enabled; this.$id = props.$id; this.$name = props.$name; this.$isGroupable = props.$isGroupable; this.$priority = props.$priority; this.$namedCategory = props.$namedCategory; this.$storage = props.$storage; this.Owners = props.Owners; this.Description = props.Description; this.Execution = props.Execution; this.WorkItemIDs = props.WorkItemIDs; } } class UnitTestType extends BaseTestType { constructor(props) { super(props); this.TestMethod = props.TestMethod; } } exports.UnitTestType = UnitTestType; class TestResultType { constructor(props) { this.$testName = props.$testName; this.$testType = props.$testType; this.$testId = props.$testId; this.$executionId = props.$executionId; // this.$parentExecutionId = props.$parentExecutionId; this.$testListId = props.$testListId; this.$outcome = props.$outcome; this.$computerName = props.$computerName; // this.$relativeResultsDirectory = props.$relativeResultsDirectory; this.$startTime = props.$startTime; this.$endTime = props.$endTime; this.$duration = props.$duration; // this.$spoolMessage = props.$spoolMessage; // this.$processExitCode = props.$processExitCode; // this.$isAborted = props.$isAborted; // this.$relativeTestOutputDirectory = props.$relativeTestOutputDirectory; this.Output = props.Output; this.ResultFiles = props.ResultFiles; } } exports.TestResultType = TestResultType; class TestResultAggregationType extends TestResultType { // InnerResults?: ResultsType; constructor(props) { super(props); this.Counters = props.Counters; // this.InnerResults = props.InnerResults ; } } exports.TestResultAggregationType = TestResultAggregationType; class UnitTestResultType extends TestResultAggregationType { // eslint-disable-next-line @typescript-eslint/no-useless-constructor constructor(props) { super(props); } } exports.UnitTestResultType = UnitTestResultType; class TestDefinitionType { constructor(props) { this.UnitTest = props.UnitTest; } } exports.TestDefinitionType = TestDefinitionType; class TestEntryType { // $isTransparent?: boolean; constructor(props) { // this.TcmInformation = (props.TcmInformation) ? new TcmInformationType(props.TcmInformation) : undefined; this.TestEntries = props.TestEntries; this.$testId = props.$testId; this.$executionId = props.$executionId; // this.$parentExecutionId = props.$parentExecutionId; this.$testListId = props.$testListId; // this.$isTransparent = props.$isTransparent; } } exports.TestEntryType = TestEntryType; class TestEntriesType { constructor(props) { this.TestEntry = props.TestEntry; } } exports.TestEntriesType = TestEntriesType; class TestListType { constructor(props) { // this.RunConfiguration = (props.RunConfiguration) ? new LinkType(props.RunConfiguration) : undefined; // this.TestLinks = props.TestLinks?.map(o => new LinkType(o)); this.$id = props.$id; this.$name = props.$name; this.$enabled = props.$enabled; this.$parentListId = props.$parentListId; } } exports.TestListType = TestListType; class OutputType { } exports.OutputType = OutputType; class ResultsType { constructor(props) { this.UnitTestResult = props.UnitTestResult; } } exports.ResultsType = ResultsType; class Times { constructor(props) { this.$creation = props.$creation; this.$queuing = props.$queuing; this.$start = props.$start; this.$finish = props.$finish; } } exports.Times = Times; class TestRunType { constructor(props) { this.$xmlns = 'http://microsoft.com/schemas/VisualStudio/TeamTest/2010'; this.$id = props.$id; this.$name = props.$name; this.$runUser = props.$runUser; // this.$tcmPassId = props.$tcmPassId; } } exports.TestRunType = TestRunType; var TestOutcome; (function (TestOutcome) { TestOutcome["Error"] = "Error"; TestOutcome["Failed"] = "Failed"; TestOutcome["Timeout"] = "Timeout"; TestOutcome["Aborted"] = "Aborted"; TestOutcome["Inconclusive"] = "Inconclusive"; TestOutcome["PassedButRunAborted"] = "PassedButRunAborted"; TestOutcome["NotRunnable"] = "NotRunnable"; TestOutcome["NotExecuted"] = "NotExecuted"; TestOutcome["Disconnected"] = "Disconnected"; TestOutcome["Warning"] = "Warning"; TestOutcome["Passed"] = "Passed"; TestOutcome["Completed"] = "Completed"; TestOutcome["InProgress"] = "InProgress"; TestOutcome["Pending"] = "Pending"; })(TestOutcome || (exports.TestOutcome = TestOutcome = {})); class CountersType { constructor() { this.$total = 0; this.$executed = 0; this.$passed = 0; this.$failed = 0; this.$error = 0; this.$timeout = 0; this.$aborted = 0; this.$inconclusive = 0; this.$passedButRunAborted = 0; this.$notRunnable = 0; this.$notExecuted = 0; this.$disconnected = 0; this.$warning = 0; this.$completed = 0; this.$inProgress = 0; this.$pending = 0; } } exports.CountersType = CountersType;