Skip to content

Commit

Permalink
test: Add timeline test report
Browse files Browse the repository at this point in the history
Timeline report aggregates all the typical information you will need
into one report. Run tests and have a nice timeline of events you can
look back at to further verify everything looks ok.
  • Loading branch information
henrywang authored and martinpitt committed Dec 17, 2019
1 parent 80a8691 commit c8de041
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"del": "^5.1.0",
"faker": "^4.1.0",
"path": "^0.12.7",
"wdio-timeline-reporter": "^5.1.2",
"webdriverio": "^5.16.6"
},
"devDependencies": {
Expand Down
17 changes: 16 additions & 1 deletion test/end-to-end/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require("path");
const del = require("del");
const fs = require("fs");
const crypto = require("crypto");
const { TimelineService } = require('wdio-timeline-reporter/timeline-service');
// import commands to add them as browser and element scope commands
const commands = require("./utils/commands");

Expand Down Expand Up @@ -130,7 +131,7 @@ exports.config = {
// Services take over a specific job you don't want to take care of. They enhance
// your test setup with almost no effort. Unlike plugins, they don't add new
// commands. Instead, they hook themselves up into the test process.
// services: [],
services: [[TimelineService]],
//
// Framework you want to run your specs with.
// The following are supported: Mocha, Jasmine, and Cucumber
Expand All @@ -156,6 +157,20 @@ exports.config = {
return "xunit_report.xml";
}
}
],
[
"timeline",
{
outputDir: reportDir,
fileName: "timeline-reporter.html",
embedImages: true,
images: {
quality: 80,
resize: false,
reductionRatio: 2
},
screenshotStrategy: "before:click"
}
]
],

Expand Down

0 comments on commit c8de041

Please sign in to comment.