57

We are in a very funny situation where I just spent two weeks fixing FE bugs and there are so many left. I asked to add integration tests but the answer was “no”, cause we can’t test the UI and all of that.

So the proposed solution was to be more careful, except I’m careful but testing whole website parts or the whole website is not feasible. What can I do?

you are viewing a single comment's thread
view the rest of the comments
[-] GissaMittJobb@lemmy.ml 4 points 11 months ago

So you're probably not going to be able to swing getting a project greenlit to test everything on your frontend, partly because your management seems a bit stingy, and partly because it's probably not the best approach to do this kind of thing anyway.

To the claim of that you can't test UI: only if you're not creative enough. Behavior can 100% be tested, and is worthwhile to test, while UI looks can be verified with screenshot tests.

How I would probably approach this would be:

  1. Get some very basic test execution infrastructure in place. Ideally it runs in CI, but if you have to do it in the dark, then just make sure you can run it locally
  2. Try to refactor parts of the code you touch to actually have its behavior testable - do this as a part of any ongoing work of navigating the codebase
  3. Whenever you add functionality, add a test to verify it. Write the test first if you can
  4. Whenever you encounter a bug, write a test asserting the behavior you want, then fix the bug such that the test gets green.

Following these steps should successively put the codebase into a healthier state.

Another perhaps even more valid option would be to look for a better job - working in headwind from management is not recommended, as it will deteriorate your mental health.

Good luck!

this post was submitted on 05 Dec 2023
57 points (100.0% liked)

Programming

17314 readers
43 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS