Comments (18)
I have a project with the next parameters:
Node Version v8.9.4 (NPM: 5.6.0)
Operating System: Windows 10
[email protected]
[email protected]
My protractor-flake.file:
_let protractorFlake = require('protractor-flake')
let protractorArgs = []
process.env.maxAttempts = 2
protractorArgs.push('conf.js')
let suiteArg = "--suite=${process.env.suite}"
protractorFlake({
maxAttempts: process.env.maxAttempts,
parser: 'standard',
nodeBin: 'node',
color: 'magenta',
protractorArgs: protractorArgs
}, function (status) {
process.exit(status)
})_
conf.js file for protractor:
const AllureReporter = require('jasmine-allure-reporter')
exports.config = {
allScriptsTimeout: 11000,
SELENIUM_PROMISE_MANAGER: false,
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 240000,
},
params: {
waitTimeout: 60000,
},
specs: [
'lib/spec/suite1/*.js',
],
suites: {
all: 'lib/spec/suite1/test.js',
},
baseUrl: process.env.env = 'http://www.google.by',
capabilities: {
browserName: 'chrome',
shardTestFiles: process.env.maxinstances > 1,
maxInstances: process.env.maxinstances,
chromeOptions: {
args: [
'incognito',
// 'headless',
// 'disable-gpu',
'window-size=1920,1080',
'--disable-infobars',
'--disable-extensions',
'--ignore-ssl-errors=true',
'verbose',
'--disable-web-security'
],
},
prefs: {
download: {
prompt_for_download: false,
directory_upgrade: true,
},
},
loggingPrefs: {
'browser': 'SEVERE',
},
},
onPrepare: async () => {
browser.waitForAngularEnabled(false)
global.EC = protractor.ExpectedConditions
global.Logger = require('./lib/helpers/logger')
jasmine.getEnv().addReporter(new AllureReporter({
resultDir: 'allure-results',
}))
jasmine.getEnv().addReporter(new function () {
this.jasmineStarted = function (summary) {
global.TOTAL = summary.totalSpecsDefined
global.PASSED = 0
global.FAILED = 0
global.SKIPPED = 0
Logger.info(
"!----------Tests started. Total tests: ${TOTAL}----------!")
}
this.suiteStarted = function (result) {
Logger.info("--------------------------------------------------")
Logger.info("Suite starts: ${result.fullName}")
Logger.info("--------------------------------------------------")
}
this.specStarted = function (result) {
Logger.info("Spec starts: ${result.description}")
}
this.specDone = function (result) {
if (result.status === 'passed') {
PASSED++
}
if (result.status === 'disabled' || result.status === 'pending') {
SKIPPED++
}
}
this.jasmineDone = function () {
Logger.info("**************************************************")
Logger.info("${PASSED + FAILED + SKIPPED} of ${TOTAL} tests done")
Logger.info("Passed: ${PASSED}")
Logger.info("Failed: ${FAILED}")
Logger.info("Skipped: ${SKIPPED}")
Logger.info("**************************************************")
}
})
jasmine.getEnv().afterEach(async function () {
await Logger.LogConsoleErrors()
try {
await browser.takeScreenshot().then(function (png) {
allure.createAttachment('Screenshot', function () {
return new Buffer(png, 'base64')
}, 'image/png')()
})
} catch (e) {
Logger.error("Screen shot was not taken\n${e}")
}
})
await browser.get('')
}
}
from protractor-flake.
We faced the same problem:
Node Version v10.13.0 (NPM: 6.4.1)
Operating System: Windows 10
protractor@5.4.2
protractor-flake@3.4.0
from protractor-flake.
It seems to be related to something in the v3.4.0 release. v3.3.0 was working well.
from protractor-flake.
#98 seems like the cause.
from protractor-flake.
Thanks for finding this. I'll figure out a revert strategy and roll this back in the next few hours for a short term fix, we can then figure a way to incorporate the new functionality with #98 in way that doesn't break things.
from protractor-flake.
I've just released v3.4.1
which removes the feature added in #98. Can someone confirm that this has resolved the issue?
from protractor-flake.
Unfortunatelly, it's still not worked
"protractor": "^5.4.2",
"protractor-flake": "^3.4.1"
from protractor-flake.
I think the current workaround is to pin to v3.3.0
I think this is actually broken by the typescript upgrade (that happened between 3.3.0 and 3.4.0 and not the changes in #98. I don't have time to investigate until later today but I'll happily accept a PR in the meantime.
from protractor-flake.
I'm looking forward solving of this problem, thanks!
p.s. I noticed it works only I set "protractor-flake": "3.3.0" certain version, without ^
from protractor-flake.
It looks like this was due to some logic in logger.ts
that did not get moved over in the switch to JS (my fault!). I have a fix that you should be able to use locally by installing from the branch:
npm i protractor-flake@NickTomlin/protractor-flake#fix-102
@murcraft @jayvdb could one of you test that to verify? If so I can release a new version with that fix in place and re-roll the changes in #98
from protractor-flake.
I'm also unpublishing 3.4.0
and 3.4.1
for the time being to prevent others from opting into this breakage with semantic versioning.
from protractor-flake.
Yes, it works!
from protractor-flake.
It works! Thanks.
from protractor-flake.
Just to confirm, are you saying that the branch in npm i protractor-flake@NickTomlin/protractor-flake#fix-102
you works locally?
from protractor-flake.
Just to confirm, are you saying that the branch in
npm i protractor-flake@NickTomlin/protractor-flake#fix-102
you works locally?
Yes, my project works with using this branch
from protractor-flake.
@perchwell-e2e Great thanks for confirming that!
I'll try to prep a new release this weekend to restore the changes in #98. It looks like there's still some integration test breakage that I need to sort out before that happens.
from protractor-flake.
Just to confirm, are you saying that the branch in
npm i protractor-flake@NickTomlin/protractor-flake#fix-102
you works locally?
I'm working with public repo. And now initial issue is not reproducible for me.
from protractor-flake.
I'm going to go ahead and close this. I'll follow up with re-enabling #98 in the next few weeks when I have time.
from protractor-flake.
Related Issues (20)
- How to build with ng e2e and run config file via protractor-flake? HOT 7
- The automated release is failing 🚨 HOT 1
- Reruning all the tests not just the failed ones with cucumber. HOT 1
- protractor-flake doesn't run tests if suite is not specified HOT 3
- protractor-flake doesn't run the remaining tests after retrying the failed test HOT 5
- protractor-flake finds the typescript file (not the compiled file) on retry HOT 5
- protractor flake executing all suites mentioned instead of specific suite HOT 2
- Feature Request: Option to mark failing and pending specs as failure to be picked up for rerun in flake
- Same failed spec being marked to run twice with cucumber HOT 3
- Failing Cucumber Scenarios causing entire feature files to re-run HOT 4
- Protractor Flake is not working with cucumber? HOT 2
- Feature Request: Expose attemptNo or allow code to be specified in beforeAttempts/afterAttempts HOT 6
- Easier way to specify path of custom parser HOT 5
- screenshots of retries overwrite the original run HOT 4
- Running serve as part of Flake HOT 4
- retryconfig doesn't work HOT 3
- running node ./protractor-flake-retry.js works putting than command inside npm run test fails HOT 3
- seleniumAddress HOT 2
- how to use protractor arguments with yarn HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protractor-flake.