2

I'm in the process of evaluating Testim.io (Tests automation framework). They provide a CLI for running tests in a CI environment but do not support Github Actions. I've been trying to run it anyway, using the local option (which spins up a local Chrome instance) but failed miserably. The steps that were taken:

  1. Install Chromium using browser-actions/setup-chrome@latest action.
  2. Run testim-cli with the --use-local-chrome-driver flag, passing the Chromium bin location (--chrome-binary-location=$(which chrome)).

The error I'm getting in the action logs: enter image description here

I suspect I might be passing the wrong location of the chromium bin, but I'm not aware of any debugging tools in Github Actions that might help in that case.

Did anyone encounter anything similar?

AranS
  • 1,871
  • 10
  • 22

2 Answers2

1

In case anyone encounters a similar issue (hopefully this will be supported soon by Testim).
It seems like the CLI didn't manage to run the tests as there's no display server in the remote machine.
I finally managed to run it by using the xvfb-action: enter image description here

AranS
  • 1,871
  • 10
  • 22
  • How do you install the testim-cli package in your workflow? I have a syntax problem withe the double `&&` when I use `run: npm i -g @testim/testim-cli && testim --token ....` And do you still need to include the `browser-actions/setup-chrome` action? – dennis May 12 '22 at 11:04
  • 1
    It works now when I put both commands in separate steps. – dennis May 12 '22 at 11:36
0

Testim now supports github actions. Here's a sample yaml from official docs:

name: Testim E2E
on: [push]

jobs:
    run-testimio-cli:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@v2
            - uses: actions/setup-node@v2
              with:
                node-version: '16.13.0'
            - run: npm install -g @testim/testim-cli
            - run: testim --token <TESTIM_TOKEN> --project <PROJECT_ID> --grid <GRID_NAME>

Here's my sample project if you are interested to know more.