vendredi 15 novembre 2019

Uphill battles with unit/rest testing with spring boot and kotlin

Im not entirely sure if this is right place for this kind of question, but im gonna try and take atleast few minutes off this hell they call testing with spring boot.

Im looking for any resource ( books / sites / etc ) with up to date information about testing.

im java/kotlin dev, entering my 4th year now and feel i have ok grasp when it comes to java/kotlin and spring-boot software. but there is one category that just reks my brain. testing, unit and rest.

For whatever reason, every single time im trying to either make new tests or update old ones, i run into same problems..

Today i've been wondering for hours

  1. why in the name of _ cant my unit tests load application context / i solved this with what i like to call copy and paste everything from other projects. This quickly leads to messy code and very very stupid testing, because 'atleast it runs and does the job'

  2. After that one, now i cant seem to find any working configuration for my Rest API tests. at the moment of writing, fix for 1. seem to have broken getting EntityManagerFactoryBuilder. and now i have new error...

So what im looking for is something like following:

  1. Comprehensive reading material about testing with spring boot, preferably with Kotlin, im okey with 900 page books and documentation. I actually would prefer that over half-page tutorials that all differ from one to another.

  2. Up to date resources. Googling promptly brings me very old material about this subject.

  3. What frameworks are the best, most easy, and compatible with spring-boot / kotlin

For some reason i would expect making tests to be waaay more easy than making enterprise graded software from ground up using half burned specs from people with no coding skills, yet here i am, with working software ( tested with postman ) wondering why my tests just wont effin run.....

Thank you, and sorry

Aucun commentaire:

Enregistrer un commentaire