Skip to content

omairvaiyani/ghact-uilicious

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UIlicious GitHub Action

This action executes your UI-licious tests and reports the outcome. Use this as part of your GitHub Workflow CI/CD pipeline.

Inputs

access-key

Required Your UI-licious account API key. See instructions here.

project

Required Your UI-licious project name. You should see this at the top-left corner when viewing the UI-licious editor.

tests

Required One or more (comma-separated) tests to run. For advanced usage, see pattern input and example usage.

browser

Optional If provided, your tests will run in this browser. See the list of supported browsers. Defaults to your project's settings.

dataset

Optional If provided, your tests will run with the given dataset selected.

data-object

Optional If provided, will pass a JSON object with parameters to your tests.

blow-up

Optional If 'false', the action will not be marked as failed even if tests fail. Defaults to 'true'.

pattern

Optional If 'true', the tests input will be treated as a multi-match glob pattern. See example usage. Defaults to 'false'.

verbose

Optional If 'true', info logs will be printed including test run messages from UI-licious. Defaults to 'false'.

Outputs

pass

If all tests passed: 'true'. Else: 'false'.

total

The number of tests that were ran.

total-failed

The number of tests that reported a failed run.

test-outcomes

A JSON string array containing outcomes for each test:

[{ "testName": "string", "didPass": "true|false", "testRunUrl": "https://..." }]'

Example usage

Ensure that your access-key is stored in GitHub secrets.

Single test

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: login

Multi-test

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: login, logout

Tests in folders

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: "account/password-reset"

Optional configuration

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: login
  browser: safari
  dataset: qa-sample-data

Advanced usage with patterns

If you set the input pattern to "true", you can use glob-patterns to match tests rather than individually list one. This is particularly helpful if your test-suite is constantly changing. I recommend that you use strong naming conventions to aid the pattern matching usage here.

Note - you must use single quotes when using glob-patterns.

Run ALL tests

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: '**'
  pattern: true

Run a subset of tests

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: 'authentication/**, billing/**'
  pattern: true

Run ALL but some tests

uses: omairvaiyani/ghact-uilicious@v1
with:
  access-key: ${{ secrets.UILICIOUS_ACCESS_KEY }}
  project: my-project
  tests: '**, !helpers/**'
  pattern: true

Limitations

Currently there is an issue with tests that contain spaces. This appears to be due to how UI-licious's CLI reads bash arguments - it cuts off the test name on space characters. Please wait for a future release where this is resolved or avoid spaces if you can.