Cucumber Scala final output shows 0 failures even when a scenario fails - cucumber

I have a cucumber test suite which has some tests
I run the tests using command
sbt "testOnly <cucumber_class_name>"
And one of the cucumber tests fail an assertion and console shows
Failed scenarios:
classpath:features/my_cucumber_scenario.feature:31# <my test description>
19 Scenarios (1 failed, 18 passed)
88 Steps (1 failed, 87 passed)sts 214s
3m18.224s
But in the end the console shows
Total 80, Failed 0, Errors 0, Passed 80
Since one of the tests failed, in the final output it should have shown
Failed 1 (Or something like that). But it is showing all passed instead due to which my build on travis is not failing.
How to solve this problem ? Is there a solution in cucumber ?
My dependencies are
"io.cucumber" % "cucumber-core" % "5.7.0",
"io.cucumber" % "cucumber-junit" % "5.7.0"
"io.cucumber" %% "cucumber-scala" % "5.7.0"

This problem is solved by cucumber team in
https://github.com/cucumber/cucumber-jvm-scala/releases/tag/v6.2.2

Related

Grails module inside maven archetype parent project not able to load grails plugins inside grails module

I have a parent maven archetype reactor project having a grails 2.4.4 project as submodule (standalone grails 2.4.4 project in process to a multimodule project), all build phases are working fine only during integration test (the grails project is using functional-test-1.2.7 grails plugin for it's integration test failsafe is not used here) it is not able to load the plugins below is the error.
[ERROR] ProjectBuildingException for org.grails.plugins:easyb:zip:2.0.5:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
[ERROR] ProjectBuildingException for org.grails.plugins:functional-test:zip:1.2.7:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
[ERROR] ProjectBuildingException for org.grails.plugins:tomcat:zip:7.0.54:test: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: zip # line 6, column 14
It started the Integration test but after 4-5 scenarios it fails like below:
SCENARIO the login form should reject invalid credentials, such as_an empty domain
GIVEN functional testing DSL is initalized
WHEN the client accesses the login form
WHEN supplies invalid credentials, such as_an empty domain
WHEN submits the form
Clicked [Login] which resolved to a [class com.gargoylesoftware.htmlunit.html.HtmlSubmitInput]
THEN login rejects the credentials and returns the client to the login form with an error message
THEN tear down functional testing DSL
THEN enable login form
Error |
Error running easyb tests: null (Use --stacktrace to see the full trace)
The old non-module grails project is working fine, and all IT tests are getting passed in local but in case of the multimodule project it is getting failed after 4-5 scenarios (it had total 251 test scenarios)
I've made sure both of them are identical.

SAP Commerce Cloud with Spartacus installation error

I am with a local installation of Sap Commerce Cloud 2011 with Spartacus following the steps of https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2011/
When i execute the sentence: install.bat -r cx-for-spa
BUILD FAILED
D:\CX\SCC\hybris\bin\platform\build.xml:9: The following error occurred while executing this line:
D:\CX\SCC\hybris\bin\platform\resources\ant\antmacros.xml:89: The following error occurred while executing this line:
D:\CX\SCC\hybris\bin\platform\resources\ant\mavenTasks.xml:440: Java returned: 1
Total time: 3 seconds
Task :recipes:cx-for-spa:createStoreFrontExt FAILED
FAILURE: Build failed with an exception.
Where:
Build file 'D:\CX\SCC\installer\recipes\cx-for-spa\build.gradle' line: 581
What went wrong:
Execution failed for task ':recipes:cx-for-spa:createStoreFrontExt'.
external process returned non-zero exit code, command: [cmd, /c, set "ANT_OPTS=-Xmx1024m -Dfile.encoding=UTF-8" & set "PLATFORM_HOME=D:\CX\SCC\hybris\bin\platform" & set "ANT_HOME=D:\CX\SCC\hybris\bin\platform\apache-ant" & set "PATH=D:\CX\SCC\hybris\bin\platform\apache-ant\bin;%PATH%" & ant createConfig -Dinput.template=develop]
I have executed those steps( sets and ant ) and repeat the install setence..but this error always appears.
Any help is welcome .. thank you very much in advance
I did the same installation last week (Sap Commerce 2011 for Spartacus).
Question to you:
Have you installed the jdk SapMachine 11 or 17? (17 makes trouble)
https://sap.github.io/SapMachine/
Have you updated the System Environment Variables of your system?
https://www.youtube.com/watch?v=E5wJXR63g1U
Have you comment out "Build Parallel = true" in the config file?
C:\SapCommerce2011\installer\customconfig
In file:"build.parallel=true" => "#build.parallel=true"
KR
Nathan

Gitlab pipeline is not failing when Jest test case fail or throw error

I am using Jest for testing mu nodejs code an after commiting my code the pipeline runs and Jest test case is throwing error but pipeline is not failing.
In test case it shows there are not expected results and so test case is failing but is not forcing the gitlab pipeline to fail. Any help?
✓ (10 ms)
✓ Test case for creating patient form testing (12 ms)
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 3.174 s
Ran all test suites matching /patient_create.test.js/i.
(node:18484) UnhandledPromiseRejectionWarning: Error: expect(received).not.toBeDefined()
Received: [Error: expect(received).toBe(expected) // Object.is equality·
Expected: 200
Received: 404]```

"make test" output errors command after installed preCICE on Centos 7

I get an error the following after run make test command in preCICE on Centos 7. Did anyone encounter this problem?
Thank you...
cmake parameters when building
cmake3 .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug -DMPI=ON
-DMPIEXEC_EXECUTABLE=/opt/ohpc/pub/mpi/openmpi3-gnu8/3.1.4/bin/mpiexec
-DCMAKE_INSTALL_PREFIX=/opt $PRECICE_ROOT
[root#headnode build]# make test
Running tests...
Test project /opt/precice-1.6.1/build
Start 1: precice.Base
1/4 Test #1: precice.Base .....................***Failed 0.01 sec
Start 2: precice.MPI_Ports
2/4 Test #2: precice.MPI_Ports ................***Failed 0.01 sec
Start 3: precice.PetRBFParallel
3/4 Test #3: precice.PetRBFParallel ...........***Failed 0.01 sec
Start 4: precice.NoMPI
4/4 Test #4: precice.NoMPI .................... Passed 4.09 sec
25% tests passed, 3 tests failed out of 4
Label Time Summary:
canfail = 0.02 sec*proc (2 tests)
Total Test time (real) = 4.14 sec
The following tests FAILED:
1 - precice.Base (Failed)
2 - precice.MPI_Ports (Failed)
3 - precice.PetRBFParallel (Failed)
Errors while running CTest
make: *** [test] Error 8
Before running test as root enter following :
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
export OMPI_ALLOW_RUN_AS_ROOT=1

Yocto: bitbake exit code confusion

I get an error while building an image using Yocto (dizzy):
ERROR: Creation of tar /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz failed.
and bitbake command fails with the following report:
No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
If I check the file xev-dbg-1.2.1-r0.tar.gz, I get:
$ file /mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz
/mnt/workspace/build/tmp/deploy/tar/xev-dbg-1.2.1-r0.tar.gz: gzip compressed data, from Unix, last modified: Mon Mar 27 20:19:55 201
and it is the same case for the remaining two errors.
I am confused:
if there was an error, why bitbake is reporting that all tasks succeeded?
If the file were successfully created, why bitbake exits with non zero value?
Bitbake did not return a 0 exit-code. This mean that there are errors in the bitbake process.
There are 3 errors when it is trying to create the tar files as shown.
The compressed file is there but it is not complete. E.g. Just like how you could download a file and interrupt it and the download file is still there. So we usually use md5sum or some kind of hash number to check on the completeness of the file.
A better understanding might be: Bitbake attempted to run 6292 task. 18 of them do not need to rerun. Bitbake attempted to rerun the rest 6274(6292-18) and succeeded in rerunning them. This does not mean that all of them are successfully compiled. In the process of rerunning them, there are 13 warnings and and 3 errors appeared. Because of the 3 errors, bitbake returns with a non-zero exit code.
No currently running tasks (6291 of 6292)
NOTE: Tasks Summary: Attempted 6292 tasks of which 18 didn't need to be rerun and all succeeded.
Summary: There were 13 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.

Resources