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

Hierarchy of facts only visible on failures but not when printing facts #377

Open
ghost opened this issue Nov 25, 2016 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Nov 25, 2016

With these settings:

(change-defaults
  :print-level :print-facts)

And a code structure like this:

(facts "API"
  (facts "GET /apps"
    (fact "status" true)
    (fact "returns a collection" true))
  (facts "POST /apps"
    (fact "status" true)
    (fact "returns new URL with UUID" true)
    (facts "GET /apps"
      (fact "status" true)
      (fact "contains added app" true))))

I get such output:

Checking API
Checking GET /apps
Checking status
Checking returns a collection
Checking POST /apps
Checking status
Checking returns new URL with UUID
Checking GET /apps
Checking status
Checking contains added app

From this output the original hierarchy of facts is not visible anymore.

Due to the way emission plugins are implemented, this also affects them. E.g. the junit plugin outputs:

<testcase classname='my-namespace.test-handler' name='status' time='0.005'/>

With a name as short as that, omitting the complete hierarchy, it becomes very difficult to know what was actually tested.

However, when a fact fails, the hierarchy is printed:

FAIL "API - POST /apps - GET /apps/{appId} - DELETE /apps/{appId} - GET /{appId} - status" at (test_handler.clj:66)

It would be very good if :print-facts would also print the hierarchy, e.g. using dashes, like the output on failure does.

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

0 participants