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

TST: Restructuring the test suite #480

Closed
1 task done
lucasfourier opened this issue Nov 23, 2023 · 3 comments · Fixed by #626, #627 or #628
Closed
1 task done

TST: Restructuring the test suite #480

lucasfourier opened this issue Nov 23, 2023 · 3 comments · Fixed by #626, #627 or #628
Assignees
Labels
Tests Regarding Tests

Comments

@lucasfourier
Copy link
Collaborator

lucasfourier commented Nov 23, 2023

Is your feature request related to a problem? Please describe.

RocketPy test suite is currently very slow. Among other factors, this has to do with the fact that unit tests and integration tests (which are being treated as unit tests in many ways) are being kept in the same folder.

Describe the solution you'd like

Restructuring the test suite will bring clarity as well as proper treatment depending on the nature of the test. With regards to the unit tests, they need to be refactored: commented, rewritten and etc.

Additional context

Even though some methods had tests written for them, bugs occurred. Of course, this situation might happen even though unit tests are available for a certain method. However, that also indicates that the test suite/testing process is not robust enough. As an example of this, check this bug:
#476

  • Add a simple documentation or guideline to the "development" section in our documentation, just to ensure people know how to start creating new tests if needed.
@Gui-FernandesBR
Copy link
Member

Good idea!

I liked the idea of separating unit and integration tests.

Here some other suggestions (not mandatory):

Also, the acceptance tests are quite important, we should improve them by bringing more examples of real flights to be tested.

@lucasfourier
Copy link
Collaborator Author

Nice! Gonna check the suggestions!

@lucasfourier
Copy link
Collaborator Author

------"Algorithm" that will run the reorganization:------

1. For each module x in the tests directory, copy x into the new directory unit tests.
2. After that, classify those tests which are certainly unit and leave them there.
3. Remove the ones which are not unit and are inside the module. (Observe that they are not deleted forever, you could still find them in the original test_function.py testing module).
4. Now, having copied each testing module to the unit test folder, refactor every unit test in every testing module (if needed)
5. Finished unit testing organization. Start developing integration tests.

Pull request in each step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment