CI/CD integration for mobile cluster testing.
Provides automated testing capabilities for dala Elixir clusters, including test orchestration, result collection, and reporting.
Examples
# Run a test suite on a cluster
{:ok, results} = DalaDev.CITesting.run_suite(my_suite, nodes: nodes)
# Generate a CI report
DalaDev.CITesting.generate_ci_report(results, format: :junit)
# Run tests with automatic device provisioning
{:ok, results} = DalaDev.CITesting.run_with_provisioning(test_config)
Summary
Functions
Generate a CI report from suite results.
Run a test suite on specified nodes.
Run tests with automatic device provisioning.
Create a simple test suite from a list of modules.
Types
@type suite_result() :: %{ suite: test_suite(), results: [test_result()], summary: map(), start_time: DateTime.t(), end_time: DateTime.t() }
Functions
@spec generate_ci_report( suite_result(), keyword() ) :: {:ok, String.t() | :ok} | {:error, term()}
Generate a CI report from suite results.
Formats:
:junit- JUnit XML format for CI systems:html- HTML report:text- Plain text summary:json- JSON format
@spec run_suite( test_suite(), keyword() ) :: {:ok, suite_result()} | {:error, term()}
Run a test suite on specified nodes.
Options:
:nodes- List of nodes to run tests on (default: Node.list()):parallel- Run tests in parallel (default: true):timeout- Per-test timeout in ms (default: 60_000)
Returns a suite_result.
@spec run_with_provisioning( test_suite(), keyword() ) :: {:ok, suite_result()} | {:error, term()}
Run tests with automatic device provisioning.
This will:
- Provision devices/emulators as needed
- Deploy the test build
- Run the test suite
- Collect results
- Clean up (optional)
Options:
:cleanup- Clean up after tests (default: true):provision_opts- Options passed to provisioning
@spec suite_from_modules(String.t(), [module()]) :: test_suite()
Create a simple test suite from a list of modules.
Each module should have a run_tests/0 function that returns test results.