Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch report summary from database. #32

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

jeschkies
Copy link
Owner

No description provided.

@jeschkies jeschkies requested a review from zen-dog December 29, 2018 18:52
@SqlQuery("""
SELECT reports.report_id,
SUM((xpath('count(//testcase)', payload))[1]::text::integer) AS ts_tests,
SUM((xpath('count(//failure)', payload))[1]::text::integer) AS ts_errors
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should use COUNT(xpath('//testcase')) instead. At some point we probably want to fetch all errors anyways so this will change.

@jeschkies jeschkies changed the title Report summary Fetch report summary from database. Dec 29, 2018
@jeschkies
Copy link
Owner Author

I did not test it yet since I'm missing an SQL dump.

Create test database with
```
sudo docker run -e POSTGRES_USER=kjeschkies -e POSTGRES_PASSWORD=1234 -p 5432:5432 postgres:10.5-alpine
./gradlew createDatabase
pqsl --username=kjeschkies --host=localhost unitfm < test-data.sql
```
@jeschkies
Copy link
Owner Author

I tested it with the test data dump. It works. There was a tiny bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant