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

Make examples more deterministic for automated testing #460

Open
skalarproduktraum opened this issue Dec 16, 2021 · 3 comments
Open

Make examples more deterministic for automated testing #460

skalarproduktraum opened this issue Dec 16, 2021 · 3 comments
Labels
bugfixathon-2021 Issues that are up for grabs for the 2021 scenery & sciview bugfixathon build-system Concerns the build system

Comments

@skalarproduktraum
Copy link
Member

We are currently using the examples as integration tests as well. Some of them use randomised values, e.g. for lighting. As the screenshots created from these examples are automatically compared via Argos CI (see e.g. https://www.argos-ci.com/scenerygraphics/scenery/builds/38), this throws up quite a few false positives.

Ideas to fix this:

  • use a fixed random seed in the example runs on CI to produce deterministic values
  • don't use random values at all
@skalarproduktraum skalarproduktraum added build-system Concerns the build system bugfixathon-2021 Issues that are up for grabs for the 2021 scenery & sciview bugfixathon labels Dec 16, 2021
@elect86
Copy link
Member

elect86 commented Dec 16, 2021

Could you provide some link where those values are exactly set?

@skalarproduktraum
Copy link
Member Author

An example would be

There's plenty of places in the examples where Random.random3DVectorFromRange() is used e.g. for light colors.

@elect86
Copy link
Member

elect86 commented Dec 16, 2021

We might generate a static random palette offline and fetch during runtime from that

Or, we generate the palette at the start. If on CI, the palette will be always the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfixathon-2021 Issues that are up for grabs for the 2021 scenery & sciview bugfixathon build-system Concerns the build system
Projects
None yet
Development

No branches or pull requests

2 participants