3 ms·
> I.e. what is wrong with Intellij's existing right click-execute on a single junit test method to debug and inspecting variables that way? There is definitely
by artpar 3y ago
> I.e. what is wrong with Intellij's existing right click-execute on a single junit test method to debug and inspecting variables that way?
There is definitely nothing wrong with it if there are unit test cases available. But there is some extent of context switching in the current code-test cycle. And in the worst case scenario there are no test cases altogether and the team would rely on sanity testing + qa testing, eventually leading to some regressions on production. So you would be able to do the same thing with Atomic Run which you are doing currently with junit test cases but faster.
> Isn't this just reinventing the wheel and just replicating a built in IDE feature?
There is an overlap of functionality but no reinventing of wheel for sure. What we are trying to invent is construction of test cases itself without them being in the form of a junit test case (which is a maintenance overhead)
> Also this is seems to be unit testing, E2E (or to be precise "component") testing in my experience is what takes much longer and is where time is lost constructing the fixtures, but importantly E2E tells you if you've made stupid mistakes like using GET instead of POST, or have an XML serialiser overriding the JSON one you intended, which you don't pick up in unit tests.
So this is actually E2E testing and not unit testing because we don't have the capability of mocking down stream calls. If you do a Atomic Run on method1 which calls method2 and method3 on a different service, the method2/method3 would still be invoked and the outcome would depend on their response. Once we have the downstream mocking ready then it would be a unit test.
> Now if you could somehow save an entire VM stack/state of a system for E2E tests that wasn't brittle to code change, that could just rebuild that state with a single line of code, that would be my dream time saver. The closest I've seen anything like that is recording HTTP request responses or serialising individual Java objects to JSON and using those as fixtures...
Believe me this is what we started doing in the first place, and we have still have that in the plugin. It is just hidden from the UI since we received a mediocre response on generating junit test cases (maintenance headache). So we trimmed it down to the current form. If you are interested I can share a custom build with that enabled for you to try it out. Just send me an email or ping us on the discord group.