You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: