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

Improve hypothesis output #127

Closed
Stranger6667 opened this issue Oct 8, 2019 · 1 comment
Closed

Improve hypothesis output #127

Stranger6667 opened this issue Oct 8, 2019 · 1 comment
Assignees
Labels
Priority: Medium Planned for regular releases

Comments

@Stranger6667
Copy link
Member

Stranger6667 commented Oct 8, 2019

At the moment we have errors during CLI run in the following form:

Falsifying example: single_test(case=Case(path='/api/v2/users, method='PUT', path_parameters={}, headers={}, cookies={}, query={}, body={}, form_data={}), session=<requests.sessions.Session at 0x7f0370cb9510>, url='http://127.0.0.1:8080', checks=(<function schemathesis.runner.not_a_server_error>,), stats=StatsCollector(data=defaultdict(<class 'collections.Counter'>, {'not_a_server_error': Counter({'total': 2549, 'ok': 1875, 'error': 674})})))

Which contains some not relevant information which affects readability. Probably we can write it in a different, more readable way. Not that useful parts:

  • test name. single_test is always there
  • case keyword, the keyword itself doesn't bring much, its value is much more important
  • stats, we will see them in the end and after implementing Display progress during the CLI run #125 they will be available during the CLI run
  • requests session.
  • checks representation. only the name is useful
    If we will remove those parts, then the output could look like this:
Falsifying example: 
  Parameters:
    - path='http://127.0.0.1:8080/api/v2/users'
    - method='PUT'
    - path_parameters={}
    - headers={}
    - cookies={}
    - query={}, 
    - body={}
    - form_data={}
  Failed checks: 
    - not_a_server_error

Also if we will not show empty case attributes, then the output will be even more readable

@Stranger6667
Copy link
Member Author

Done via #193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Medium Planned for regular releases
Projects
None yet
Development

No branches or pull requests

1 participant