Git Product home page Git Product logo

codeceptjs-selenoid's Introduction

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

codeceptjs-selenoid's People

Contributors

dependabot[bot] avatar kmkoushik avatar

Stargazers

 avatar

Watchers

 avatar

codeceptjs-selenoid's Issues

Zero setup

Let's add another config option autoCreate which will create a container as described in step 1. If container already exists should do nothing, on other failures throw an error. Also make container name configurable, as well as command parameters:

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/ \
${extraParams.join('\n')}
aerokube/selenoid:latest-release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.