This application exists to show how you can use postman/newman to run automated tests and collect code coverage. To get started make sure you have composer installed and update the database config to point to a working database. Then install the app and migrate and seed the database
cp .env.example .env
composer install
./artisan migrate --seed
Next configure your web server to serve the project at api.fooblog.loc and assuming your running this on a local server add the following hosts entry to your hosts file.
127.0.0.1 api.fooblog.loc
Next use Postman and import the collection and environment located in /postman or use newman and run it on the command line:
newman --insecure -e postman/build.json -c postman/collection.json
To collect and write coverage use the following example:
./artisan testing:coverage collect
vendor/bin/phpunit --log-junit testresults/phpunit/phpunit.xml -c phpunit.xml
mkdir -p testresults/newman/
newman -c postman/collection.json -e postman/build.json -o testresults/newman/build.json --noColor
./artisan testing:coverage write
./artisan testing:merge-results