You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: