Skip to content

Commit

Permalink
Merge pull request #275 from deepakkamboj/AddStorageField
Browse files Browse the repository at this point in the history
feat(trx-generator.ts): adding storage field to unittest element as p…
  • Loading branch information
no23reason authored Sep 17, 2020
2 parents d3fe92b + c31e8dc commit 15fe77a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/trx-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ const renderTestSuiteResult = (
const unitTest = testDefinitionsNode
.ele("UnitTest")
.att("name", fullTestName)
.att("id", testId);
.att("id", testId)
.att("storage", filepath);
unitTest.ele("Execution").att("id", executionId);
unitTest
.ele("TestMethod")
Expand Down Expand Up @@ -221,16 +222,18 @@ const renderTestSuiteResult = (
const executionId = uuidv4();
const fullTestName = path.basename(testSuiteResult.testFilePath);
const time = new Date().toISOString();
const filepath = path.relative("./", testSuiteResult.testFilePath);

// Failed TestSuite
const unitTest = testDefinitionsNode
.ele("UnitTest")
.att("name", fullTestName)
.att("id", testId);
.att("id", testId)
.att("storage", filepath);
unitTest.ele("Execution").att("id", executionId);
unitTest
.ele("TestMethod")
.att("codeBase", `Jest_${fullTestName}`)
.att("codeBase", filepath)
.att("name", fullTestName)
.att("className", fullTestName);
// TestEntry
Expand Down

0 comments on commit 15fe77a

Please sign in to comment.