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

Automate testing, add more complete testing coverage, provide coverage reporting #133

Open
franzwollang opened this issue Mar 12, 2023 · 0 comments

Comments

@franzwollang
Copy link

franzwollang commented Mar 12, 2023

Currently, there is only a single 'test.http' file for manually testing API endpoints. Please automate these manual tests of the API using Vitest and make them more comprehensive. Please add some component/page integration tests as well. Playwright is our preferred tool for component and E2E tests.

As a general rule of thumb, when your tests run, they should cause roughly 90% of the line of code in the codebase to be executed. If not enough of your code executes when the tests run, you should add more tests to cover the cases where that additional code would execute. However, the percentage of lines covered is only a heuristic; you don't have to be too strict about hitting 90%. The philosophy you should be following when writing tests is differential diagnosis. That is, you cannot 100% catch all problems with tests but you can reduce the amount of effort it takes to locate the source of a problem. You should be writing tests at the boundary interfaces of the different "areas" of your application (browser <--> client code <--> backend <--> database) that can help immediately narrow down the possibilities for the source of the error. You should also be adding additional tests to the output of any complicated conditional logic or logic that relies on complex state changes (unless you have made it into a state machine with well-defined transitions).

Please provide a testing coverage report as part of your test suite.

@franzwollang franzwollang added the enhancement New feature or request label Mar 12, 2023
@franzwollang franzwollang changed the title No automated testing Automate testing, add more complete testing coverage, provide coverage reporting Mar 12, 2023
@franzwollang franzwollang added technical debt documentation Improvements or additions to documentation and removed enhancement New feature or request documentation Improvements or additions to documentation labels Mar 12, 2023
@suzypowers suzypowers removed their assignment Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants