This repository contains our version of the second project of the AMT class of HEIG-VD.
🌱 Our Cucumber reports for the dev branch are on GitHub Pages 🌱
☕ The generated spec API is on the repository Wiki ☕
- The
dockerfolder contains deployment information for our images and environments. - The
full-projectfolder is useful to open both the implementation and specs simulateneously in IntelliJ IDEA. - The
gamify-implcontains a Spring Boot project that will gamify your next app. That's probably what you came here for ✌️ - The
gamify-specscontains our code-based specification. It is used to validate the behavior of the API.
| Name | |
|---|---|
| Matthieu Burguburu | matthieu.burguburu@heig-vd.ch |
| David Dupraz | david.dupraz@heig-vd.ch |
| Alexandre Piveteau | alexandre.piveteau@heig-vd.ch |
| Guy-Laurent Subri | guy-laurent.subri@heig-vd.ch |
Assuming you have Docker installed locally, you can run the following scripts to get the app running on your 8080 port :
sh ./build-image.sh
sh ./run-compose.shThe Swagger docs will then be available on the root endpoint.
You can run the Cucumber validation via Maven. You need to make sure the app is running on your 8080 port :
cd gamify-specs/
mvn clean test
The reports are also generated and published to GitHub Pages.
Here are some of the behaviors verified in our 63 test scenarios :
- Applications can't register twice, and can access the API endpoints only if they provide their API token. Password-based authentication works properly for
/accountsmanagement; - Multiple applications can create categories with identical names;
- Aggregates work properly. We also check that the amount of points generated by the rules is correct; and
- Rules can only be created for existing categories.
We've tested our /events endpoint with JMeter to make sure that concurrent calls would not be dropped. Our application creates some EndUserPointAward each time an event is posted by an application. These EndUserPointAward then get summed when aggregates are computed.
NB : The issues on /events have been fixed since Friday's demo.
A live version of our API is available on Heroku. We're using a free plan, so it may need a few seconds to start up if the instance was previously paused 🚀