-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re run whole suite / not failed ones #79
Comments
|
@NickTomlin : Would you please suggest me work around to resolve this issue |
@trisha1212 I'm confused by your output. I see multiple invocations of
It looks like the multi parser is finding a failing spec file and re-running it. Can we focus on a simplified example using only the multi parser? Otherwise it's difficult to debug because there is a lot of output. |
1 similar comment
@trisha1212 I'm confused by your output. I see multiple invocations of
It looks like the multi parser is finding a failing spec file and re-running it. Can we focus on a simplified example using only the multi parser? Otherwise it's difficult to debug because there is a lot of output. |
@trisha1212 You have lot of logs and really painful to read all those properly. You can test against few files with few spec with minimum logs so that other can read properly and help you. And configuration file also looks unreadable due to your comment and improper format... |
Thank you . I reran the test and attached the gist. https://gist.github.com/Trisha1212/929f8de55e6fc9ea91eb5db69102d1b1 |
I again rerun the test attached the gist @NickTomlin , @surendraJ : Please let me know any other details helps you i will try to provide from my side. Your help is appreciated. |
@trisha1212 only thing I can say..protractor flake's parser are not sufficient to match all of the log to re run again...we need to have custom parser to match all of them. You can check with pattern here: https://github.com/NickTomlin/protractor-flake/blob/master/src/parsers/multi.js This issue might be useful: #15 |
@trisha1212 As @surendraJ mentions, the multi parser is looking for output to attempt to match specs being run against any failures. First it looks for
If no files are found and we exit with a non With that context established, it looks like some For an experiment can you change one of the An additional question, why do you need multiple |
I am seeing this in 2.6 - it appears that protractor-flake is adding items to "capabilities" and not null-ing multiCapabilities, so protractor just ignores the capabilities section. `[cd11] Using cucumberMulti to parse output [cd11] Re-running tests: test attempt 2 [cd11] Re-running the following test files: [cd11] business-process/event-e2e/features/portal-william/williamDownloadsGeraldineFiles.feature [cd11] Import and download dirs: /var/lib/jenkins_home/workspace/XXX-build_..... [cd11] 2017-11-17T09:59:34.838Z (node:25291) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. [cd11] 2017-11-17T09:59:34.840Z [09:59:34] W/launcher - You have specified both capabilities and multiCapabilities. This will result in capabilities being ignored [cd11] 2017-11-17T09:59:34.856Z [09:59:34] I/launcher - Running 2 instances of WebDriver` |
And that is because of this problem: angular/protractor#2231 feel free to ignore my comment :-) i can code around this! |
Following on the tickets :
issue is still reproducible : |
if it is of any use, to make this work we use the following at the end of our config files. It checks if it is running inside a flake retry and if so, drops the multi capabilities. It also forces stdout/err to blocking because otherwise the results from the longer run often don't make it back to Flake. console.log('looking for retry args from flake:');
}); process.stdout._handle.setBlocking(true); |
@rvowles Your solution worked for me when rerunning flaky tests with multi capabilities. Thank you so much |
Hi there!
Jasmine version: 2.4.1
Browser name: chrome
Browser version: 53.0.2785.143
Platform: LINUX
Javascript enabled: true
Css selectors enabled: true
flake :
#!/usr/bin/env node
/**
./flake conf.js [other protractor args]
*/
//const rerun = require('./module');
const protractorFlake = require('protractor-flake');
// skip first two passed args (node and self)
let protractorArgs = process.argv.splice(2);
protractorFlake({
protractorPath: 'node_modules/.bin/protractor',
maxAttempts: 2,
parser: 'standard', //even tried with multi
nodeBin: 'node',
color: 'magenta',
protractorArgs: protractorArgs
}, function(status, output) {
process.exit(status);
});
Package.json :
{
"version": "0.0.0",
"private": true,
"name": "weardex-app-bazooka-test",
"description": "weardex",
"license": "MIT",
"devDependencies": {
"jasmine-reporters": "~1.0.1",
"jasmine-spec-reporter": "^4.2.1",
"moment": "~2.9.0",
"mysql": "~2.8.0",
"protractor": "~4.0.10",
"protractor-console": "^3.0.0",
"protractor-html-screenshot-reporter": "0.0.19",
"protractor-jasmine2-screenshot-reporter": "^0.4.0"
},
"scripts": {
"postinstall": "node_modules/protractor/bin/webdriver-manager update",
"prestart": "npm install",
"start": "node_modules/protractor/bin/webdriver-manager start",
"pretest": "npm install",
"test": "./flake conf.js",
"debug": "npm install;node_modules/protractor/bin/protractor debug config.js",
"update-index-async": "node -e "require('shelljs/global'); sed('-i', /\/\/@@NG_LOADER_START@@[\s\S]*\/\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\n' + cat('bower_components/angular-loader/angular-loader.min.js') + '\n//@@NG_LOADER_END@@', 'app/index-async.html');""
},
"dependencies": {
"node-redshift": "0.0.6",
"protractor-flake": "^3.0.1"
}
}
conf.js :
/**
*/
var path = require('path');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var reporter = new SpecReporter({
spec: {
displayStackTrace: true;
}
})
// var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
// var reporter = new HtmlScreenshotReporter({
// dest: 'screenshots',
// filename: 'Dashboard_E2E_Results.html',
// showConfiguration: true,
// reportFailedUrl: true,
// inlineImages: true,
// captureOnlyFailedSpecs: true,
// reportOnlyFailedSpecs: false,
// showSummary: true,
// showQuickLinks: true,
// reportTitle: "SUMMARY_OF_FAILED_SPECS_E2E_RESULTS",
// metadataBuilder: function(currentSpec, suites, browserCapabilities) {
// return { id: currentSpec.id, os: browserCapabilities.get('browserName') };
// },
// pathBuilder: function(currentSpec, suites, browserCapabilities) {
// // will return chrome/your-spec-name.png
// return browserCapabilities.get('browserName') + '/' + currentSpec.fullName;
// }
// });
exports.config = {
// seleniumAddress: 'http://0.0.0.0:4444/wd/hub',
// seleniumAddress: 'http://localhost:4444/wd/hub',
// CSS Selector for the element housing the angular app - this defaults to
// body, but is necessary if ng-app is on a descendant of .
rootElement: 'body',
allScriptsTimeout: 60000,
framework: 'jasmine',
jasmineNodeOpts: {
// If true, display spec names.
isVerbose: true,
// If true, print colors to the terminal.
showColors: true,
// If true, include stack traces in failures.
includeStackTrace: true,
// Default time to wait in ms before a test fails.
defaultTimeoutInterval: 60000,
print: function();
},
params : {
// lang : 'zh_CN'
lang : 'en'
},
You can collect the first few items easily with the trouble cli
npx @nicktomlin/trouble protractor protractor-flake
(ornpm i -g @nicktomlin/trouble && trouble protractor protractor-flake
)The text was updated successfully, but these errors were encountered: