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

Test suite TLC #348

Open
hdoupe opened this issue Nov 9, 2020 · 0 comments
Open

Test suite TLC #348

hdoupe opened this issue Nov 9, 2020 · 0 comments

Comments

@hdoupe
Copy link
Contributor

hdoupe commented Nov 9, 2020

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:

  1. 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.

  2. 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

    Screenshot from 2020-11-09 11-19-25

    This is actually much harder to read than the actual code for forking a simulation!

    Screenshot from 2020-11-09 11-20-24

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant