How to remove Skip testcases from cypress runner - tags

Is it possible, to remove skipped testcases from cypress runner and cypress cucumber html report and not to show them

Related

How to chain SBT task with multi module project

I have configured one SBT multi-module project with scoverage plugin, which is working fine.
To generate test coverage, I am using > SBT clean coverage test coverageReport but is there any way to create a new task which chains internally coverage test coverageReport.
I have tried
Run custom task automatically before/after standard task to create a custom task, but it seems not working with multimodule project.
And one more - http://eed3si9n.com/sequencing-tasks-with-sbt-sequential
Try addCommandAlias like so
addCommandAlias("coverageAll", ";clean;coverage;test;coverageReport")
Now executing sbt coverageAll should generate coverage report for all the sub-projects.

GitHub and Travis CI - How to fail build when tests fail

I have a Scala project on GitHub and I use the Travis CI to build it and show the resulting badge on the project home in GitHub. I started to write unit tests and I realized that during one of my commit, some tests failed. But the travis build shows that the build passes.
I know that I should be using some kind of hook to check for tests failures and correspondingly fail my build. But I just don't know what the correct command for that is? I could not as well infer this from any documentation.
Here is my travis.yml file:
language: scala
jdk:
- oraclejdk8
scala:
- 2.11.7
script:
- sbt clean coverage test coverageReport
after_success:
- bash <(curl -s https://codecov.io/bash)
What hook should I add here so that the build fails as soon as one of my unit test fails?

Can one impose a coverage minimum for combined unit and integration tests?

When I run unit tests for my sbt project (with sbt clean coverage test), I get code coverage of ~77%.
When I run integration tests (sbt clean coverage it:test), I get code coverage of ~10%.
When I run both (sbt clean coverage test it:test), I get code coverage of ~84%.
I'd like to set an aggressive code coverage minimum and fail the build if it's not met, but if I add these build settings:
coverageMinimum := 83
coverageFailOnMinimum := true
...and then run sbt clean coverage test it:test, the coverage minimum is checked after the unit tests, before the integration tests can run, and the build fails:
[error] Coverage is below minimum [77.0% < 83.0%]
If I put it:test before test, it's even worse ([10.0% < 83.0%]).
Is there any way to stipulate that the 83% minimum should apply only after both unit and integration tests have run? Or am I doomed to setting the coverage minimum meetable by my unit tests alone, and always remembering to put test before it:test on the command line?
Automatic post-test coverage minimum check was removed in version 1.3.4 (see issue https://github.com/scoverage/sbt-scoverage/issues/132).
Upgrade plugin version to latest 1.3.5 and call coverageReport after all tests, e.g.:
sbt clean coverage test it:test coverageReport

Disabling parallel test execution when running test with coverage in Intellij

What sbt task does intellij IDEA 14 use to run scala tests with coverage? I'm test my spark code and need to prevent them running in parallel.
I've added the following to my build.sbt file and it prevents tests running in parallel when they aren't generating coverage reports:
parallelExecution in Test := false
However this has no effect when running with coverage. I tried using something similar, but with ScctTest instead of Test, but sbt couldn't resolve it.
So, what coverage plugin does intellij use, and how can I disable parallel test execution when running tests with coverage? Running sbt tasks doesn't show anything containing the word coverage. I haven't enabled the Emma plugin in intellij - only the default Coverage one is enabled and it has no information.
Try to add to settings:
fork in ThisBuild in Test:= false

sbt ignore test failures

For SonarQube jobs in Jenkins we'd like to proceed even though some tests might fail. Currently the Sonar Runner is not kicked off, because a test fails.
In Maven you'd just add -DtestFailureIgnore = true, but I cannot find anything similar for SBT.
I did find a onFailure thing for sbt, but have not found any examples anywhere how to use this. Could this be used to ignore test failures so the build job continues so the Sonar Runner gets started afterwards?
Or is there a setting in Jenkins to ignore the result of the build?
We use 'sbt clean coverage test coverageReport' as build command and have Sonar Runner in a post-build step.
Finally found a solution myself.
In SBT you can define a new task A which captures the result of another task B. This dependency ensures that task B is run when the new task A is started. By capturing the result, the result of task B is not the result of task A so if B fails, A does not (have to) fail.
So in this case, I added created a new 'ciTests' tasks to the 'build.sbt'
// Define a special test task which does not fail when any test fails,
// so sequential tasks (like SonarQube analysis) will be performed no matter the test result.
lazy val ciTests = taskKey[Unit]("Run tests for CI")
ciTests := {
// Capture the test result
val testResult = (test in Test).result.value
}
Now in the Jenkins job it build the project using SBT with commands (using SCoverage SBT plugin):
update coverage ciTests coverageReport
This build will succeed ignoring any failing tests. Therefore a next build step to start SonarRunner will start the analysis of the Scala project and put the results in SonarQube.
Thanks to #hugo-zwaal for pointing me to this answer which helped me solving my issue.