Urgent.News

What's breaking now, across thousands of outlets.

Tech

Beyond DBUnit and Raw SQL: Type-Safe Database State in Java Tests

If you’ve spent any time writing integration tests in Java or Kotlin against real databases, you’ve likely hit one of these pain points: DBUnit XML/YAML fixtures that rot silently until column renames break CI. Hand-written SQL seeding scripts with zero autocomplete or compile-time safety. Overloaded JPA/Hibernate entities dragged into simple test setups just to insert two rows. Mocks hide…

The article discusses the challenges faced when writing integration tests in Java or Kotlin against real databases, such as DBUnit XML/YAML fixtures, hand-written SQL seeding scripts, and fragile test data. To address these issues, the author developed jdbscript, a lightweight Java library with Apache 2.0 licensing. jdbscript treats database seeding as plain Java code, offering compile-time safety, full compiler support, and dynamic proxies for table cleanup, foreign key ordering, and runtime execution.

The library allows defining the schema as an interface, creating a JDBEngine to handle database manipulation, and seeding test fixtures cleanly. Key features include automatic foreign key ordering and cleanup, migration testing, zero framework lock-in, and broad database support across major databases. jdbscript is available on Maven Central, and the author encourages readers to try it out with the provided examples.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

"Company Portal can't connect" / device not syncing — a 10-minute triage order for Intune admins

"Company Portal can't connect": a 10-minute triage order The ticket says "Company Portal can't connect" or "my laptop isn't getting the new policy." The tempting move is to start re-enrolling.

  • Company Portal not connecting, often resolved with Intune triage process
  • Check user scope, license, and MDM scope for Company Portal issues
  • Examine device status, MDM URL, and sync times to troubleshoot

Gomponents v1.4.0 Released: Performance Boosts and New Feature for Go HTML Component Library

Introduction Six years in the making, gomponents has solidified its place as a mature and efficient Go library for building HTML components without extra build steps.

  • Performance gains with memory usage optimization in gomponents v1.4.0
  • Computational overhead reduced through inlining and simplified control flow
  • Official coding agents skill introduced for enhanced developer workflows

More from Wednesday 7 October →