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

Report succesful tests and add failures to quickfix #39

Merged
merged 1 commit into from
Feb 23, 2021
Merged

Conversation

mfussenegger
Copy link
Owner

@mfussenegger mfussenegger commented Feb 22, 2021

Adresses parts of #31

recording.mp4

@mfussenegger mfussenegger marked this pull request as ready for review February 22, 2021 22:53
@jlesquembre
Copy link

thanks @mfussenegger ! I tested it, looks better :-) I see the test results in the dap-repl, but:

  • In the terminal buffer I still only see the [Process exited 0] message
  • No errors are loaded in the quickfix list, and I get the message ... All 10 succeeded , but I can see the error in the dap-repl

It would be nice if we can reuse the same terminal to re-run the tests (or at least close automatically the previous terminal buffer) . It is a bit annoying to have a new window every time I run the tests.

In case is relevant, I tested it with jdk15 and Junit4

@mfussenegger
Copy link
Owner Author

In the terminal buffer I still only see the [Process exited 0] message

This depends on the test case you're running. If it writes to stdout or stderr you should see some output in the terminal.

No errors are loaded in the quickfix list, and I get the message ... All 10 succeeded , but I can see the error in the dap-repl

This is strange. What's the exact error that's written to the dap-repl, a stacktrace?

It would be nice if we can reuse the same terminal to re-run the tests (or at least close automatically the previous terminal buffer) . It is a bit annoying to have a new window every time I run the tests.

Yes I was thinking the same. This will have to change in nvim-dap itself.

@mfussenegger mfussenegger merged commit df23263 into master Feb 23, 2021
@mfussenegger mfussenegger deleted the tests branch February 23, 2021 19:44
@jlesquembre
Copy link

jlesquembre commented Feb 23, 2021

This depends on the test case you're running. If it writes to stdout or stderr you should see some output in the terminal.

I'll check it tomorrow, I'm not sure if the test writes to strout/stderr

This is strange. What's the exact error that's written to the dap-repl, a stacktrace?

Yes, in dap-repl I see a stacktrace, the same I see if I run mvn test

@mfussenegger
Copy link
Owner Author

mfussenegger commented Feb 23, 2021

Yes, in dap-repl I see a stacktrace, the same I see if I run mvn test

Could you post the stacktrace output and the name of the test class / method?

There's some logic that tries to find the test class in the stacktrace to get the line number of the test case that triggered the error. If that doesn't exist it currently doesn't pop up in the quickfix list/is not counted.

@jlesquembre
Copy link

I debug it a bit, and has nothing to do with the class/method name. It only fails when I do the assert inside a doOnSuccess from RxJava. But not always. If a find an easy case to reproduce, I'll post it, but for now I don't want to spend more time on it, since seems a rare corner case

This depends on the test case you're running. If it writes to stdout or stderr you should see some output in the terminal.

Right, if I do a System.out.print, it's showed in the terminal. I expected to see a similar output to the video you posted, but I guess that's an issue with my maven configuration

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

Successfully merging this pull request may close these issues.

2 participants