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

jqwik should fail property test instead of ignoring it #54

Closed
michaelmosmann opened this issue Apr 8, 2019 · 7 comments
Closed

jqwik should fail property test instead of ignoring it #54

michaelmosmann opened this issue Apr 8, 2019 · 7 comments

Comments

@michaelmosmann
Copy link

@michaelmosmann michaelmosmann commented Apr 8, 2019

Testing Problem

following kotlin test

class FooTest {

  @Property
  fun foo(name: String, @ForAll other: String) {
    assertNull(name)
  }
}

should fail, but is ignored (guess: name is not annotated but other is).

Suggested Solution

jqwik should fail such a test.

@jlink
Copy link
Owner

@jlink jlink commented Apr 8, 2019

Well, the test will be marked as ignored together with an ignore message "All parameters must have @forall annotation". Depending on your IDE / build tool configuration this can be as obvious as a test failure. What additional information would a test failure provide?

@michaelmosmann
Copy link
Author

@michaelmosmann michaelmosmann commented Apr 9, 2019

For me it would be ok to fail this test with this message. AFAIK gradle reports an skipped test (if reporting) is enabled. But if i want gradle to fail the build i must distinguish between this case and a disabled junit test.

For me this is some kind of configuration error.. like @forall for a type without an known Arbitrary. It should fail, because i would not expect, that the test will be skipped.

@jlink
Copy link
Owner

@jlink jlink commented Apr 9, 2019

Hm. You're right, the behaviour is inconsistent. I'll put it on the TODO list. Should be done in next release.

@michaelmosmann
Copy link
Author

@michaelmosmann michaelmosmann commented Apr 11, 2019

Thanks a lot:)

@jlink
Copy link
Owner

@jlink jlink commented Apr 14, 2019

Fixed in d1f899c

@jlink
Copy link
Owner

@jlink jlink commented Apr 14, 2019

Available in 1.1.3-SNAPSHOT

@jlink jlink closed this Apr 14, 2019
@jlink jlink removed the in progress label Apr 14, 2019
@jlink
Copy link
Owner

@jlink jlink commented Apr 27, 2019

Released in 1.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants