https://github.com/prestashop/qanightlyresults
A script to browse test reports and display some stats. For PrestaShop E2E tests.
https://github.com/prestashop/qanightlyresults
dashboard hacktoberfest nightly-builds tool
Last synced: 8 months ago
JSON representation
A script to browse test reports and display some stats. For PrestaShop E2E tests.
- Host: GitHub
- URL: https://github.com/prestashop/qanightlyresults
- Owner: PrestaShop
- Created: 2019-05-31T14:04:29.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2024-10-28T14:39:29.000Z (over 1 year ago)
- Last Synced: 2024-10-29T17:04:21.357Z (over 1 year ago)
- Topics: dashboard, hacktoberfest, nightly-builds, tool
- Language: PHP
- Homepage: https://nightly.prestashop-project.org/
- Size: 5.63 MB
- Stars: 3
- Watchers: 14
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QANightlyResults
[](https://github.com/PrestaShop/QANightlyResults/actions/workflows/php.yml)
[](https://coveralls.io/github/PrestaShop/QANightlyResults?branch=develop)
QANightlyResults is a Symfony app, acting as a backend (via a JSON API) to handle and browse tests reports records.
You can use any frontend app you want to consume this API. We use a [Vue app](https://github.com/PrestaShop/nightly-board).
Its purpose is to :
1. store results of tests in a database
2. let people browse a report of a test execution
3. display some statistics about test failures
### Configuration
You can create a `.env.local` file at the root of the project. You can also pass the values via environment variables.
Here are the main ones:
| Variables | |
|-------------------|------------------------------------------|
| DATABASE_URL | DSN for MySQL Server |
| QANB_TOKEN | Token to add JSON data through the Hook |
## Usage
Install dependencies with a `composer install`.
Create a database with a `php bin/console doctrine:schema:update --dump-sql --force`.
## Web server configuration
Set up a vhost that points to the `/public` folder (example in the `vhost.conf` file).
## Inserting new data
Use the hook provided in the `Hook` controller.
You need to call one of these URLs with the method `GET`:
- `BASE_URL/hook/reports/import` (for a Mocha Import)
- `BASE_URL/import/report/playwright` (for a Playwright Import)
You can add these parameters in the query:
- `token`: the token set in the environment variable `QANB_TOKEN` (e.g.: `IpBzOmwXQUrW5Hn`)
- `filename` : the complete filename to look for in the Google Cloud Storage (e.g.: `2019-07-22-develop.json`). The
name must follow this pattern: `/[0-9]{4}-[0-9]{2}-[0-9]{2}-(.*)?\.json/`
Optional:
- `force`: a special parameter used to force insert when a similar entry is found (criterias are :browser, campaign, date and version)
- `browser`: to specify the browser. Possible values are 'chromium' (default), 'firefox', and 'edge'.
- `campaign`: to specify the campaign. Possible values are 'functional' (default), 'sanity', 'e2e', and 'regression'.
EG : `api.mysite.com/hook/reports/import?token=IpBzOmwXQUrW5Hn&filename=2019-07-22-develop.json`
EG : `api.mysite.com/import/report/playwright?token=IpBzOmwXQUrW5Hn&filename=2019-07-22-develop.json`
The files in the Google Cloud Storage might be huge, so be sure your server is properly configured to handle large files.
Files will be taken from `https://storage.googleapis.com/prestashop-core-nightly/reports/`.
## Containers
If you're working with docker, we have you covered.
```
docker-compose up -d
```
And you should have the application running locally.
Though, we're not providing any DB at this time, so you'll have to:
- Have your DB running
- Edit the compose credentials about your DB