We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch test-results-parser@0.2.3 for the project I'm working on.
test-results-parser@0.2.3
This change allows exposing timestamp for a test suite from JUnit.
Here is the diff that solved my problem:
diff --git a/node_modules/test-results-parser/src/index.d.ts b/node_modules/test-results-parser/src/index.d.ts index f128d44..89c8ab5 100644 --- a/node_modules/test-results-parser/src/index.d.ts +++ b/node_modules/test-results-parser/src/index.d.ts @@ -22,6 +22,7 @@ export interface ITestSuite { errors: number; skipped: number; duration: number; + timestamp: string; status: string; tags: string[]; metadata: object; diff --git a/node_modules/test-results-parser/src/models/TestSuite.d.ts b/node_modules/test-results-parser/src/models/TestSuite.d.ts index 2a7628a..6bd9389 100644 --- a/node_modules/test-results-parser/src/models/TestSuite.d.ts +++ b/node_modules/test-results-parser/src/models/TestSuite.d.ts @@ -8,6 +8,7 @@ declare class TestSuite { errors: number; skipped: number; duration: number; + timestamp: string; status: string; tags: string[]; metadata: object; diff --git a/node_modules/test-results-parser/src/models/TestSuite.js b/node_modules/test-results-parser/src/models/TestSuite.js index 776c56f..182be8e 100644 --- a/node_modules/test-results-parser/src/models/TestSuite.js +++ b/node_modules/test-results-parser/src/models/TestSuite.js @@ -9,6 +9,7 @@ class TestSuite { this.errors = 0; this.skipped = 0; this.duration = 0; + this.timestamp = ''; this.status = 'NA'; this.tags = []; this.metadata = {}; diff --git a/node_modules/test-results-parser/src/parsers/junit.js b/node_modules/test-results-parser/src/parsers/junit.js index 073d7a6..48f54a8 100644 --- a/node_modules/test-results-parser/src/parsers/junit.js +++ b/node_modules/test-results-parser/src/parsers/junit.js @@ -62,6 +62,7 @@ function getTestSuite(rawSuite) { suite.total = suite.total - suite.skipped; suite.passed = suite.total - suite.failed - suite.errors; suite.duration = rawSuite["@_time"] * 1000; + suite.timestamp = rawSuite["@_timestamp"]; suite.status = suite.total === suite.passed ? 'PASS' : 'FAIL'; setMetaData(rawSuite, suite); const raw_test_cases = rawSuite.testcase;
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
test-results-parser@0.2.3
for the project I'm working on.This change allows exposing timestamp for a test suite from JUnit.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: