Fork me on GitHub
#kaocha
<
2019-05-07
>
dadair17:05:30

hmm I seem to have something preventing output from being captured and displayed as part of cucumber tests. Given:

(c/And "debug" [state]
  (println "[debug] ************************************************************************")
  (clojure.pprint/pprint state)
  state)
And a feature scenario:
Scenario: Unauthorized access
        Given a missing authorization header
        When an integration submits a request against version v0.5
        And debug
        Then the API rejects the request as unauthorized
I would expect some form of output capture, e.g.:
╭───── Test output ───────────────────────────────────────────────────────
│ ...
╰─────────────────────────────────────────────────────────────────────────
But I simply get:
clojure -A:test -m kaocha.runner feature
[(..)]
1 tests, 1 assertions, 0 failures.

dadair18:05:59

Or is test output only on failure? forcing the test to fail produces the output

dadair20:05:31

Also, I seem to have issues getting updates to step definitions being reflected in running feature tests from the REPL. I’m using deps.edn and integrant. I have “test/feature” and “test” as :extra-paths for my test alias which is being pulled in the REPL via Cider, with step definitions in test/step_definitions. When calling (reset) after updating a step definition, I can see that the step_definitions/X namespaces are being reloaded, but the change is not reflected in the running tests when I call (kaocha.repl/run :feature).

dadair21:05:10

ah I see that this is known: [ ] Cucumber steps don't currently reload correctly in watch (due to cache) -> convert to use function definitions in ns