mystamps
mystamps copied to clipboard
Migrate unit tests away from Spock to JUnit back
Rationale:
- less languages/frameworks to learn => easier start for contributors
- less languages/frameworks to support/maintain => less headache to me (CodeNarc and its plugin have issues: #508, #539, #994), less time I need to spend on this (for example, updating Gmaven plugin (#958), Groovy (#938), Spock (#761), CodeNarc (#1187), integration to our CI (#1479))
- I noticed that tests on Spock/Groovy are running slower in IDEA than JUnit ones
- The community seems inactive so the future is unclear and features/updates get released longer
- JUnit has rich ecosystem
- I found that syntax sugar doesn't outweight all aforementioned
TODO:
- [ ] SlugUtilsTest
- [ ] LocaleUtilsTest
- [ ] PagerTest
- [ ] SeriesSalesServiceImplTest
- [ ] CatalogUtilsTest
- [ ] StampsCatalogServiceImplTest
- [ ] SeriesSalesImportServiceImplTest
- [ ] SeriesInfoExtractorServiceImplTest
- [ ] TimedSeriesInfoExtractorServiceTest
- [ ] SeriesImportServiceImplTest
- [ ] SeriesServiceImplTest
- [ ] CollectionServiceImplTest
- [ ] CategoryServiceImplTest
- [ ] ParticipantServiceImplTest
- [ ] FilesystemImagePersistenceStrategyTest
- [ ] ImageServiceImplTest
- [ ] TimedImagePreviewStrategyTest
- [ ] DatabaseImagePersistenceStrategyTest
- [ ] SiteServiceImplTest
- [ ] CronServiceImplTest
- [ ] SuspiciousActivityServiceImplTest
- [ ] UsersActivationServiceImplTest
- [ ] UserServiceImplTest
- [ ] CountryServiceImplTest
- [ ] Remove plugin, dependencies, build logic, Danger support, update editorconfig
- [ ] Close Groovy/Spock-related issues
- [ ] Update README/NEWS
- [ ] remove dependency on
junit-jupiter-engineand exclude (and ban?)junitfrom other dependencies - [ ] remove a comment for #761
Heh, Spring Security has been also migrated away of Groovy: https://github.com/spring-projects/spring-security/issues/4939
Good comparison: https://blog.solidsoft.pl/2020/04/15/spock-vs-junit-5-the-ultimate-feature-comparison/
Perhaps we can use @TestTemplate -- https://www.baeldung.com/junit5-test-templates
https://www.arhohuttunen.com/junit-5-mockito/