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

Suppress jqwik output #85

Open
martinmladenov opened this issue Dec 8, 2021 · 7 comments
Open

Suppress jqwik output #85

martinmladenov opened this issue Dec 8, 2021 · 7 comments
Labels
bug Something isn't working Low priority Maven plugin Related to the Maven plugin

Comments

@martinmladenov
Copy link
Collaborator

jqwik prints its output to the console and this output is not suppressed, which fills up the console when running property-based tests via the maven plugin

@martinmladenov martinmladenov added bug Something isn't working Low priority labels Dec 8, 2021
@Arraying
Copy link
Contributor

Arraying commented Feb 1, 2022

This is explicitly enabled in RunJUnitTestStep.java line 45. What was the reason for enabling it? Perhaps we could enable/disable depending on where Andy is being run from.

@martinmladenov
Copy link
Collaborator Author

This is explicitly enabled in RunJUnitTestStep.java line 45. What was the reason for enabling it? Perhaps we could enable/disable depending on where Andy is being run from.

It looks like it was enabled in 5833b94

@mauricioaniche Do you know why that could be?

@mauricioaniche
Copy link
Contributor

I think we wanted the message from jqwik when the property failed. But not the extra useless info that it prints when running the tests. Does that make sense?

@Arraying
Copy link
Contributor

Arraying commented Feb 2, 2022

Guys, I think we could solve this by also solving a more general problem. Right now, we can run Andy through WebLab, through the Maven plugin or the command line/IntelliJ. But I think it's unclear how it is run. Perhaps we could specify a "runner" system property that:

  • When called through the Docker image just does a -Drunner=weblab
  • When called through the Maven plugin just does a System.setProperty("runner", "plugin")
  • Or, when in main it notices no property set it defaults to System.setProperty("runner", "cli")

Then, we could set jqwik.reporting.usejunitplatform to true if we are using "weblab" otherwise to false. How does that sound?

@martinmladenov
Copy link
Collaborator Author

I don't see how this would be useful here - we don't need to print this information regardless of the environment.

@Jaswar
Copy link
Contributor

Jaswar commented Feb 6, 2022

The reason why I enabled jqwik.reporting.usejunitplatform was to get the output of JQWik - it was the only way I could find. By default it would print the whole output to the console. It was also important to show to the student the JQWik-found inputs that caused the errors and not only the assertion error message.
Unfortunately as you noted, the whole message is displayed including the run configuration, as this is what JQWik returns as the test fail reason.
Here is the whole discussion when developing this feature:
https://3.basecamp.com/4338320/buckets/22606949/todos/3837602898
https://3.basecamp.com/4338320/buckets/22606949/todos/3985404747

I also posted an issue about it on JQWik GitHub page:
jqwik-team/jqwik#209

Maybe by utilizing the other method suggested by the author of JQWik, we could extract only the relevant parts of the message.

@martinmladenov martinmladenov added the Maven plugin Related to the Maven plugin label Oct 11, 2022
@mauricioaniche
Copy link
Contributor

Is this ticket still valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Low priority Maven plugin Related to the Maven plugin
Projects
None yet
Development

No branches or pull requests

4 participants