mlison / protractor-jasmine2-screenshot-reporter Goto Github PK
View Code? Open in Web Editor NEWProtractor screenshot reporter for Jasmine2
Home Page: https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter
License: MIT License
Protractor screenshot reporter for Jasmine2
Home Page: https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter
License: MIT License
When I set cleanDestination to true, I am still seeing reports from previous runs in current run report file.
In the latest version 0.3.1 the issue #10 is not solved for me. As it is a closed issue I'm cross-posting my investigation here.
I've tracked it down to beforeLaunch and thus cleanDestination() not being called. How are these functions supposed to be called? I'd imagine they should be called from the jasmineStarted hook no?
Is this a jasmine misbehavior?
For last 'it' the screenshot is not taken:
The below is my config setting
onPrepare: function() {
jasmine.getEnv().addReporter(new HtmlScreenshotReporter({dest: 'target/screenshots',filename: 'my-report.html'}));
}
Code sample:
describe('super calculator actions' , function(){
var CalculatorPage = require('./Calc_Page.js');
it('addtion',function(){
CalculatorPage.navigate();
CalculatorPage.EnterFirst(3);
CalculatorPage.SelectOperator("ADDITION");
CalculatorPage.EnterSecond(4);
CalculatorPage.ClickGo();
var actualVal = element(by.binding('latest')).getText();
expect(actualVal).toEqual('7');
});
it('verify history',function(){
var eleHistory = element.all(by.repeater('result in memory'));
expect(eleHistory.get(0).getText()).toContain('3 + 4 7');
});
});
for last one 'verify history' the screen shot is not taken. any inputs for this?
When using the reporter to capture only failed specs, the html structure is incorrect. It first displayes my describe blocks and then, as a new list, the it-blocks of the describe-blocks.
It was working fine in my windows machine and screwed up with this error after switching to Mac.
.Failed to get screenshot: UnknownError: unknown error: cannot take screenshot
from unknown error: Failed to capture tab: unknown error
JavaScript stack:
Error: Failed to capture tab: unknown error
at checkForExtensionError (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:14:17)
at Object.callback (chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/background.js:37:5)
at safeCallbackApply (extensions::sendRequest:21:15)
at handleResponse (extensions::sendRequest:72:7)
(Session info: chrome=45.0.2454.93)
(Driver info: chromedriver=2.15.322455 (ae8db840dac8d0c453355d3d922c91adfb61df8f),platform=Mac OS X 10.10.5 x86_64)
Hi,
I'm trying out protractor reporting tools and I successfully got a report with screenshots using this when I was in Windows but using the same specs and config files in Ubuntu, I'm only able to get the report with incorrect data and no screenshot was generated.
Could you please advise. Thank you.
Are there any options in order to change the screenshots name?
I want to have a history of runs and would like to see when a test last passed or failed as compared to the latest run.
Here is my spec:
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
savePath: './reports/e2e/protractor-result',
screenshotsFolder: '//screenshots'
}));
When creating a test the last 'it' will not produce a link to the produced screenshot. I have tested this by changing the number used:
When one 'it's are used - it will not produce a link.
When two 'it's are used - the second will not produce a link.
When three 'it's are used - the third will not produce a link.
I have provided screenshots which shows each of these scenarios. I have managed to workaround this issue by creating a 'dummy' it at the end of the test file.
Please add option that will be saving screenshots for failed specs only.
There are mainly two problems on windows machines if you are running protractor with this reporter:
Having upgraded to 0.30 my dest directory is no longer being created automatically. The first time the reporter attempts to access it fails. If I create the dest directory manually the reporter works fine.
Protractor Config:
jasmine.getEnv().addReporter(
new HtmlScreenshotReporter({
dest: 'target/screenshots/',
cleanDestination: true,
filename: 'E2E-test-report.html',
ignoreSkippedSpecs: true,
captureOnlyFailedSpecs: true,
showSummary: true
})
);
Npm config :
"protractor": "^3.0.0",
"protractor-jasmine2-screenshot-reporter": "^0.3.0",
"jasmine-core": "^2.4.1",
"jasmine-reporters": "^2.1.1",
"selenium-webdriver": "^2.48.2",
"webdriver-manager": "^8.0.0"
If I revert to 0.20 and do nothing else, the problem goes away.
Error :
[firefox #2] .Error: ENOENT: no such file or directory, open 'target/screenshots/E2E-test-report.html'
[firefox #2] at Error (native)
[firefox #2] at Object.fs.openSync (fs.js:549:18)
[firefox #2] at Object.fs.writeFileSync (fs.js:1155:15)
[firefox #2] at Object.fs.appendFileSync (fs.js:1203:6)
[firefox #2] at Jasmine2ScreenShotReporter.jasmineDone (/mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/protractor-jasmine2-screenshot-reporter/index.js:482:10)
[firefox #2] at dispatch (/mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1869:28)
[firefox #2] at /mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1852:11
[firefox #2] at QueueRunner.clearStack (/mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
[firefox #2] at QueueRunner.run (/mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
[firefox #2] at /mnt/storage/dev_workspace_performance/workspace/Projects/shoal-platform/shoal-client/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
When there are multiple spec files to be run, only the specs from the last spec file are recorded in the html output.
Issue:
If I set "ignoreSkippedSpecs" to "true" and then, in my spec files, use "fit" or "fdescribe" to only run a single test/block of tests, the screenshot reporter still creates screenshots for all of the tests in my suite, even though only a fraction of those are being executed.
For example, I have a suite with 82 tests. I only run 3 of those, by marking the desired tests with "fit". Protractor only executes the 3 marked tests, skipping everything else, but the screenshot reporter puts 82 screenshots in the destination directory, and creates a report that references all 82 tests as though they had all been run. Most of these screenshots are not at all appropriate to the tests they're mapped to, because, of course, those tests weren't actually executed.
I'm guessing this is because the "ignore" logic is looking specifically for "xit" and "xdescribe" to decide if a test is being skipped. When I use "fit" to run a single test, I don't make any changes to the other tests in the suite - Protractor skips them at runtime.
Here's my config for the reporter:
var HtmlReporter = new HtmlScreenshotReporter({
dest: "/tmp",
filename: "my-report.html",
ignoreSkippedSpecs: true,
reportOnlyFailedSpecs: false,
captureOnlyFailedSpecs: false
});
jasmine.getEnv().addReporter(HtmlReporter);
Environment:
Protractor v3.3.0
Jasmine2 v2.4.1
Node v6.3.0
npm v3.10.5
protractor-jasmine2-screenshot-reporter v0.3.2
Steps to Reproduce:
Expected:
It would be nice if the "ignoreSkippedSpecs" option tracked which test cases Protractor is actually executing at runtime, so that using either "xit" (to exclude one test) or "fit" (to exclude EVERYTHING BUT one test) would result in only the tests executed being run.
Perhaps, if necessary, a separate flag could be made to track use of focus tests ("fit") and leave the ignoreSkippedSpecs flag as-is.
I'm not sure if this is the right place to put this, and more over, I am unsure if this is something that belongs within the scope of this project, but it is something I would find useful and something I am sure others would find useful as well.
I would like to be able to see the narrative of steps taken in a particular test case, similar to the way RobotFramework reports show it, I have looked briefly into the way you get data in your reporter. Specifically using Jasmine's baked in result object that has access only to the following properties.
result = {
id: this.id,
description: this.description,
fullName: this.getFullName(),
failedExpectations: [],
passedExpectations: [],
pendingReason: ''
};
This is useful, but for selenium reporting there is a lot more involved than simple expectations i.e. A shit ton of navigation and configuration. If you added a "client" logger in the capabilities object you have access to logs that look like:
Executing: [add cookie: hp=990f61ff-6005-4522-8b97-080773dedd2c; path=/])
Done: [add cookie: hp=990f61ff-6005-4522-8b97-080773dedd2c; path=/]
Executing: [set window size])
Done: [set window size]
What I would like is a way to have access to loggers that were declared in the capabilities object.
I have jimmy rigged your framework to send my desired data to your reporter, but I was wondering what your thoughts on this were and if you had any plans on going in this direction.
No such file or directory error is thrown after upgrading from 0.3.1 to 0.3.2 without updating protractor config file/ test spec files.
Error: ENOENT: no such file or directory, open '${test-project}/output/ui-test/index.html'
at Error (native)
at Object.fs.openSync (fs.js:549:18)
at Object.fs.writeFileSync (fs.js:1156:15)
at Object.fs.appendFileSync (fs.js:1204:6)
at Jasmine2ScreenShotReporter.jasmineDone (${env-path}/node_modules/protractor-jasmine2-screenshot-reporter/index.js:500:10)
at dispatch (/usr/local/lib/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1966:28)
at ReportDispatcher.jasmineDone (/usr/local/lib/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1949:11)
at /usr/local/lib/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:758:18
at QueueRunner.clearStack (/usr/local/lib/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:660:9)
at QueueRunner.run (/usr/local/lib/node_modules/protractor/node_modules/jasmine/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1881:12)
18:59:00
This error happens when running a test suite that only has a single test. As soon as another it block is added (can be even empty), this issue no longer exists.
Error: ENOENT: no such file or directory, open 'C:\...\e2e\reports\10-Mar-2016-13h-10m\report.html' at Error (native) at Object.fs.openSync (fs.js:584:18) at Object.fs.writeFileSync (fs.js:1224:33) at Object.fs.appendFileSync (fs.js:1283:6) at Jasmine2ScreenShotReporter.jasmineDone (C:\...\node_modules\protractor-jasmine2-screenshot-reporter\index.js:482:10) at dispatch (C:\Users\...\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1966:28) at ReportDispatcher.jasmineDone (C:\Users\...\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1949:11) at C:\Users\...\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:758:18 at QueueRunner.clearStack (C:\Users\...\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:660:9) at QueueRunner.run (C:\Users\...\AppData\Roaming\npm\node_modules\protractor\node_modules\jasmine-core\lib\jasmine-core\jasmine.js:1881:12) [launcher] Process exited with error code 1
Hello,
Everything works fine, I see all steps in HTML report, but when I press on last step (when screenshot should open), it doesn't exist - screenshot for last step in my suite is not saving, no idea why.
Feel free to check it out by running this repo with Protractor:
https://github.com/drptbl/protractortesting/tree/lastscreenshotmissing
I'm talking about this step:
"✓should close cookie frame after acceptation (12 s)" - screenshot is missing.
Any ideas how to fix?
Tried wait and sleep after last step without success.
Is there any way where we can generate html report browser-wise. I have selenium-grid environment set up and we are using protractor-jasmine2-screenshot-reporter to generate reports. Reporter successfully generate a single html report for all specs on for all test executed on all browsers. It would be good if there is also an option to generate different browser-wise reports.
I've included "preserveDirectory: true" as in the example, but it doesn't have any effect for me.
pathBuilder in specDone method doesn't get browser capabilities passed to it.
https://github.com/mlison/protractor-jasmine2-screenshot-reporter/blob/master/index.js#L143
(same applies for metadataBuilder)
Here is my protractor configuration file :
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter'); exports.config = { framework: 'jasmine2', seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['spec.js'], capabilities: { browserName: 'chrome' }, onPrepare: function () { jasmine.getEnv().addReporter(new HtmlScreenshotReporter({ dest: 'target/screenshots_chrome', filename: 'my-report.html', userCss: 'my-reporter.css' })); browser.driver.manage().window().maximize(); jasmineNodeOpts: { showColors: true; defaultTimeoutInterval: 5000; }; browser.manage().timeouts().pageLoadTimeout(5000); browser.manage().timeouts().implicitlyWait(5000); allScriptsTimeout: 5000; getPageTimeout: 5000; }, };
The problem is that the reporter is not using 'my-reporter.css' in any way. None of the changes i made to the css file are reflected in the report.
If you bail ("quit") the test runner, no screenshots are taken (or no screenshots are saved).
The screenshots only appear to be saved when all the specs have finished running. I understand why this makes sense for the html report, but I think it is bad for the screenshots.
For example: say you have a very large suite of tests, you see one failure on the screen. You kill the tests. You go to see the screenshot to see what happened. No screenshot because the reporter hasn't finished up and move the screenshots into the directory yet.
Is it possible to customize the html templates? Lets say for instance, to show the results in a table/grid
When I run N test files in M parallel processes, such that M < N, then report.html
will only show the last M test file results.
For example (where N = 3, and M = 2):
// in protractor.conf.js (partial)
specs: [
'spec/one.js',
'spec/two.js'
'spec/three.js'
],
capabilities: {
browserName: 'chrome',
shardTestFiles: true, // run specs in parallel
maxInstances: 2 // max number of parallel specs
},
//....
onPrepare(function() {
jasmine.getEnv().addReporter(new HtmlScreenshotReporter({
dest: 'report/ptor',
pathBuilder: function(currentSpec) {
return 'screenshots/' + currentSpec.fullName;
}
}));
}),
// ....
Will result in a report that, assuming two.js and three.js finish after one.js, only shows two.js and three.js results.
This appears to be part of why this happens: https://github.com/mlison/protractor-jasmine2-screenshot-reporter/blob/master/index.js#L246-L256 (note that this code just recently change, though it appears to behave similarly to the fs.unlink
that used to be around).
Im not totally certain what the best way to go about fixing this is. Locally, I have simply 86'd the cleanup that is done at start, and have some separate clean up scripts I run when needed, but that might not be the right way.
Should the clean up step linked up be toggleable? Have any other folks encountered this problem and found a more elegant solution?
Is it possible to generate a screenshot from each browser forkedInstance generated in the spec? At this moment I only see one screenshots of the browser
, but not from the forked instances.
I have tests that fire up 6 browsers. I need to create screenshots from all of them when the test fails.
Is there a reason why the stack trace is not added to the report? I find it handy to have the stack trace available. For example if you have a spec with more expectations than one it it nice to see which line in your file throws the error. This is found in the stack trace.
Maybe the reason template can be expanded to display stack trace onClick, something like:
var reasonsTemplate = _.template(
'<ul>' +
'<% _.forEach(reasons, function(reason) { %>' +
'<li><%- reason.message %> - <a href="toggleDisplay()">Stacktrace</a></li>' +
'<div id="stacktrace" style="display: none;"><%- reason.stack %></div>' +
'<% }); %>' +
'</ul>'
);
Hello.
This creates a folder for me. and puts the html report in there.
but there are no .png files in the folder.
the report has hyperlinks that go to nowhere.
there are no errors in the console.
any ideas?
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
jasmine.getEnv().addReporter(
new HtmlScreenshotReporter({
dest: 'target/screenshots',
filename: 'my-report.html'
})
);
You capitalized the startsWith, should be startswith
lowercase!
> require('string.prototype.startsWith');
Error: Cannot find module 'string.prototype.startsWith'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at repl:1:1
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.emit (events.js:95:17)
Not a big thing, but pretty annoying. Can you please remove the 3 spaces in the first column fo code and replace them with 2?
Thaaanks :)
In this method in index.js#ln302, i can see browser.takeScreenshot method is called (i can see logs printed till this point).
But before the returned promise gets resolved and then callback is called, the process exits. And hence, the screenshot is not stored anywhere.
this.specDone = function(spec) {
---------
console.log("[sk]going to call the browser takeScreenshot.....") //this line gets printed
browser.takeScreenshot().then(function (png) {
console.log("[sk]inside browser.takeScreenshot.then....") //this line doesn't come
My report.html looks like this, without any screenshot links....
We have several tests across multiple files, and each screenshot gets appropriately linked except the very last one.
Is it possible to show what operating system the test is running in? I run my tests in remote desktops and it would be nice to see which tests fail on which OS.
When using the screenshot reporter, if one or more spec are focused (fit() instead of it()), no spec is ran by Protractor.
However, I am able to run only a focused suite with fdescribe(). But as soon as there is one focused spec, Protractor ends printing "No specs found" in the console.
I am using Protractor 2.0.0 with Jasmine 2.1.1 and protractor-jasmine2-screenshot-reporter 0.1.4.
I'm running the reporter on selenium grid, but when my suite ends, the reporter only shows the last executed test.
I also have noticed that I am getting this error on console log, on some tests: "problem trying to remove a folder:./target/reports/desktop/"
Here is my conf :
var htmlReporter = new HtmlReporter({
savePath: './target/reports/desktop/',
filePrefix: 'index.html',
takeScreenshots: true,
takeScreenshotsOnlyOnFailures: true,
captureOnlyFailedSpecs: true,
cleanDestination: false,
showSummary: false,
showConfiguration: false,
reportTitle: null,
preserveDirectory: false
});
If I run the tests locally, everything works fine.
Can you help ?
Thanks
Help says use " require('protractor-jasmine2-screenshot-reporter'); ",but it can't work,after I checked package.json then I adjust "require('protractor-jasmine2-screenshot-report');",I can work.
If I am running tests on CircleCI, then I want it be uploaded to AWS so I can see what the errors were.
When preserveDirectory: true
property is used, it throws error -
Error: ENOENT: no such file or directory, open 'results/Desktop_Results/e2ad95b6a41b6558a11630fb70f3bb65'
This might be because of the directory with the new name isn't created before trying to save the report.
Can the window not be focussed while taking the screenshot? It makes running my tests on my dev-box hard.
Issue
Clicking on stack trace link opens stack trace details for another spec for other browser.
Steps reproducible
Actual Result
You will observe that clicking on stack trace link in chrome section will open stack details in firefox section.
Sample report
Attached is the sample report with the same scenario and behavior
tests-report.html.zip
.
setup
jasmine.getEnv().addReporter(new HtmlScreenshotReporter({
dest: 'report/ptor',
pathBuilder: function(currentSpec) {
return 'screenshots/' + currentSpec.fullName;
}
}));
expected result
Screenshots get written into report/ptor/screenshots/*
The links in the report.html
link into report/ptor/screenshots/*
actual result
Screenshots get written into report/ptor/screenshots/
(yay!)
BUT the links in the report.html
link into report/ptor/screenshots%2F
(bummer!)
I get the above error after running my tests. I'm not sure if it's a duplicate of #4, and I'm sorry if it is :)
I currently have two tests, and for one of them a screenshot is being generated. Full trace below.
My protractor config looks like this:
exports.config = {
framework: 'jasmine2',
mocks: {
default: ['Generic/Profile'],
dir: 'tests/mocks'
},
onPrepare: function() {
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
jasmine.getEnv().addReporter(new HtmlScreenshotReporter({
dest: 'protractorScreenshots'
}));
},
specs: ['tests/e2e/**/*.spec.js']
};
TypeError: Cannot call method 'getCapabilities' of undefined
at /Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:430:20
at promise.ControlFlow.runInFrame_ (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/promise.js:1877:20)
at promise.Callback_.goog.defineClass.notify (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/promise.js:2464:25)
at promise.Promise.notify_ (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/promise.js:563:12)
at Array.forEach (native)
at Object.goog.array.forEach (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/goog/array/array.js:203:43)
at promise.Promise.notifyAll_ (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/promise.js:552:16)
at goog.async.run.processWorkQueue [as _onTimeout] (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/goog/async/run.js:125:21)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
From: Task: WebDriver.manage().timeouts().setScriptTimeout(11000)
at [object Object].webdriver.WebDriver.schedule (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:360:15)
at [object Object].webdriver.WebDriver.Timeouts.setScriptTimeout (/Users/hco/src/foobar/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:1367:23)
at [object Object].Runner.createBrowser (/Users/hco/src/foobar/node_modules/protractor/lib/runner.js:181:30)
at /Users/hco/src/foobar/node_modules/protractor/lib/runner.js:257:21
at _fulfilled (/Users/hco/src/foobar/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/Users/hco/src/foobar/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/Users/hco/src/foobar/node_modules/protractor/node_modules/q/q.js:759:13)
at /Users/hco/src/foobar/node_modules/protractor/node_modules/q/q.js:573:44
at flush (/Users/hco/src/foobar/node_modules/protractor/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:419:13)
Protractor run fails due to the reporter trying to create a screenshots index file when there are no screenshots taken. caputreOnlyFailedSpecs will always fail in a successful run unless the destination folder is created beforehand.
Since the normal behaviour for the reporter is to automatically create the folder, I'd expect it either not to create the file when there is nothing to report, or to create the folder before trying to write to it.
HtmlScreenshotReporter = require 'protractor-jasmine2-screenshot-reporter'
jasmine.getEnv().addReporter new HtmlScreenshotReporter({
dest: 'reports/e2e/screenshots'
filename: 'index.html'
ignoreSkippedSpecs: true,
reportOnlyFailedSpecs: false
captureOnlyFailedSpecs: true
})
28-Jun-2016 10:48:58 Error: ENOENT: no such file or directory, open 'reports/e2e/screenshots/index.html'
28-Jun-2016 10:48:58 at Error (native)
28-Jun-2016 10:48:58 at Object.fs.openSync (fs.js:549:18)
28-Jun-2016 10:48:58 at Object.fs.writeFileSync (fs.js:1156:15)
28-Jun-2016 10:48:58 at Object.fs.appendFileSync (fs.js:1204:6)
28-Jun-2016 10:48:58 at Jasmine2ScreenShotReporter.jasmineDone (/path/to/project/node_modules/protractor-jasmine2-screenshot-reporter/index.js:482:10)
28-Jun-2016 10:48:58 at dispatch (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1869:28)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1852:11
28-Jun-2016 10:48:58 at QueueRunner.clearStack (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
28-Jun-2016 10:48:58 at QueueRunner.run (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1745:9
28-Jun-2016 10:48:58 at queueRunnerFactory.onComplete (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2348:17)
28-Jun-2016 10:48:58 at QueueRunner.clearStack (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
28-Jun-2016 10:48:58 at QueueRunner.run (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1745:9
28-Jun-2016 10:48:58 at queueRunnerFactory.onComplete (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2348:17)
28-Jun-2016 10:48:58 at QueueRunner.clearStack (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
28-Jun-2016 10:48:58 at QueueRunner.run (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1745:9
28-Jun-2016 10:48:58 at queueRunnerFactory.onComplete (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2348:17)
28-Jun-2016 10:48:58 at QueueRunner.clearStack (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
28-Jun-2016 10:48:58 at QueueRunner.run (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1745:9
28-Jun-2016 10:48:58 at complete (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:365:9)
28-Jun-2016 10:48:58 at QueueRunner.clearStack (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:605:9)
28-Jun-2016 10:48:58 at QueueRunner.run (/path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1784:12)
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1801:16
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1745:9
28-Jun-2016 10:48:58 at /path/to/project/node_modules/jasminewd2/index.js:18:5
28-Jun-2016 10:48:58 at [object Object].promise.Promise.goog.defineClass.invokeCallback_ (/path/to/project/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
28-Jun-2016 10:48:58 at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/path/to/project/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
28-Jun-2016 10:48:58 at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/path/to/project/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
28-Jun-2016 10:48:58 at goog.async.run.processWorkQueue (/path/to/project/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
28-Jun-2016 10:48:58 at process._tickCallback (node.js:368:9)
28-Jun-2016 10:48:58 [launcher] Process exited with error code 1
HTML report contains non-workable links for passed specs when reportOnlyFailedSpecs is off.
Currently, it seems like screenshot for a failed spec is taken after the afterEach() or afterAll() methods are executed. This means that if you have some clean-up in the afterEach() which opens a new page, the screenshot of this page, instead of the failed one will be taken.
Is there a way to force taking the screenshot at the end of each it() block?
I'd like to be able to have screenshots for all specs, and only overwrite the screenshot if I run that spec, so that I always have a library of the most recent screenshots for every spec.
cleanDestination = false achieves this, but also makes the report.html grow by just appending new
reports to it, rather than overwriting. So the report will get very large and cluttered over time.
cleanDestination = true means I get a new report each time, but all your screenshots are deleted if you want to run just one spec instead of the whole suite.
I managed to get things working how I wanted by replacing the call to fs.appendFile on line 336 of index.js with fs.writeFile. Seems to work as intended although I haven't looked into all the consequences yet. Maybe this could be an option in a future update?
Unable to set showSummary or showConfiguration to false.
Unable to set reportTitle to null.
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.