mystamps icon indicating copy to clipboard operation
mystamps copied to clipboard

Migrate unit tests away from Spock to JUnit back

Open php-coder opened this issue 5 years ago • 4 comments

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-engine and exclude (and ban?) junit from other dependencies
  • [ ] remove a comment for #761

php-coder avatar Jan 26 '20 00:01 php-coder

Heh, Spring Security has been also migrated away of Groovy: https://github.com/spring-projects/spring-security/issues/4939

php-coder avatar Mar 05 '20 16:03 php-coder

Good comparison: https://blog.solidsoft.pl/2020/04/15/spock-vs-junit-5-the-ultimate-feature-comparison/

php-coder avatar May 05 '20 12:05 php-coder

Perhaps we can use @TestTemplate -- https://www.baeldung.com/junit5-test-templates

php-coder avatar Dec 28 '20 04:12 php-coder

https://www.arhohuttunen.com/junit-5-mockito/

php-coder avatar Jan 22 '21 05:01 php-coder