KMKoushik / codeceptjs-selenoid

Selenoid plugin with video recording capabilities for CodeceptJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

codeceptjs-selenoid

Selenoid plugin with video recording capabilities for CodeceptJS

Prerequisite

  • Docker

How to ?

1. Add browsers.json

Add browsers.json parallel to codecept conf location. Refer here to know more about browsers.json

You can download the sample json from example.

2. Add plugin configuration in codecept

Add plugin config to codecept conf.

plugins: {
    selenoid: {
      require: '../lib/index',
      enabled: true,
      name: 'testnoid',
      deletePassed: true,
      autoCreate: true,
      autoStart: true,
      sessionTimeout: '30m',
      enableVideo: true,
      enableLog: true,
      additionalParams: '--env TEST=test',
    },
  }

Options:

Param Description
name Name of the container
deletePassed Delete video and logs of passed tests
autoCreate Will automatically create container (Linux only)
autoStart If disabled start the container manually before running tests
enableVideo Enable video recording (video folder of output)
enableLog Enable video recording (logs folder of output)
additionalParams Refer here to know more

3. Create selenoid container

If you are using linux machine, we can handle this for you.

Run the following command to create one. To know more refer here

docker create                                    \
--name selenoid                                  \
-p 4444:4444                                     \
-v /var/run/docker.sock:/var/run/docker.sock     \
-v `pwd`/:/etc/selenoid/:ro                      \
-v `pwd`/output/video/:/opt/selenoid/video/      \
-e OVERRIDE_VIDEO_OUTPUT_DIR=`pwd`/output/video/ \
aerokube/selenoid:latest-release

Sample

Sample

About

Selenoid plugin with video recording capabilities for CodeceptJS

License:MIT License


Languages

Language:JavaScript 100.0%