How to exit protractor when done
When I run gulp-protractor it runs my tests fine but when done it doesn't exit
8 specs, 0 failures
Finished in 14.874 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
[14:40:57] Finished 'test:e2e' after 16 s
When done, I have to hit ctrl + c
to continue. Is it possible to tell protractor to quit when done ?
gulp protractor
add a comment |
When I run gulp-protractor it runs my tests fine but when done it doesn't exit
8 specs, 0 failures
Finished in 14.874 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
[14:40:57] Finished 'test:e2e' after 16 s
When done, I have to hit ctrl + c
to continue. Is it possible to tell protractor to quit when done ?
gulp protractor
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49
add a comment |
When I run gulp-protractor it runs my tests fine but when done it doesn't exit
8 specs, 0 failures
Finished in 14.874 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
[14:40:57] Finished 'test:e2e' after 16 s
When done, I have to hit ctrl + c
to continue. Is it possible to tell protractor to quit when done ?
gulp protractor
When I run gulp-protractor it runs my tests fine but when done it doesn't exit
8 specs, 0 failures
Finished in 14.874 seconds
[launcher] 0 instance(s) of WebDriver still running
[launcher] chrome #1 passed
[14:40:57] Finished 'test:e2e' after 16 s
When done, I have to hit ctrl + c
to continue. Is it possible to tell protractor to quit when done ?
gulp protractor
gulp protractor
asked Apr 30 '15 at 12:56
Jeanluca ScaljeriJeanluca Scaljeri
7,33123108182
7,33123108182
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49
add a comment |
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49
add a comment |
2 Answers
2
active
oldest
votes
Check your gulp file,
Do you have a command to exit the process at the completion of tests?
e.g.
gulp.task('e2e', function() {
gulp.src(['foo/bar'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args: ['--baseUrl', baseUrl],
keepAlive: true
}))
.on('end', function() {
console.log('E2E Testing complete');
process.exit();
})
.on('error', function(error) {
console.log('E2E Tests failed');
process.exit(1);
});
});
key line being
process.exit()
1
The real culprit should bekeepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting
– Leon Adler
Apr 19 '17 at 12:42
add a comment |
In case anyone finds this answer in the context of non-gulp protractor issues, see this answer - the protractor.conf can be modified to use onComplete for this purpose.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29968380%2fhow-to-exit-protractor-when-done%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Check your gulp file,
Do you have a command to exit the process at the completion of tests?
e.g.
gulp.task('e2e', function() {
gulp.src(['foo/bar'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args: ['--baseUrl', baseUrl],
keepAlive: true
}))
.on('end', function() {
console.log('E2E Testing complete');
process.exit();
})
.on('error', function(error) {
console.log('E2E Tests failed');
process.exit(1);
});
});
key line being
process.exit()
1
The real culprit should bekeepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting
– Leon Adler
Apr 19 '17 at 12:42
add a comment |
Check your gulp file,
Do you have a command to exit the process at the completion of tests?
e.g.
gulp.task('e2e', function() {
gulp.src(['foo/bar'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args: ['--baseUrl', baseUrl],
keepAlive: true
}))
.on('end', function() {
console.log('E2E Testing complete');
process.exit();
})
.on('error', function(error) {
console.log('E2E Tests failed');
process.exit(1);
});
});
key line being
process.exit()
1
The real culprit should bekeepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting
– Leon Adler
Apr 19 '17 at 12:42
add a comment |
Check your gulp file,
Do you have a command to exit the process at the completion of tests?
e.g.
gulp.task('e2e', function() {
gulp.src(['foo/bar'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args: ['--baseUrl', baseUrl],
keepAlive: true
}))
.on('end', function() {
console.log('E2E Testing complete');
process.exit();
})
.on('error', function(error) {
console.log('E2E Tests failed');
process.exit(1);
});
});
key line being
process.exit()
Check your gulp file,
Do you have a command to exit the process at the completion of tests?
e.g.
gulp.task('e2e', function() {
gulp.src(['foo/bar'])
.pipe(protractor({
configFile: 'protractor.conf.js',
args: ['--baseUrl', baseUrl],
keepAlive: true
}))
.on('end', function() {
console.log('E2E Testing complete');
process.exit();
})
.on('error', function(error) {
console.log('E2E Tests failed');
process.exit(1);
});
});
key line being
process.exit()
answered Apr 30 '15 at 14:11
Jon DuffyJon Duffy
366414
366414
1
The real culprit should bekeepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting
– Leon Adler
Apr 19 '17 at 12:42
add a comment |
1
The real culprit should bekeepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting
– Leon Adler
Apr 19 '17 at 12:42
1
1
The real culprit should be
keepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting– Leon Adler
Apr 19 '17 at 12:42
The real culprit should be
keepAlive: true
, which keeps protractor from closing all handles and prevens node from exiting– Leon Adler
Apr 19 '17 at 12:42
add a comment |
In case anyone finds this answer in the context of non-gulp protractor issues, see this answer - the protractor.conf can be modified to use onComplete for this purpose.
add a comment |
In case anyone finds this answer in the context of non-gulp protractor issues, see this answer - the protractor.conf can be modified to use onComplete for this purpose.
add a comment |
In case anyone finds this answer in the context of non-gulp protractor issues, see this answer - the protractor.conf can be modified to use onComplete for this purpose.
In case anyone finds this answer in the context of non-gulp protractor issues, see this answer - the protractor.conf can be modified to use onComplete for this purpose.
edited Nov 28 '18 at 18:21
answered Nov 28 '18 at 14:27
bsplosionbsplosion
322111
322111
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29968380%2fhow-to-exit-protractor-when-done%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What exactly doesn't stop, are you referring to the 'WebDriver still running' or is your browser still open?
– Tom Nijs
Apr 30 '15 at 13:34
I've found the answer below :)
– Jeanluca Scaljeri
May 3 '15 at 10:49