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

Add tests #32

Open
bitspittle opened this issue Jan 23, 2024 · 2 comments
Open

Add tests #32

bitspittle opened this issue Jan 23, 2024 · 2 comments
Assignees
Labels
process Some work that is important but not user facing

Comments

@bitspittle
Copy link
Contributor

It is important to figure this out soon, so that new code that goes in will see a precedent that they should be using tests.

@bitspittle bitspittle added the process Some work that is important but not user facing label Jan 23, 2024
@bitspittle bitspittle added this to the Next release milestone Jan 23, 2024
@bitspittle bitspittle self-assigned this Feb 26, 2024
@bitspittle
Copy link
Contributor Author

Despite my best efforts -- 3 grueling days of deep diving into IJ test framework code -- I've come to the conclusion that tests simply aren't worth it at this point.

I tried creating IJ light tests, but those are super hacky. They barely resemble a real project, and there's no trivial way, or at least clearly documented way, to add dependencies on real libraries (which I wanted to do with Kobweb stuff). They are also single module projects only, and I am sure I will want to test multi-module projects soon.

I tried creating an IJ heavy test using Gradle, but that was a failure as well -- I simply could not figure out how to get the Gradle project to sync and not leak resources. All the example code online I could find with IntelliJ Gradle tests used internal helper methods that were not available to mere mortals like myself.

So at this point, I'm just going to lean on manual QA for now. The Kobweb plugin is relatively small and probably will be for its lifetime. Most of (all of?) its actions will all be isolated into one-off commands that will just work or they won't.

I'm very sad about this but my time as a solo dev is limited and I'm already fighting the IJ APIs enough just to get the plugin working :) The test framework is very bad -- it's a relic of the past with random fixtures and fixture settings all over the place that you have to magically know how to set, and even then, things don't quite work sometimes. The original way that JB tested their stuff using JUnit3 is awful, and it pervades almost all of their tests to this day. Booooo.

@bitspittle bitspittle removed this from the Next release milestone Feb 28, 2024
@Nxllpointer
Copy link
Collaborator

Oh well intellij being intellij again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Some work that is important but not user facing
Projects
None yet
Development

No branches or pull requests

2 participants