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 · 6 comments

Comments

Projects
None yet
2 participants
@michaelmosmann
Copy link

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

This comment has been minimized.

Copy link
Owner

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Owner

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.

@jlink jlink added the enhancement label Apr 9, 2019

@michaelmosmann

This comment has been minimized.

Copy link
Author

michaelmosmann commented Apr 11, 2019

Thanks a lot:)

@jlink jlink added the in progress label Apr 13, 2019

@jlink

This comment has been minimized.

Copy link
Owner

jlink commented Apr 14, 2019

Fixed in d1f899c

@jlink

This comment has been minimized.

Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.