Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ScalaTest printing inside TestBuilder #96

Closed
seldridge opened this issue Dec 9, 2019 · 1 comment
Closed

Support ScalaTest printing inside TestBuilder #96

seldridge opened this issue Dec 9, 2019 · 1 comment

Comments

@seldridge
Copy link
Member

There are a lot of useful printing features inside ScalaTest that are currently not usable inside a TestBuilder environment:

  • Given/When/Then of GivenWhenThen
  • info of Informing
  • feature/scenario of FeatureSpec variants

This limits the ability of a user to write a descriptive test that provides ScalaTest-reported output about what the test is doing. Users can always rely on println (which does work). However, println isn't integrated with the ScalaTest environment in any way and doesn't expose at what point in a test something failed.

As one example, I'd like the following to be supported:

behavior of "Foo"

it should "bar" in {
  def test(new Foo) { c => 
    Given("a Foo initialized via reset for 4 cycles")
    c.doReset(4)

    When("a sequence is enqueued")
    c.in.enqueSeq(Seq(1, 2, 3))

    Then("the same sequence should be dequeued")
    c.out.expectDequeueSeq(Seq(1, 2, 3))
  }
}

Currently, this will just swallow the Given/When/Then and not print them.

See: http://doc.scalatest.org/3.1.0/org/scalatest/GivenWhenThen.html

This is related to some comments I made in #68, but is really a disjoint issue.

@ekiwi
Copy link
Collaborator

ekiwi commented Jan 11, 2023

Tighter scalatest integration is something that probably won't happen.

@ekiwi ekiwi closed this as completed Jan 11, 2023
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

No branches or pull requests

2 participants