Download the PHP
package s3cc0/restful-api-test-engine without Composer
On this page you can find all versions of the php package
s3cc0/restful-api-test-engine. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor s3cc0 Package restful-api-test-engine Short Description This is a simple API Test-Engine. With simple JSON files you can run tests for all your RESTful API's. License
MIT
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 restful-api-test-engine
Introduction
This bundle provides a class for a simple API Test. The tests run on the terminal using run.php.
How to use?
In the folder you will find run.php. Run this file with given params to setup the test engine.
If you have written some tests. Then you can execute them with:
Example:
How to write tests?
First of all, all tests must contain in the same folder, sub folder are ignored.
Create a simple test
A test can contain one or more subtests.
Options
$nn - means should be "not null"
$eq - means check variable 1 of a response is equal to variable 2
.$c - will return the count of the keypath (used for arrays)
$ia - means check variable is an array
more options in the next version ...
Save variables
To reuse output or created data you can save them to the globals (note: use unique keys!). Keypath should be a available path inside the request response.
To reuse the save variable you can do it easy with {$account_id}
Using mocks
If you have create mocks, you can easy load them by adding a string to the request_params. This example will load the mock account.json.
You can also use mocks to validate the response values. For this add mock inside the validation.
Extended Header
You can extend and overwrite the reuqest header using the header in the test set. The header variables will also listing to the global saved variables.
All versions of restful-api-test-engine with dependencies
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 s3cc0/restful-api-test-engine contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.