Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lmserrano
Copy link
Contributor

@lmserrano lmserrano commented Nov 21, 2020

  • Add ignored suites to the list of suite presented in the test reports, with - and in yellow color.
  • Add ignored tests to the list of tests presented in the test reports, with - and in yellow color.
  • Suites which executed only contain the ignored count for the suites which were not ignored (since ignored suites are not executed and they could eventually have nested suites with more tests).
  • The ignored tests were left with the - ignored: 1 line in order to facilitate non-color-based distinction, since errors are presented also with -, and a fully colorblind person would be unable to distinguish between both without the textual hint.
  • The ignored suites now have - ignored suite to also explicitly mark them as completely ignored on top of the yellow color.
  • Closes Ignored tests not visible in report #4347

Example image attached below:

2020-11-21_22-57-47

The Spec used to produce this result was:

object MyZIOSpec extends DefaultRunnableSpec {
  def spec = suite("4 Suites")(
    suite1,
    suite2,
    suite3,
    suite4
  )

  def suite1 = suite("Suite 1 with 3 tests")(
    test("2 and 2 are the same number")(assert(2)(equalTo(2))),
    test("3 and 3 are the same number")(assert(3)(equalTo(3))),
    test("4 and 4 are the same number")(assert(4)(equalTo(4)))
  )

  def suite2 = suite("Suite 2 with 5 tests - 1 success, 1 failure and 3 ignore")(
    test("2 and 2 are the same number")(assert(2)(equalTo(2))),
    test("4 and 4 are the same number")(assert(4)(equalTo(4))) @@ TestAspect.ignore,
    test("3 and 4 are the same number")(assert(3)(equalTo(4))), // Fails
    test("5 and 5 are the same number")(assert(5)(equalTo(5))) @@ TestAspect.ignore,
    test("6 and 5 are the same number")(assert(6)(equalTo(5))) @@ TestAspect.ignore
  )

  def suite3 = suite("Suite 3 with 3 tests which will be ignored")(
    test("2 and 2 are the same number")(assert(2)(equalTo(2))),
    test("3 and 3 are the same number")(assert(3)(equalTo(3))),
    test("4 and 4 are the same number")(assert(4)(equalTo(4)))
  ) @@ TestAspect.ignore

  def suite4 = suite("Suite 4 not ignored but with 4 ignored tests")(
    test("4 and 4 are the same number")(assert(4)(equalTo(4))) @@ TestAspect.ignore,
    test("3 and 4 are the same number")(assert(3)(equalTo(4))) @@ TestAspect.ignore,
    test("5 and 5 are the same number")(assert(5)(equalTo(5))) @@ TestAspect.ignore,
    test("6 and 5 are the same number")(assert(6)(equalTo(5))) @@ TestAspect.ignore
  )
}

Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very simple change! Thank you for you work on this!

@adamgfraser adamgfraser merged commit 0661677 into zio:master Nov 24, 2020
atooni pushed a commit to blended-zio/zio that referenced this pull request Dec 1, 2020
* Add ignored Suites and Tests to the rendered test reports

* Hide the "ignored: 1" rendered in test reports for tests which are ignored within a suite

* Revert "Hide the "ignored: 1" rendered in test reports for tests which are ignored within a suite"

This reverts commit d0b6eec.

* Add explicit textual marking for ignored suites

* Fix unit tests

* Fix testRunnerJVM tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ignored tests not visible in report

2 participants