angular / protractor-timeline-plugin Goto Github PK
View Code? Open in Web Editor NEWGathers test timeline information and presents the output visually
License: MIT License
Gathers test timeline information and presents the output visually
License: MIT License
It would be great if an example output of this plugin is given in the readme file.
Thanks!
Timeline plugin currently has an ability to parse SauceLabs logs, but, would be a good idea to add support for BrowserStack? Thanks.
The timeline plugin doesn't work with protractor 3.3.0.
'executor' returns now a promise instead of a callback.
Here my fix, hope it helps:
// Override executor so that we get information about commands starting
// and stopping.
var originalExecute = browser.driver.executor_.execute;
browser.driver.executor_.execute = function(command) {
var timelineEvent = {
source: 'Test Process',
id: counter++,
command: command,
start: new Date().getTime(),
end: null
};
if (!self.testProcessSetTimeoutTimestamp &&
timelineEvent.command.name_ == 'setScriptTimeout') {
self.testProcessSetTimeoutTimestamp = timelineEvent.start;
}
self.timeline.push(timelineEvent);
return originalExecute.apply(browser.driver.executor_, [command]).then(function(res) {
timelineEvent.end = new Date().getTime();
return res;
});
};
I'm having problems viewing most timelines generated from this tool. I think I'm running into this underlying Google Visualization Issue.
google/google-visualization-issues#2269
I always seem to get this error in Chrome:
Cannot read property 'v' of undefined
when viewing in Firefox, I sometimes get a timeline chart, and sometimes get this error:
this.tp[0] is undefined
My recommendation to other users of this plugin: Take the JSON generated from this tool, but don't bother with the result.html file; instead, create your own reports.
If I find a good HTML snippet to use in place of result.html, I will post it in this thread.
When I run protractor with this plugin (or any of the first party plugins in my configuration file), I get an error saying:
E/launcher - Error: Cannot find module 'protractor-timeline-plugin'
My config file plugins section,
plugins: [{
package: 'protractor-timeline-plugin'
outdir: 'timelines',
outputHtmlFileName: 'results.html'
}]
It seems to work however if I install the plugin globally. Unfortunately installing globally isn't an option for me. Has this issue been seen previously/are there any known workarounds? Let me know if you need any more info or how I can help to debug it
Protractor version: "^4.0.10"
Moving to this repo from
Hi all,
When i run Protractor with the plugin in place the output files are created but the html doesnt load results,
Do you know the reason?
HTML loads empty (i have tried with Chrome, Safari, etc...)
JSON contains data:
[{"source":"Test Process","id":0,"command":{"name_":"getAvailableLogTypes","parameters_":{}},"start":1455414657512,"end":1455414657521},{"source":"Test Process","id":1,"command":{"name_":"maximizeWindow","parameters_":{}},"start":1455414657632,"end":1455414657938},{"source":"Test Process","id":2,"command":{"name_":"get","parameters_":{"url":"http://localhost:8100/"}},"start":1455414657940,"end":1455414658589},{"source":"Test Process","id":3,"command":{"name_":"switchToFrame","parameters_":{"id":null}},"start":1455414661598,"end":1455414661607},{"source":"Test Process","id":4,"command":{"name_":"executeScript","parameters_":{"script":"(function () {if (typeof axe === "object" && axe.version) { return; }var s = document.createElement("script");s.innerHTML = "/_! aXe v1.1.1\n * Copyright (c) 2015 Deque Systems, Inc.\n *\n * Your use of this Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * This entire copyright notice must appear in every copy of this file you\n * distribute or in any file that contains substantial portions of this source\n * code.\n */\n(function (window, document) {\n\n/_exported clone _/\n\n/__\n * Deeply clones an object or array\n * @param {Mixed} obj The object/array to clone\n * @return {Mixed} A clone of the initial object or array\n /\nfunction clone(obj) {\n\t'use strict';\n\tvar index, length,\n\t\tout = obj;\n\n\tif (obj !== null && typeof obj === 'object') {\n\t\tif (Array.isArray(obj)) {\n\t\t\tout = [];\n\t\t\tfor (index = 0, length = obj.length; index < length; index++) {\n\t\t\t\tout[index] = clone(obj[index]);\n\t\t\t}\n\t\t} else {\n\t\t\tout = {};\n\t\t\t// jshint forin: false\n\t\t\tfor (index in obj) {\n\t\t\t\tout[index] = clone(obj[index]);\n\t\t\t}\n\t\t}\n\t}\n\treturn out;\n}\n/_exported matchesSelector /\n/\n * Polyfill for Element#matches\n * @param {HTMLElement} node The element to test\n * @param {String} selector The selector to test element against\n * @return {Boolean}\n */\nvar matchesSelector = (function () {\n\t'use strict';\n\n\tvar method;\n\n\tfunction getMethod(win) {\n\n\t\tvar index, candidate,\n\t\t\telProto = win.Element.prototype,\n\t\t\tcandidates = ['matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector'],\n\t\t\tlength = candidates.length;\n\n\t\tfor (index = 0; index < length; index++) {\n\t\t\tcandidate =.........
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.