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
I've been focused on making C/S developer life easier (aka making my life easier) by improving and automating the local and production deployment set ups. Another area that is slowing down development more and more is the test suite. C/S has a very extensive test suite.
(Unfotunately) I have updated it and added to it in more of an adhoc manner than I probably should have. Thus, some of the tests are becoming more and more complicated. Many have 2 and some have 4 more paths through them to account for public v. private apps and simulations.
The test suite can be improved in two ways:
Better defaults. Some of the new features like private apps require users to have a paid plan before they can take advantage of them. The default user in the test suite is a free-plan user. It may be time to change the default user to a user with a paid subscription.
Refactor tests. Instead of running multiple test cases through the same test path, tests for paid features should be clearly separated from free tests. The actual code-base does this very well, and only has a minimal amount of paid subscription checks. For example, this test could probably be split into multiple cases:
is the app public or private
is the sim public or private
does the user have a paid plan
This is actually much harder to read than the actual code for forking a simulation!
One thing that makes this difficult is that since its creation, C/S has been able to run in a no stripe mode. This makes local development nice since network requests are not slowing down tests. This also makes it easier for other people to run C/S if they are interested. However, no one has expressed much interest in running C/S in quite some time. So, if dropping the no-stripe mode streamlines the logic in the test suite, then I may go ahead and do it.
The text was updated successfully, but these errors were encountered:
I've been focused on making C/S developer life easier (aka making my life easier) by improving and automating the local and production deployment set ups. Another area that is slowing down development more and more is the test suite. C/S has a very extensive test suite.
(Unfotunately) I have updated it and added to it in more of an adhoc manner than I probably should have. Thus, some of the tests are becoming more and more complicated. Many have 2 and some have 4 more paths through them to account for public v. private apps and simulations.
The test suite can be improved in two ways:
Better defaults. Some of the new features like private apps require users to have a paid plan before they can take advantage of them. The default user in the test suite is a free-plan user. It may be time to change the default user to a user with a paid subscription.
Refactor tests. Instead of running multiple test cases through the same test path, tests for paid features should be clearly separated from free tests. The actual code-base does this very well, and only has a minimal amount of paid subscription checks. For example, this test could probably be split into multiple cases:
This is actually much harder to read than the actual code for forking a simulation!
One thing that makes this difficult is that since its creation, C/S has been able to run in a no stripe mode. This makes local development nice since network requests are not slowing down tests. This also makes it easier for other people to run C/S if they are interested. However, no one has expressed much interest in running C/S in quite some time. So, if dropping the no-stripe mode streamlines the logic in the test suite, then I may go ahead and do it.
The text was updated successfully, but these errors were encountered: