Skip to content
EmbedLabs
GitHub
documentation

One run history with budtestlibrary and existing test suites

How budtestlibrary and each bud-runner adapter map tests, assertions and Bloom IDs into Bud, so mixed suites share one history.

Campaign week 2 · Bud TMP

budtestlibrary is EmbedLabs’ test framework for SIL, HIL, web, mobile, cloud and end-to-end testing. bud-runner records its results in Bud and also adapts existing pytest, Playwright, Behave, Robot Framework and Cucumber suites so every station reports into the same run history.

budtestlibrary provides lifecycle management (setUpClass, steps named bud_*, tearDownClass), rich assertions with tolerances and ranges, logging, Bloom metadata and artifact attachments such as CAN traces.

python -m bud_runner run-tests -t tests.vcu_hil.REGRESSION --upload
python -m bud_runner run-pytest tests/api
python -m bud_runner run-pytest tests/web

Each pytest test becomes one Bud test case: its node id as the class, its name as the method. Every assert becomes an entry named after what it checks (== is AssertEqual, < is AssertLess, in is AssertIn) with expected and actual values. A failed assert carries pytest’s explanation and traceback; a fixture error fails the test; skips and xfails count as skipped. Playwright tests are pytest tests, so browser checks report the same way. The bud_assert fixture adds tolerance and range checks without stopping the test at the first failure.

python -m bud_runner run-behave features/

Each feature becomes a test case and each scenario a result. A Then step is a check; Given and When steps are information entries. An undefined step fails with its own message. Tag a scenario @bloom:PRJ-002 to link it to Bloom.

python -m bud_runner run-robot --outputdir robot-results tests/

Each Robot test becomes a test case. Each library keyword call becomes an entry: keywords whose names contain “Should” are assertions, others such as Log are information. output.xml, log.html and report.html are attached to the run.

Already running cucumber-js, Cucumber-JVM or Cucumber-Ruby? Import their JSON report:

python -m bud_runner import-cucumber --report report.json

Every machine that runs tests is a Test Station with its own key: GitHub Actions runners, a browser host, a cloud runner, lab benches. In Bud’s run list a Playwright suite from web-e2e-01 sits next to a HIL regression from hil-bench-01, with the same dashboard, filters, PDF reports and Bloom sync. JUnit XML is still written for the pipeline.