PHPackages                             damianz5/behat-screenshot-image-driver-custom-server - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. damianz5/behat-screenshot-image-driver-custom-server

ActiveLibrary[Testing &amp; Quality](/categories/testing)

damianz5/behat-screenshot-image-driver-custom-server
====================================================

Custom Server image driver for bex/behat-screenshot behat extension

011PHP

Since Jun 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/damianz5/behat-screenshot-image-driver-custom-server)[ Packagist](https://packagist.org/packages/damianz5/behat-screenshot-image-driver-custom-server)[ RSS](/packages/damianz5-behat-screenshot-image-driver-custom-server/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Custom Server image driver for Behat-ScreenshotExtension
========================================================

[](#custom-server-image-driver-for-behat-screenshotextension)

[![Build Status](https://camo.githubusercontent.com/061287c084ec29d8e7822404bbb988d45a103fd76a5e013366a4dbfde7cea76b/68747470733a2f2f7472617669732d63692e6f72672f64616d69616e7a352f62656861742d73637265656e73686f742d696d6167652d6472697665722d637573746f6d2d7365727665722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/damianz5/behat-screenshot-image-driver-custom-server)

This package is an image driver for the [bex/behat-screenshot](https://github.com/elvetemedve/behat-screenshot) behat extension which uploads to your custom server.

You can use [damianz5/simple\_file\_server](https://github.com/damianz5/simple_file_server) as simple file server.

Installation
------------

[](#installation)

Install by adding to your `composer.json`:

```
composer require --dev damianz5/behat-screenshot-image-driver-custom-server
```

Configuration
-------------

[](#configuration)

Enable the image driver in the Behat-ScreenshotExtension's config in `behat.yml` like this:

```
default:
  extensions:
    Bex\Behat\ScreenshotExtension:
      active_image_drivers: custom_server
      image_drivers:
        custom_server:
          authkey: authorisation key # Required
          collection_name: name of the collection # Required
          request_url: http://server.ltd/api/upload/ # Required
          image_base_url: http://server.ltd # Required
```

Alternative configuration
-------------------------

[](#alternative-configuration)

Options can be passed by OS exports (for travis):

in console / using travis encrypted variables:

```
export BEHAT_SCREENSHOT_AUTHKEY="authorisation key"
export BEHAT_SCREENSHOT_COLLECTION_NAME="beefbeefbeefbeefbeefbeefbeefbeef"
export BEHAT_SCREENSHOT_REQUEST_URL="http://server.ltd/api/upload/"
export BEHAT_SCREENSHOT_IMAGE_BASE_URL="http://server.ltd"
```

behat.yml (no need to specify the configuration details):

```
default:
  extensions:
    Bex\Behat\ScreenshotExtension:
      active_image_drivers: custom_server
```

Third configuration method (without editing the behat.yml file)
---------------------------------------------------------------

[](#third-configuration-method-without-editing-the-behatyml-file)

```
export BEHAT_PARAMS='{"extensions" : {"Bex\\Behat\\ScreenshotExtension" : {"active_image_drivers" : "custom_server"}}}'
export BEHAT_SCREENSHOT_AUTHKEY="authorisation key"
export BEHAT_SCREENSHOT_COLLECTION_NAME="beefbeefbeefbeefbeefbeefbeefbeef"
export BEHAT_SCREENSHOT_REQUEST_URL="http://server.ltd/api/upload/"
export BEHAT_SCREENSHOT_IMAGE_BASE_URL="http://server.ltd"
```

Usage
-----

[](#usage)

When you run behat and a step fails then the Behat-ScreenshotExtension will automatically take the screenshot and will pass it to the image driver, which will return the custom server image url. So you will see something like this:

```
  Scenario:                           # features/feature.feature:2
    Given I have a step               # FeatureContext::passingStep()
    When I have a failing step        # FeatureContext::failingStep()
      Error (Exception)
Screenshot has been taken. Open image at http://server.ltd/....
    Then I should have a skipped step # FeatureContext::skippedStep()
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/42be17107b6cde24c6f4725bdc49ab77dcb4ac8d37464d7b932e779f6aebbdf1?d=identicon)[damianz5](/maintainers/damianz5)

---

Top Contributors

[![damianz5](https://avatars.githubusercontent.com/u/3495796?v=4)](https://github.com/damianz5 "damianz5 (1 commits)")

### Embed Badge

![Health badge](/badges/damianz5-behat-screenshot-image-driver-custom-server/health.svg)

```
[![Health](https://phpackages.com/badges/damianz5-behat-screenshot-image-driver-custom-server/health.svg)](https://phpackages.com/packages/damianz5-behat-screenshot-image-driver-custom-server)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
