Download the PHP package openbuildings/phpunit-spiderling without Composer

On this page you can find all versions of the php package openbuildings/phpunit-spiderling. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpunit-spiderling

PHPUnit Spiderling

Build Status Scrutinizer Quality Score Code Coverage Latest Stable Version

Heavily inspired by capybara capybara. Using the spiderling package to the fullest. It gives you the ability to quickly write integration test with powerful DSL and choose between different drivers with different combinations of features and performance - e.g. phanomjs or raw php with curl.

Example Test:

Spiderling

Spiderling has a fluid DSL that its best you get familiar with. The testcase has all the methods of Openbuildings\Spiderling\Page so you can use them directly along with some additional assertions.

The Testcase

To use phpunit spiderling you need to write your test as extends \Openbuildings\PHPUnitSpiderlingTestCase - it will give you all of the feature as methods of the class.

Assertions

The custom assertions are:

All of them assert that an element is on the page (or is not) by using a specific locator type and filters. Also they are actually an extension of Openbuildings\Spiderling\Page so they are available to all the nested nodes (and are asserting only in the context of the node)

For example:

Environment

You can modify the environment only for a specific test by using the ->environment() method. It returns a Environment Backup object, and whatever you set it to will be restored at the end of the test.

Here's an example usage:

Switching drivers

PHPUnit Spiderling uses the PHP Annotations to set up which driver to use fore each test. Heres how you do that:

You can have different drivers for each test, the available ones are: simple, kohana and phantomjs - where the default driver is simple. Each driver is loaded with the default configuration, but you can change it by modifying the appropriate method that loads the driver

Save on failure

There is a special testcase listener class included that saves the state of the test when there is a failure, and saves it as an html page for ease referance later. This is the Saveonfailure class. In order to use it, you'll need to modify your phpunit.xml like this:

License

Copyright (c) 2012-2013, OpenBuildings Ltd. Developed by Ivan Kerin as part of clippings.com

Under BSD-3-Clause license, read LICENSE file.


All versions of phpunit-spiderling with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^7.4
openbuildings/spiderling Version ^0.4
openbuildings/environment-backup Version ^0.1
phpunit/phpunit Version ^9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package openbuildings/phpunit-spiderling contains the following files

Loading the files please wait ....