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

Build regression testing suite to test compiled distribution files #68

Open
jcowman2 opened this issue Nov 19, 2018 · 0 comments
Open
Labels
help wanted Extra attention is needed infrastructure Relating to the development tooling around the project
Milestone

Comments

@jcowman2
Copy link
Contributor

Overview

Currently, the library's unit tests are run on the TypeScript source itself, using ts-node. This is convenient for development, as breakpoints and code coverage can be placed on the TypeScript source files.

These source files, however, are not used by consumers of the library. They use the compiled and transformed distribution files that are generated by Rollup. The problem with testing the TypeScript source only is that no tests are run on these distribution files, which could lead to shipping broken code if there is some bug with the Rollup ecosystem.

There should be a way to test these distribution files. Rather than running the same unit tests, it makes more sense to perform regression tests on the compiled code with games that rely on the Regal Game Library to ensure that they still behave correctly.

Background

Vue performs regression tests in a similar way.

Description

At a high level, the regression testing tool would perform the following steps:

  1. Clone a game that relies on the Regal Game Library (a "Regal game"), along with its dev dependencies and testing suite.
  2. Run the game's unit tests. This assumes that all of the Regal game's tests will be passing. If they aren't, the tool will exit.
  3. Replace the game's Regal dependency with the staged version of the library. If the staged version has API changes, this obviously will not work.
  4. Rerun the game's unit tests. If tests are now failing, it's safe to assume there is a regression. The tool will exit and notify us of the problem. Otherwise, the regression tests are passed.

This tool would need to have an API so that it could be included as a step in the Continuous Integration pipeline or called from regal-cli.

@jcowman2 jcowman2 added help wanted Extra attention is needed infrastructure Relating to the development tooling around the project labels Nov 19, 2018
@jcowman2 jcowman2 added this to the Future milestone Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed infrastructure Relating to the development tooling around the project
Projects
None yet
Development

No branches or pull requests

1 participant