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

Do you have plans to support this plugin in Rider? #35

Open
afucher opened this issue May 17, 2020 · 10 comments
Open

Do you have plans to support this plugin in Rider? #35

afucher opened this issue May 17, 2020 · 10 comments

Comments

@afucher
Copy link

afucher commented May 17, 2020

Hi,

I was using this plugin when I was working with Java, but now I'm working with C# and using Rider.
The plugin is available to download and install, but not work as expected. The TCR is not working :/

I would love to have this working on Rider, do you have checked if is something viable to do this?

@dkandalov
Copy link
Owner

Hi,

Thanks a lot for reporting this!

Looks like a bug in the plugin which should be fixed. Yes, I think it's worth fixing because in theory the plugin should work in IntelliJ IDEs.

@afucher
Copy link
Author

afucher commented May 17, 2020

Nice, it seems also that the line change counter is also wrong.

I don't have knowledge about developing plugins, but if I have some time I'll try to take a look. I've started to make C# live coding on twitch, and I want to use TCR, and this plugin will help me a lot!
Maybe I tried to make a live to learn and try to fix this bug, is an idea that occurs me now.

@afucher
Copy link
Author

afucher commented May 18, 2020

@dkandalov can you give me some steps about how can I run this project to debug? I tried to import on IntelliJ but was not able to configure to run and debug :/

@afucher
Copy link
Author

afucher commented May 18, 2020

Just have discovered the intellij->runIde task, now I'll try to discover how to run on Rider

@afucher
Copy link
Author

afucher commented May 18, 2020

Just to update, I was able to debug on Rider! I'll probably start to check this issue tomorrow, in a live code session on Twitch. But my live code is in Portuguese.
Hope I'll be able to identify and help with this issue

@afucher
Copy link
Author

afucher commented May 19, 2020

Hi @dkandalov , today I spent some time debugging the issue and I found a different behavior between IntelliJ and Rider.
IntellJ send a Notification when the Test Runner finishes with something like this 10:52 PM Tests passed: 1. But Rider doesn't send this Notification.

Making some research on the internet I found that is an abstract TestStatusListener that could be used to implment this.
But probably will need to make a lot of changes into this plugin.

I didn't tried to use this approach, I'll like to get your opinion related to this before try to use this Listener.

@dkandalov
Copy link
Owner

Oh, this explains why TCR doesn't work.

If TestStatusListener works and has all the information, it's good enough (I vaguely remember not using it for some reason, but if it works now this is great).

@afucher
Copy link
Author

afucher commented May 19, 2020

I need to check if it works, I don't know if it has all the information. The documentation of this is not so good as I was expecting.
I'll make some tests, and update this issue ASAP.

@dkandalov
Copy link
Owner

dkandalov commented May 20, 2020

Yes, there is not much documentation but given that TestStatusListener is not part of "openapi" this is fair enough I guess. I usually check out IJ source code and browse it as documentation of how things are actually used.

I quickly looked at TestStatusListener and there are couple potential problems:

  • notifySuiteFinished(AbstractTestProxy root) is not passing the current project, so you essentially don't know the project in which it was called. This function is deprecated by maybe it's still called from some unit testing plugin 🤷‍♂️
  • in notifySuiteFinished(@Nullable AbstractTestProxy root, Project project) the root is nullable so there is not guarantee that there will be an object describing test results

In practice, all of the above might work just fine for majority of languages and testing frameworks. But the only way to really know is to manually test I guess.

@dkandalov
Copy link
Owner

Actually, I suspect that Rider doesn't use TestStatusListener at all. There is a chance it's C# code from resharper running in a separate process and using IJ api for UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants