Skip to content

Conversation

@josecelano
Copy link
Member

@josecelano josecelano commented Apr 28, 2023

E2E tests run an independent application process with docker, and then the test are executed against that single service.

Integration tests will use an independent process for each test, running the API on a different port. The tests launch their instances. We need to refactor the application bootstrapping to be able to launch an app instance programmatically, as we did for the tracker.

This refactoring allows us to reuse the code from E2E tests in future integration tests.

@josecelano josecelano changed the title Refactor: extract logic from E2E tests to reuse it for integrations tests Refactor: extract logic from E2E tests to reuse it for integration tests Apr 28, 2023
…ests

E2E tests run an independent application process with docker, and then they are executed against that public service. It's only one instance.

Integrations tests will use an independent process for each test, running the API on a different port. The instance SUT is launched by the tests. We need to refactor the application bootstrapping to be able lo launch an app instance from tests.

This refactor allows us to reuse the code from E2E tests in future integration tests.
@josecelano josecelano marked this pull request as ready for review April 28, 2023 16:49
@josecelano
Copy link
Member Author

josecelano commented Apr 28, 2023

Hi @da2ce7 @WarmBeer, this is ready for review. My plan is:

  1. Merge this PR.
  2. Scaffolding for integration tests: app bootstrapping with an App launcher (what we called the state machine in the tracker), using it for both PROD and TEST envs. Notice that in the tracker we used it only for testing.

After those steps, we will be able to start writing integration tests on demand.

@josecelano josecelano merged commit e78a5bf into torrust:develop Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant