CodeceptJS Database Helper

JSON →
library 1.2.2 ·javascript
verified May 27, 2026

CodeceptJS Database Helper (codeceptjs-dbhelper) is a utility designed to integrate database interaction directly into CodeceptJS end-to-end and integration tests. It leverages the 'database-js' library and its various drivers, allowing testers to execute SQL queries or database commands to prepare and clean up test data efficiently. This helper is particularly useful for managing database state before and after test case execution, ensuring test isolation and consistent environments. The current stable version is 1.2.2, with releases typically tied to bug fixes or minor enhancements like improved JSDoc and TypeScript definitions (added in v1.1.0). A key differentiator is its compatibility across CodeceptJS versions 1, 2, and 3, and its reliance on the flexible 'database-js' ecosystem for connecting to a wide array of database types, including MySQL, PostgreSQL, SQLite, MS SQL Server, and even file-based sources like CSV and Excel. It simplifies database operations within the test runner's context without requiring direct database client imports in individual test files.

total hits 22
actors 8 distinct systems
last hit 21h ago human
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇸🇬 Singapore · 🇮🇹 Italy