Download the PHP package deminy/behat-rest-testing without Composer

On this page you can find all versions of the php package deminy/behat-rest-testing. 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 behat-rest-testing

Summary

Build Status Latest Stable Version Latest Unstable Version License

This repo is to help developers to easily understand how to do feature tests with Behat, and to start writing feature tests for REST APIs, with following features included:

NOTE: Following instructions focus on Behat 3.0.6+ and PHP 5.4+. If you use Behat 2.x and/or PHP 5.3 (5.3.3+), please check branch "1.x" for details.

Dependencies

Branch master

Branch 1.x (old releases for Behat 2.x)

Installation - Source

You will need to download Composer and run the install command under the same directory where the 'composer.json' file is located:

Installation - Composer

You may also install using Composer if you want to use this repo in your own project.

Step 1. Add the repo as a dependency.

NOTE: This is for running with Behat 3 only. If you use Behat 2.x, please check installation instructions for v1.x for details.

Step 2. Run Composer: php composer.phar install.

How to Test

1. Set up and run REST API server.

You can have a virtual host set up under Apache, with DocumentRoot set to "www/" of this repo and DirectoryIndex set to "router.php". Please make sure that module mod_rewrite is enabled, otherwise the REST server won't be able to handle requests properly. You may also need to update option "base_url" in the configuration file "behat.yml".

Alternatively, you may consider to use the PHP 5.4+ built-in web server.

To start the REST API server using PHP 5.4+ built-in web server, please run command similar to following:

The web server now serves as the REST API server. You can visit URL http://localhost:8081 to see if the server runs properly or not (If everything is good, the URL should return string "OK" back).

2. Create the configuration file "behat.yml" (optional).

For the sample test provided, you can create the file by copying directly from file "behat.yml.dist" without any modifications required.

Note that you don't have to do this if you prefer to use file "behat.yml.dist" directly.

3. Run the test command.

Now, run following command to test sample features:

If everything is good, you should see the output as in following screenshot:

output when running Behat sample tests

TODOs

License

MIT license.


All versions of behat-rest-testing with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
behat/behat Version >=3.0.6 <=3.4.0
behat/web-api-extension Version dev-master
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 deminy/behat-rest-testing contains the following files

Loading the files please wait ....