Bun

Bun ships with a fast, built-in, Jest-compatible test runner that runs directly on the Bun runtime and supports TypeScript, JSX, lifecycle hooks, snapshot testing, UI & DOM testing Vitest can generate standard format JUnit-style XML files which can be submited to Testfiesta or Testrail using taco truck cli. You just need to install the popular Bun and install tacotruck cli or use Github action. Check out simple bun example.

Configuration

To generate xml report, output path and file name should be configured in test command scripts section of package.json

{
  "scripts": {
    "test:report": "bun test --reporter=junit --reporter-outfile=./test-results.xml"
  },
}

Install Tacotruck CLI

$ npm install -g @testfiesta/tacotruck

Submit test results

tacotruck testfiesta \
  run:submit \
  --token testfiesta_... \
  --handle orgHandle \
  --project projectKey \
  --name runName \
  --data results-path/*.xml

Github action

name: bun
on:
  pull_request:
    branches:
      - main
  push:
    branches:
      - main
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
        with:
          bun-version: 1.2.16
      - name: 📦 Install dependencies
        run: bun install
      - name: 🧪 Test
        run: bun test:report
      - name: Report Results
        uses: testfiesta/tacotruck-action@v1
        with:
         provider: testfiesta
         handle: <handle>
         project: <project>
         run-name: <run name>
         base-url: https://api.testfiesta.com
         credentials: ${{ secrets.TESTFIESTA_API_KEY }}
         results-path: ./reports/test-results.xml

Last updated