2023-03-08 11:58:36 -08:00
# Running the Test Suite
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
This document is targeted at developers looking to make modifications to this application's code base and want to run the existing test suite.
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
Before starting, follow the [instructions ](README.md#installation ) for installing the application locally and ensure you can load it in a browser properly.
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
## Unit and Feature Tests
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
Before attempting to run the test suite copy the example environment file for tests and update the values to match your environment:
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
`cp .env.testing.example .env.testing`
> Since the data in the database is flushed after each test it is recommended you create a separate mysql database for specifically for tests
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
Now you are ready to run the entire test suite from your terminal:
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
`php artisan test`
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
To run individual test files, you can pass the path to the test that you want to run:
2022-08-12 10:00:26 -07:00
2023-03-08 11:58:36 -08:00
`php artisan test tests/Unit/AccessoryTest.php`