digitalfabrik / integreat-cms

Simplified content management back end for the Integreat App - a multilingual information platform for newcomers
https://digitalfabrik.github.io/integreat-cms/
Apache License 2.0
55 stars 33 forks source link

Use web app end to end tests before releasing new versions #1879

Open svenseeberg opened 1 year ago

svenseeberg commented 1 year ago

Motivation

We quite often release new versions of the CMS without testing if the app still works with the new CMS version. The app team already has a end to end test setup for the web app, which we could use to test compatibility of the API.

Proposed Solution

When preparing a release (pull request from develop branch to main branch), trigger a re-run of the last web app end to end test. The app team can parametrize the domain for the test setup so that it can test against any publicly running CMS.

Three things need to happen:

Alternatives

Alternatively, we could only use the app API client code and do some integration tests with it. That would be much more efficient, but not be a full end to end test.

Additional Context

There are multiple alternatives:

Design Requirements

timobrembeck commented 1 year ago

The relevant content from integreat-test.tuerantuer.org/testumgebung-e2e/ needs to be imported into the test data / fixtures

I don't think that's necessary, the ci tests with the test fixtures are independent from the database deployment on the server which is used for the end to end tests? Sure, we could use the same test data for consistency reasons, but it's not required for the task I think?

The CI pipeline for main branch pull requests would have to deploy the CMS to a Hetzner VM

Why Hetzner VM? Why isn't it sufficient to use https://cms-test.integreat-app.de/ which is automatically updated to the develop branch anyway?

svenseeberg commented 1 year ago

The relevant content from integreat-test.tuerantuer.org/testumgebung-e2e/ needs to be imported into the test data / fixtures

I don't think that's necessary, the ci tests with the test fixtures are independent from the database deployment on the server which is used for the end to end tests? Sure, we could use the same test data for consistency reasons, but it's not required for the task I think?

Indeed, the idea here was to have consistent test data across front end and back end. But I agree, this is no strictly necessary.

The CI pipeline for main branch pull requests would have to deploy the CMS to a Hetzner VM

Why Hetzner VM? Why isn't it sufficient to use https://cms-test.integreat-app.de/ which is automatically updated to the develop branch anyway?

Agreed. Would save us a lot of effort.

To sum things up: We should do it as you suggested. This is definitely the least effort and we can iterate later if required.

svenseeberg commented 7 months ago

The ticket on the app side got closed: https://github.com/digitalfabrik/integreat-app/issues/2108#issuecomment-1680041797