Cursor пишет вам unit‑тесты за минуту. 5 паттернов, на которых эти тесты пропустят любой баг

Cursor, Copilot и другие AI‑инструменты обещают быстро закрыть рутину с unit‑тестами: сгенерировать кейсы, расставить моки, добавить ассерты и поднять покрытие. Но зелёные тесты ещё не означают, что код защищён от регрессий. В статье разбираем пять типичных паттернов, из‑за которых AI‑сгенерированные тесты выглядят убедительно, но пропускают реальные баги.

https://habr.com/ru/companies/otus/articles/1039858/

#unitтесты #AIтестирование #Cursor #Copilot #вайбкодинг #mutation_testing #Mockito #JUnit #автотесты #качество_тестов

Cursor пишет вам unit‑тесты за минуту. 5 паттернов, на которых эти тесты пропустят любой баг

Cursor пишет тесты быстро. Открыл класс, нажал Ctrl+I, кинул промпт «напиши unit‑тесты» — через минуту в файле сорок строк с моками, ассертами и красивыми именами вроде...

Хабр
Why We Should Not Mock Collections With Mockito | Baeldung

Mocking Java collections is rarely a good idea and can lead to brittle tests, unrealistic behavior, and unnecessary coupling to implementation details.

Baeldung on Kotlin

Внедряем Testcontainers за два дня или как перестать бояться рефакторинга и начать доверять своим тестам

Надоело, когда после сотни зеленых unit-тестов приложение падает на тестовом стенде? Когда рефакторинг превращается в кошмар из-за необходимости переписывать полсотни тестовых классов? Мне тоже надоело и я нашел решение. В статье покажу, как за два-три рабочих дня внедрить Testcontainers и начать писать тесты, которые действительно работают. В докладе вы найдете production-ready решение с PostgreSQL, Kafka и WireMock, которое выявит реальные проблемы еще до деплоя, честное тестирование реального поведения приложения.

https://habr.com/ru/articles/986870/

#testcontainers #mockito #test #java #spring

Внедряем Testcontainers за два дня или как перестать бояться рефакторинга и начать доверять своим тестам

Введение Я фанат тестов. Очень люблю, когда основные части моего кода покрыты полностью, от и до. Первая очевидная причина, для чего это нужно: если я закрываю задачу, то должен более-менее точно...

Хабр

Was tun, wenn #JUnit nicht mehr reicht? Christopher Olbertz zeigt, wie #AssertJ für bessere Lesbarkeit sorgt, #ArchUnit Architekturverstöße erkennt & #Mockito Tests entkoppelt.

Jetzt Teststrategie modernisieren: https://javapro.io/de/testen-mit-java-die-vielfaeltige-welt-der-test-frameworks/

#CleanCode #JAVAPRO #unittesting #JAVAPRO

#Mockito is my favorite library. Seeing how it had to adapt to Kotlin makes me like it even less (and I didn't like it at all to start with).

https://github.com/mockito/mockito/issues/3777

Stepping down as maintainer after 10 years · Issue #3777 · mockito/mockito

In March 2026, I will be Mockito maintainer for 10 years (nearly a third of my whole life). Looking ahead, I decided that a decade milestone is a good moment to pass on maintainership to other folk...

GitHub

Tim Van Der Lippe từ nhiệm vai trò quản lý dự án Mockito. Thay đổi này được công bố trên GitHub, cùng với buổi thảo luận trên Reddit về tương lai của dự án. #TinTức #LậpTrình #News #Programming #Mockito

https://www.reddit.com/r/programming/comments/1py3v4a/tim_van_der_lippe_steps_down_as_mockito_maintainer/

Tim van der Lippe: Stepping down as Mockito maintainer after 10 years

#java #mock #mockito #testing

https://github.com/mockito/mockito/issues/3777

Stepping down as maintainer after 10 years · Issue #3777 · mockito/mockito

In March 2026, I will be Mockito maintainer for 10 years (nearly a third of my whole life). Looking ahead, I decided that a decade milestone is a good moment to pass on maintainership to other folk...

GitHub
After a decade in the trenches of #Mockito, our brave hero 🦸♂️ decides it's time to step down from the glamorous life of open-source maintenance. Because who wouldn't trade debugging for sipping piña coladas on a beach? 🍹 You know it's serious when a GitHub issue gets its own #farewell tour. 🎤
https://github.com/mockito/mockito/issues/3777 #OpenSource #BeachLife #DebuggingLife #HackerNews #ngated
Stepping down as maintainer after 10 years · Issue #3777 · mockito/mockito

In March 2026, I will be Mockito maintainer for 10 years (nearly a third of my whole life). Looking ahead, I decided that a decade milestone is a good moment to pass on maintainership to other folk...

GitHub
Stepping down as maintainer after 10 years · Issue #3777 · mockito/mockito

In March 2026, I will be Mockito maintainer for 10 years (nearly a third of my whole life). Looking ahead, I decided that a decade milestone is a good moment to pass on maintainership to other folk...

GitHub

"How long did it take to fix a hanging test due to changed behaviour of #Mockito now returning non-null values when mocking methods returning futures?" — "Yes."

https://github.com/neo4j/neo4j-jdbc/commit/23c2e81adce41abc92149789bb8fdc852da357c5

Just to be clear, the test was somewhat broken before, the intention is now much clearer, so I embrace the change.

Nice puzzle to close of the year.

build(deps): Bump org.mockito:mockito-bom from 5.20.0 to 5.21.0 (#1217) · neo4j/neo4j-jdbc@23c2e81

This update of Mockito requires a change in testing due to a change of behaviour in Mockito 5.21, which now returns non-null, completed futures for mocks, see https://github.com/mockito/mockito/pul...

GitHub