Protractor/CucumberJS/Gup - e2e tests stop running when single test fails instead of continuing - selenium-webdriver

When you're running your suite of e2e tests via a CI server like Bamboo; you expect to come back the next day or hour to see a report showing how many tests passed/failed.
In my case, my e2e tests stop running as soon as a single test fails so I come back the next morning to check the nightly build and do not have that nice report showing the stats on what passed/failed.
Checking the log file, I can see that there were some cucumber features that passed earlier on in the log prior to the failed feature; but again, a failing feature halts/stops the execution of any further tests in my situation.
The error would look something like:
AssertionError: expected 'Green' to equal 'Red'
[launcher] BUG: launcher exited with 1 tasks remaining
error 17:59:29
error 17:59:29 C:\Users\bamboo-agent-home\xml-data\build-dir\PROJ\gulp\e2e-tests.js:27
error 17:59:29 throw err;
error 17:59:29 ^
error 17:59:29 Error: protractor exited with code 100
How can I force the test suite to continue running even if some features fails so that I can finally make it to that end report with the stats: passed/failed?
Could it be a conflicting issue between how Protractor handles promises vs how chai/chai-as-promised does?
Protractor v 4.0.1
Chai v 3.4.0
Chai-as-promise v ^5.1.0
Windows 10
cucumber#0.6.0 - **`I found this with npm list cucumber`**
Node v 4.4.7
Gulp
CLI version 3.9.1
Local version 3.9.1

Related

Ionic build failed without specific error

After cloning my Ionic React project to my server, I ran npm install and all dependencies were installed as expected.
But when I tried to build my app running sudo ionic build --verbose, it tooks much more time than usual and ended like this :
eslint:lint-result-cache Persisting cached results: /var/www/html/ms-users-front/node_modules/.cache/.eslintcache +0ms
eslint:cli-engine Linting complete in: 4827ms +48ms
//It stay here for at least 10min before to failed while it tooks 1min in my local machine.
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
[ERROR] An error occurred while running subprocess react-scripts.
react-scripts build exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 1 functions +1ms
ionic:utils-process processExit: exiting (exit code: 1) +44ms
My server is an ec2 instance with httpd installed and everything was working great before I tried to build a new version yesterday.
With exactly the same process, the app is building perfectly on my local machine...
I tried npm update, delete eslint cache, and build but without success.
I tried to downgrade Typescript to 4.1 because I had a warning saying that Typescript should be >4.5 and it was 4.7. But after some tests on local, it looks like this has no incidence on the build process.
I'm totally stuck and I absolutly don't know what to try.

Galen Framework: "Message: Command ... failed with exit code 1"

I have basic Galen testing set up on a responsive Angular site, running through a simple test on desktop and tablet versions of the site.
I did not build this site and cannot say if Galen ever fully worked properly on the website. I did myself upgrade Galen from v1.6.3 to v2.2.1 in NPM, which included updating syntax etc in the .test file and two .gspec files.
Almost everything appears to be working fine by the Gulp command I am running in Mac terminal:
GALEN_URL=http://localhost:3000/MYSITE/ gulp test:galen-local
This runs the test locally (vs SauceLabs). Via terminal, I see the two tests run, with test criteria printed out, and I get a note that there is a failure on tablet version (it's an easy CSS-related fix for tablet version, and I'm not worried about that). Also, I am getting the HTML reports for those two tests, written to a local directory.
My problem is the following error message I get after the tests run:
========================================
Failed tests:
Login page on tablet device
Suite status: FAIL
Total tests: 2
Total failed tests: 1
Total failures: 3
There were failures in galen tests
[13:51:04] 'test:galen-local' errored after 11 s
[13:51:04] Error in plugin 'gulp-shell'
Message:
Command `./node_modules/.bin/galen test tests/galen/tests/local.test --htmlreport galen-reports -DwebsiteUrl=http://localhost:3000/MYSITE/ -DsauceUser=USERNAME -DsauceKey=SAUCEKEY` failed with exit code 1
What is failed with exit code 1? I have searched Galen docs, searched the web, and I can't figure out what might be going wrong. I have no idea what that means.
I can provide more code if needed, but the website is relatively sophisticated and things are abstracted out across many files.
thanks for any assistance
I think I might have answered my own question just now...
When I removed the test criteria that were failing for tablet version, I got the following in terminal with no "command" error message:
========================================
Suite status: PASS
Total tests: 2
Total failed tests: 0
Total failures: 0
[14:24:16] Finished 'test:galen-local' after 11 s
I presume the command error message was just a reflection that tests in the overall suite were failing. Still, it seems odd to me that such an error message would appear after a Total failed tests: 1 Total failures: 3 message already made clear that certain tests in the tablet version were failing. And I still don't know what specifically the "error code 1" above means.
If anyone has any insight, feel free to chime in. Otherwise, I'll mark this as THE answer at some point, if I don't just delete the entire question.

Android build fails in codenameone build sever

My android build fails after build and this is the error log i get
Total time: 1 mins 16.631 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':dexRelease'.] from daemon DaemonInfo{pid=5907, address=[10331ba5-2501-41cc-aa13-52a0ba46bd51 port:41817, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2862cb6d-50e8-4321-a1fa-590435e89f0f,javaHome=/usr/java/jdk1.7.0_67,daemonRegistryDir=/home/ec2-user/.gradle/daemon,pid=5907,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=512m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1500m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
This is probably related to this: https://www.codenameone.com/blog/video-new-defaults-barcode-qrcode-changes.html
You can workaround this by using android.gradle=false in the build hints. However, I'm guessing its related to some cn1lib or build hint you added. But it seems the build error log you provided is partial so I don't see any issue there.

Not able to trigger JiraTestResultReporter plugin on Post Build Action in Jenkins

I want to log defects automatic on jira whenever any test case gets fail.for that i have used JiraTesttResultReport plugin.i have successfully able to create my report.xml file.but i got below errors:
Build step 'Publish JUnit test result report' changed build result to UNSTABLE
[JiraTestResultReporter] [INFO] Examining test results...
ERROR: Publisher JiraTestResultReporter.JiraReporter aborted due to exception
java.lang.NoSuchMethodError: hudson.model.AbstractBuild.getTestResultAction()Lhudson/tasks/test/AbstractTestResultAction;
at JiraTestResultReporter.JiraReporter.perform(JiraReporter.java:105)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
On what version of Jenkins are you working?
JiraTestResultReporter does not work on Jenkins 1.577+
It's a known bug
A workaround is to build and install a snapshot of the plugin.

Running end-to-end tests with generator-angular-fullstack

I am trying to run end-to-end (e2e) tests for an AngularJS application using Protractor. I have created a base application with yeoman and generator-angular-fullstack. The first time I run grunt test:e2e, the single e2e test runs successfully. The second time I run the e2e tests, the tests fail with the output as shown here: https://gist.github.com/ErikEvenson/f2e39db0213e5fbb7fdc. Specifically, I get the following error:
Error: Error while running testForAngular: javascript error: document unloaded while waiting for result
(Session info: chrome=38.0.2125.111)
(Driver info: chromedriver=2.12.301324 (de8ab311bc9374d0ade71f7c167bad61848c7c48),platform=Linux 3.13.0-35-generic x86_64)
I am running this on Ubuntu 14.04. Prior to running the e2e tests I configure Xvfb with:
Xvfb :1 -screen 5 1024x768x8 &
export DISPLAY=:1.5
If I restart my box, the test will again run fine a single time, but fail on subsequent runs.
Why do the e2e tests fail on subsequent runs?

Resources