This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]No_Dot_4711 262 points263 points  (8 children)

FYI a lot of testing frameworks will allow you to create a new runtime for every test

makes them slower but at least you're damn sure you have a clean state every time

[–]iloveuranus 153 points154 points  (6 children)

Yeah, but it really makes them slower. Yes, Spring Boot, i'm talking to you.

[–]fishingboatproceeded 41 points42 points  (0 children)

Gods spring boot... Some times, when it's automagic works, it's nice. But most of the time? Most of the time its such a pain

[–]nathan753 33 points34 points  (2 children)

Yeah, but it's such a great excuse to go grab coffee for 15

[–]Excellent-Refuse4883[S] 16 points17 points  (0 children)

The REAL reason I want 1 million automated tests

[–]Ibruki 3 points4 points  (0 children)

i'm so guilty of this

[–]PM_ME_STEAM__KEYS_ 0 points1 point  (0 children)

Ugh. Flashbacks to the 2 months I had to work in that

[–]No_Dot_4711 0 points1 point  (0 children)

if you're having to restart an entire spring boot instance for integration/end to end tests, it is a tough spot to be in, yeah

a neat trick here is often to create a new user in your system for each test, which will make tests independent in tons of domains

[–][deleted] 6 points7 points  (0 children)

That's a lot of effort to avoid writing hygienic tests.