bx-orm-testing

Create and run BoxLang ORM integration tests with MySQL Docker containers.

2|Updated Apr 11, 2024
One-click install
npx skills add https://github.com/ortus-boxlang/bx-orm --skill bx-orm-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bx-orm-testing
Source: https://github.com/ortus-boxlang/bx-orm/tree/main/.agents/skills-custom/bx-orm-testing
Command: npx skills add https://github.com/ortus-boxlang/bx-orm --skill bx-orm-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the complex setup required for testing BoxLang ORM entities, ensuring consistent database integration and runtime configuration for developers.

Core Features & Use Cases

  • Standardized Test Infrastructure: Provides a robust BaseORMTest superclass to handle BoxLang runtime lifecycle and context management.
  • Database Integration: Automates MySQL container orchestration and schema seeding via Docker Compose.
  • Use Case: When developing new ORM entities, use this Skill to quickly scaffold CRUD tests, verify transaction commits, and validate BIF behavior against a real MySQL instance.

Quick Start

Use the bx-orm-testing skill to generate a new integration test class that extends BaseORMTest for the Vehicle entity.

Frequently Asked Questions about bx-orm-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up integration tests for BoxLang ORM entities?

To set up integration tests for BoxLang ORM entities, you extend a standardized BaseORMTest superclass that manages the BoxLang runtime lifecycle and context configuration automatically.

How can I automate MySQL container orchestration for ORM database testing?

Automating MySQL container orchestration for ORM database testing is handled via Docker Compose, which provisions isolated test environments and performs automated schema seeding for your test suites.

Does BoxLang ORM testing support JUnit 5 test suites?

Yes, BoxLang ORM testing supports JUnit 5 test suites by providing infrastructure to validate entity models, test BIF behavior, and verify transaction lifecycles against a real MySQL instance.

What is the best way to validate transaction commits in BoxLang ORM?

The best way to validate transaction commits in BoxLang ORM is to scaffold CRUD tests using the testing infrastructure, which executes assertions against an isolated MySQL Docker container.

Do I need Docker to run BoxLang ORM integration tests?

Yes, you need Docker to run BoxLang ORM integration tests because the framework relies on Docker Compose to orchestrate MySQL containers and seed the database schema for isolated testing.

Why does my BoxLang ORM test fail to manage runtime contexts?

BoxLang ORM tests fail to manage runtime contexts when the test class does not properly extend the BaseORMTest superclass, which is required to handle the BoxLang runtime lifecycle and context setup.