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

cider test report does not show stack trace for test.chuck #2449

Closed
flyingmachine opened this issue Sep 13, 2018 · 3 comments · Fixed by clojure-emacs/cider-nrepl#550
Closed
Labels
bug good first issue A simple tasks suitable for first-time contributors

Comments

@flyingmachine
Copy link

Expected behavior

When I run a test that uses com.gfredericks.test.chuck.clojure-test/checking using C-c C-t t, and that test throws an exception, then the stack trace should appear in the cider test report.

Actual behavior

The test report includes:

Test Summary
minimal-cider-test-report-failure.core-test

Tested 1 namespaces
Ran 1 assertions, in 1 test functions
1 failures


Results

minimal-cider-test-report-failure.core-test
1 non-passing tests:

Fail in failing-report
failure report gives error in process filter

The exception isn't shown. The following is added to the *Messages* buffer:

Running test failing-report in minimal-cider-test-report-failure.core-test...
minimal-cider-test-report-failure.core-test: Ran 1 assertions, in 1 test functions. 1 failures, 0 errors.
error in process filter: cider-insert: Wrong type argument: stringp, (dict "fail" ((dict)) "failing-size" 0 "num-tests" 1 "result" "clojure.lang.ExceptionInfo: boop {}" "seed" 1536864029083 "shrunk" (dict "depth" 0 "result" "clojure.lang.ExceptionInfo: boop {}" "smallest" ((dict)) "total-nodes-visited" 0))
error in process filter: Wrong type argument: stringp, (dict "fail" ((dict)) "failing-size" 0 "num-tests" 1 "result" "clojure.lang.ExceptionInfo: boop {}" "seed" 1536864029083 "shrunk" (dict "depth" 0 "result" "clojure.lang.ExceptionInfo: boop {}" "smallest" ((dict)) "total-nodes-visited" 0))

Steps to reproduce the problem

  1. git clone https://github.com/flyingmachine/cider-test-report-failure.git
  2. jack into the project
  3. Execute C-c C-t t for the test minimal-cider-test-report-failure.core-test/failing-report

Environment & Version information

CIDER version information

;; Connected to nREPL server - nrepl://localhost:58145
;; CIDER 0.18.0 (Saigon), nREPL 0.2.13
;; Clojure 1.9.0, Java 10.0.2

Lein/Boot version

Lein 2.8.1

Emacs version

26.1

Operating system

macOS High Sierra 10.13.6

@bbatsov bbatsov added the bug label Sep 14, 2018
@bbatsov
Copy link
Member

bbatsov commented Sep 17, 2018

Seems we're getting some unexpected response when running this test and this causes the error. That should be easy enough to debug with your excellent report, but I won't have time to work on CIDER for a while. A hint for someone willing to tackle this - instrument cider-insert before running this test and see what happens there.

@bbatsov bbatsov added the good first issue A simple tasks suitable for first-time contributors label Sep 17, 2018
@mallt
Copy link
Contributor

mallt commented Oct 12, 2018

CIDER expects a message that documents a test to be a string. clojure.test/is seems to accepts vectors and maps as msg as well, so it would be good if CIDER could handle these as well.

I think it would make most sense to transform the :message to a string in cider-nrepl. Otherwise the message is transfered to emacs as an nrepl-dict and then needs to be transformed in CIDER in order to print it in the test results buffer.

@bbatsov do you agree on this approach? Thanks!

@bbatsov
Copy link
Member

bbatsov commented Oct 12, 2018

CIDER expects a message that documents a test to be a string. clojure.test/is seems to accepts vectors and maps as msg as well, so it would be good if CIDER could handle these as well.

I guess I completely missed this. :-)

@bbatsov do you agree on this approach? Thanks!

Yeah, I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants