Skip to content

Conversation

@albertsola
Copy link
Contributor

@albertsola albertsola commented Oct 22, 2025

  • Moved unit tests from tests/ to tests/unit/
  • Added dummy e2e test in tests/e2e/
  • Updated pytest setup to not run tests mark as e2e
  • Added docker image to run e2e tests with docker compose run --rm e2e
  • Added pytest-rerunfailures dev dependency to rerun failed api calls (flaky tests)
  • Update Error handler to handle JSON responses for generic HTTP Errors (404, 401, ...)
  • Added e2e to github actions

@albertsola albertsola force-pushed the e2e/proof-of-concept-tests branch 3 times, most recently from b9fe6c4 to 055ee99 Compare October 22, 2025 14:22
@albertsola albertsola changed the title Prepare for e2e testing MPT-14713 Prepare for e2e testing Oct 22, 2025
@albertsola albertsola changed the title MPT-14713 Prepare for e2e testing MPT-14713 E2E TDR Proof of concept Oct 22, 2025
@albertsola albertsola self-assigned this Oct 22, 2025
@softwareone-platform softwareone-platform deleted a comment from github-actions bot Oct 22, 2025
@github-actions
Copy link

github-actions bot commented Oct 22, 2025

✅ Found Jira issue key in the title: MPT-14713

Generated by 🚫 dangerJS against 8e5fbd9

@softwareone-platform softwareone-platform deleted a comment from sonarqubecloud bot Oct 22, 2025
@albertsola albertsola force-pushed the e2e/proof-of-concept-tests branch 4 times, most recently from 9bf8b78 to 54c7b5e Compare October 23, 2025 10:25
- Moved unit tests from `tests/` to `tests/unit/`
- Added dummy e2e test in `tests/e2e/`
- Updated pytest setup to not run tests mark as e2e
- Added docker image to run e2e tests with `docker compose run --rm e2e`
- Added `pytest-rerunfailures` dev dependency to rerun failed api calls (flaky tests)
- Update Error handler to handle JSON responses for generic HTTP Errors (404, 401, ...)
@albertsola albertsola force-pushed the e2e/proof-of-concept-tests branch from 54c7b5e to 8e5fbd9 Compare October 23, 2025 10:27
@sonarqubecloud
Copy link

run: docker compose run --service-ports app_test

- name: "Run E2E test"
run: docker compose run --service-ports -e MPT_API_BASE_URL=$MPT_API_BASE_URL -e MPT_API_TOKEN=$MPT_API_TOKEN e2e
Copy link
Contributor

Choose a reason for hiding this comment

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

Keep in mind that the values of these parameters depend on the branch for main --> test env/ for release/* - staging env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  env:
        MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
        MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we may have to review this part. But so far we can control those variables from the pipeline setup.



@pytest.mark.flaky(reruns=5, reruns_delay=0.01) # noqa: WPS432
@pytest.mark.e2e
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you remind me what marks should be here? Looks a little bit extra to have e2e folder and e2e mark at the same time

Copy link
Contributor Author

@albertsola albertsola Oct 23, 2025

Choose a reason for hiding this comment

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

I completely agree, we have not taken a final call in which way to go.

Current setup if you run pytest with no parameters, the e2e will not run.

We can cleanup these marks in the future after we do the final call on the TDR.

@albertsola albertsola requested a review from d3rky October 23, 2025 13:06
@albertsola albertsola merged commit 2137a1a into main Oct 24, 2025
5 checks passed
@albertsola albertsola deleted the e2e/proof-of-concept-tests branch October 24, 2025 11:27
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.

4 participants